Bounce-adres

E-mail & Beveiliging
Het retouradres dat wordt gebruikt voor niet-bezorgingsrapporten wanneer e-mail niet kan worden afgeleverd.
← Terug naar Woordenlijst

Wat is een bounceadres?

Een bounce adres, ook wel het retour pad of envelop afzender, is het e-mailadres dat niet-levering rapporten (NDR's) ontvangt wanneer een e-mail niet kan worden geleverd. Dit adres is gescheiden van het adres "Vanaf" dat zichtbaar is voor ontvangers en wordt uitsluitend gebruikt voor automatische leveringsmeldingen.

Hoe bounceadressen werken

E-mailtransmissie maakt gebruik van twee adressen:

Header Van (zichtbaar voor ontvanger):
From: John Doe <[email protected]>
Envelop From (SMTP-niveau, gebruikt voor bounces):
MAIL FROM: <[email protected]>

Als de levering mislukt, stuurt de ontvangende server de bounce naar de envelope sender, niet de header van het adres.

SMTP-gespreksvoorbeeld

Client: MAIL FROM: <[email protected]>

Server: 250 OK

Client: RCPT TO: <[email protected]>

Server: 550 No such user here

Client: QUIT

# Later, server sends bounce to [email protected]

Soorten e-mailbounces

Harde bounces

Permanente leveringsfouten:

Actie: Adres onmiddellijk uit de mailinglijst verwijderen.

Zachte bounces

Tijdelijke storingen:

Actie: Opnieuw leveren, verwijderen na meerdere zachte bounces.

Geblokkeerde bounces

Leveringsproblemen:

Actie: Onderzoek de reputatie en authenticatie van de afzender.

Bounceadresconfiguratie

Terugkeerpad instellen in e-mailkoppen

PHP (mailfunctie):
$to = "[email protected]";

$subject = "Test Email";

$message = "Email body";

$headers = "From: [email protected]\r\n";

$headers .= "Return-Path: [email protected]\r\n";

mail($to, $subject, $message, $headers, "-f [email protected]");

PHPMailer:
$mail = new PHPMailer();

$mail->From = "[email protected]";

$mail->Sender = "[email protected]"; // Return path

$mail->addAddress("[email protected]");

$mail->Subject = "Test Email";

$mail->send();

Postfix (SMTP):
# /etc/postfix/main.cf

sender_canonical_maps = hash:/etc/postfix/sender_canonical

# /etc/postfix/sender_canonical

@example.com [email protected]

# Apply changes

postmap /etc/postfix/sender_canonical

systemctl reload postfix

Diensten voor bounceafhandeling

De meeste e-mail service providers bieden bounce management:

Amazon SES:
{

"Message": {

"Subject": "Test",

"From": "[email protected]",

"ReturnPath": "[email protected]"

}

}

SendGrid:
const msg = {

to: '[email protected]',

from: '[email protected]',

replyTo: '[email protected]',

return_path: '[email protected]',

subject: 'Test Email',

text: 'Email body'

};

Naamgevingsconventies voor bounceadressen

Subdomeinaanpak

[email protected]           # General bounces

[email protected] # No-reply emails

[email protected] # Returns/receipts

Campagnespecifieke adressen

Track bounces per campagne:

[email protected]

[email protected]

[email protected]

Variabel envelopretourpad (VERP)

Codeer ontvanger in bounce adres:

Sending to: [email protected]

Return path: [email protected]

When bounce arrives at bounces+*, parse to identify failed recipient

Bounceberichten verwerken

Geautomatiseerde uitsparing

Python Voorbeeld:
import email

from email import policy

def parse_bounce(raw_email):

msg = email.message_from_string(raw_email, policy=policy.default)

# Extract bounce type

if "550" in msg.get_payload():

return "hard_bounce"

elif "452" in msg.get_payload():

return "soft_bounce"

# Extract failed recipient

for part in msg.walk():

if part.get_content_type() == "message/delivery-status":

# Parse delivery status

pass

return bounce_info

# Integrate with mailing list to remove hard bounces

Webhookgebaseerde bounceafhandeling

Moderne ESP's bieden webhooks:

SendGrid Webhook:
POST /bounce-webhook

{

"email": "[email protected]",

"event": "bounce",

"reason": "550 5.1.1 User unknown",

"type": "blocked",

"status": "5.0.0"

}

Actie: Database bijwerken om e-mail te markeren als geweigerd.

SPF en bounceadressen

SPF controleert de envelop afzender (bounce adres), niet de From header:

Message:

From: [email protected] (header)

Return-Path: [email protected] (envelope)

SPF Check:

Queries: mail-server.com TXT record (not example.com)

Must include sending IP in mail-server.com's SPF

SPF-configuratie voor het bouncedomein

bounces.example.com.    IN    TXT    "v=spf1 include:_spf.sendgrid.net ~all"

Zorg ervoor dat uw bounce subdomein passende SPF records heeft voor uw verzendende infrastructuur.

Beste praktijken voor bounceadressen

Een specifiek bounceadres gebruiken

Gebruik nooit uw primaire e-mail voor bounces:

# Bad

Return-Path: [email protected]

# Good

Return-Path: [email protected]

Monitor bounce tarieven

Bounce rateBeoordelingActie
< 2%GezondheidDoorgaan met toezicht
2-5%BetreffendeKwaliteit audit e-maillijst
5-10%SlechtOnmiddellijke schoonmaaklijst nodig
> 10%KritiekBezorgbaarheid tegen risico

Bounceverwerking implementeren

Automatisch verwijderen van harde bounces:

-- Mark emails with hard bounces

UPDATE mailing_list

SET status = 'bounced', bounce_count = bounce_count + 1

WHERE email IN (SELECT email FROM recent_hard_bounces);

-- Remove after 3 hard bounces

DELETE FROM mailing_list

WHERE bounce_count >= 3;

Transactionele en marketingbounces scheiden

[email protected]  # Order confirmations, receipts

[email protected] # Newsletters, campaigns

Voor elk type worden verschillende bouncetarieven verwacht.

Opstellen van Bounce Processing Automation

Cron Job Voorbeeld:
#!/bin/bash

# Process bounces every hour

# Fetch bounces from IMAP

fetchmail -c /etc/fetchmailrc

# Parse and update database

/usr/local/bin/process-bounces.py

# Clean up processed bounces older than 30 days

find /var/mail/bounces -mtime +30 -delete

Backscatter en bouncebeveiliging

Het backscatterprobleem

Wanneer uw server spam accepteert en het vervolgens stuitert, stuurt u naar vervalste adressen:

1. Spammer sends email with forged From

2. Your server accepts it

3. Your server realizes it's spam/invalid

4. Your server bounces to forged From address

5. Innocent party receives bounce (backscatter)

Oplossing: Weigeren op SMTP tijd, niet accepteren dan stuiteren:
# Postfix: Reject unknown users at SMTP time

smtpd_recipient_restrictions = reject_unauth_destination

local_recipient_maps = hash:/etc/postfix/local_recipients

Bouncevervalsing

Aanvallers kunnen stuiteren berichten naar:

Validatie:

Veelvoorkomende bouncescenario's

Scenario 1: Alle e-mails bouncen

Cause: SPF storing, IP blacklist, of server reputatie Check: SPF records, afzender IP reputatie, DMARC rapporten

Scenario 2: Bounces worden niet ontvangen

Cause: Bounce-adres is onjuist geconfigureerd of bestaat niet Check: MX records voor bounce domein, mailbox bestaat

Scenario 3: Hoog percentage zachte bounces

Cause: Ontvangerservers overbelast, snelheid beperkend, grote berichten

*Check: Verzendsnelheid, berichtgrootte, ontvangersserverfouten

Scenario 4: Bounce-lussen

Cause**: Bounce adres triggers automatisch antwoord, die triggers een andere stuiter

*Check: Auto-responders uitschakelen op bounce-adressen

Bounceafhandeling testen

Stuur test e-mail met ongeldige ontvanger:
# Test bounce to invalid address

swaks --to [email protected] \

--from [email protected] \

--server mx.test-domain.com

# Check if bounce arrives at [email protected]

Verify SPF for bounce domain**:
dig bounces.example.com TXT

# Should show SPF record with authorized senders

Goed bounce adresbeheer is van cruciaal belang voor het behoud van de reputatie van de afzender, lijsthygiëne en de leverbaarheid.

Pas Deze Kennis Toe

Gebruik de API van DomScan om domeinbeschikbaarheid, gezondheid en meer te controleren.