2

What is the determining factor in where the bounce back email is sent? If the sender and the reply-to field are different which email gets the bounce back message?

Currently our system sends out emails and spoofs the "From" field with a non-existent no-reply account. We have a requirement where we want to start monitoring bounce backs. So as long as a I put a real email address in the "From" field, will that be the email address that receives the bounce back?

1 Answers1

3

If the sender and the reply-to field are different which email gets the bounce back message?

Neither. It's the envelope From field – i.e. the SMTP MAIL FROM:<…> command – that defines this.

(Though as to how your system chooses which envelope-From address to send... I'm guessing it would, by default, copy it from the "From:" header, but usually it's changeable separately.)

For example, a SMTP conversation might look like this:

$ swaks --h-From noreply@example.com --to grawity@gmail.com
=== Trying gmail-smtp-in.l.google.com:25...
=== Connected to gmail-smtp-in.l.google.com.
<-  220 mx.google.com ESMTP th5si9071845wjc.89 - gsmtp
 -> EHLO kremvax.example.com
<-  250-mx.google.com at your service, [193.219.181.217]
<-  250-SIZE 157286400
<-  250 STARTTLS
 -> MAIL FROM:<grawity@kremvax.example.com>
<-  250 2.1.0 OK th5si9071845wjc.89 - gsmtp
 -> RCPT TO:<grawity@gmail.com>
<-  250 2.1.5 OK th5si9071845wjc.89 - gsmtp
 -> DATA
<-  354 Start mail input; end with <CRLF>.<CRLF>
 -> Date: Thu, 05 May 2016 07:36:36 +0300
 -> To: grawity@gmail.com
 -> From: noreply@example.com
 -> Subject: test Thu, 05 May 2016 07:36:36 +0300
 -> X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/
 -> 
 -> This is a test mailing
 -> 
 -> .
<-  250 2.0.0 OK 1462422997 th5si9071845wjc.89 - gsmtp
 -> QUIT
<-  221 2.0.0 closing connection th5si9071845wjc.89 - gsmtp
=== Connection closed with remote host.

Here, the "envelope-From" address is grawity@kremvax.example.com, but I've manually specified the actual message's "From:" header to show something else. (If I wanted to set both at once, I'd use --from.)

Bounces themselves, I believe, are sent with MAIL FROM:<> to prevent further responses.


By the way, "From:" isn't always the sender – there's in fact a "Sender:" header as well.

grawity
  • 501,077