Set bounce address with ActionMailer::ARMailer

Hi all. I send out mails using ActionMailer::ARMailer, via an exim
mailserver. Is there some header/field that i can set so that the reply
field is (eg) [email protected] but bounced (ie undeliverable)
mails get sent back to (eg) [email protected]?

thanks, max

On Mar 15, 2:34pm, Max W. [email protected] wrote:

Hi all. I send out mails using ActionMailer::ARMailer, via an exim
mailserver. Is there some header/field that i can set so that the reply
field is (eg) [email protected] but bounced (ie undeliverable)
mails get sent back to (eg) [email protected]?

isn’t that the difference between return-path and reply-to ?

Fred

Frederick C. wrote in post #987560:

On Mar 15, 2:34pm, Max W. [email protected] wrote:

Hi all. I send out mails using ActionMailer::ARMailer, via an exim
mailserver. Is there some header/field that i can set so that the reply
field is (eg) [email protected] but bounced (ie undeliverable)
mails get sent back to (eg) [email protected]?

isn’t that the difference between return-path and reply-to ?

Fred

Hi fred - i’m not sure what you mean. Do you mean i should be setting
reply-to (or is it “Reply-To”?) to “[email protected]” as well? Or
instead of Return-Path?

On Mar 28, 9:43am, Max W. [email protected] wrote:

Fred

Hi fred - i’m not sure what you mean. Do you mean i should be setting
reply-to (or is it “Reply-To”?) to “[email protected]” as well? Or
instead of Return-Path?

it was my understanding that reply-to is what gets used when the user
tries to reply to one of your emails, but that return-path is used for
bounces (I may of course be wrong)

Fred

On Mar 28, 11:12am, Max W. removed_emai[email protected] wrote:

tries to reply to one of your emails, but that return-path is used for

This should get bounced back by gmail, and i’d think it would get
bounced back to the noreply address. But, the noreply mailbox doesn’t
get anything back.

Make sure that nothing is overwriting your Return-Path, I’ve come
across mail servers that would rewrite that sort of stuff for you. (eg
send a mail to an address you can read and check that the return path
is the one you specified)

Fred

Frederick C. wrote in post #989578:

Make sure that nothing is overwriting your Return-Path, I’ve come
across mail servers that would rewrite that sort of stuff for you. (eg
send a mail to an address you can read and check that the return path
is the one you specified)

Ok, i just stripped out any extra headers (so i’m just setting to, from,
subject, and body) and then sent a mail with the ‘from’ field set to my
yahoo email and the ‘to’ field set to my gmail email.

Changing the addresses to protect the innocent, let’s say that i set it
up as follows:

From: [email protected]
To: [email protected]
Subject: “Hello dummy”
Body: “Hello dummy\n”

So, i sent that out, recieved it in gmail and inspected it, to see the
following:

Delivered-To: [email protected]
Received: by 10.52.156.164 with SMTP id wf4cs20192vdb;
Mon, 28 Mar 2011 05:29:27 -0700 (PDT)
Received: by 10.227.163.133 with SMTP id a5mr3664403wby.73.1301315366670;
Mon, 28 Mar 2011 05:29:26 -0700 (PDT)
Return-Path: [email protected]
Received: from uk1w2c0067.eechost.net (uk1w2c0067.eechost.net [217.69.46.42])
by mx.google.com with ESMTP id u2si6545764wbd.60.2011.03.28.05.29.26;
Mon, 28 Mar 2011 05:29:26 -0700 (PDT)
Received-SPF: neutral (google.com: 217.69.46.42 is neither permitted nor
denied by best guess record for domain of [email protected])
client-ip=217.69.46.42;

Authentication-Results: mx.google.com; spf=neutral (google.com: 217.69.46.42
is neither permitted nor denied by best guess record for domain of
[email protected]) [email protected]

Received: from ec2 ([75.101.135.251]) by uk1w2c0067.eechost.net with Microsoft
SMTPSVC(6.0.3790.4675);

Mon, 28 Mar 2011 13:30:03 +0100

Received: from localhost ([127.0.0.1] helo=ir.charanga.com)
by ec2 with esmtp (Exim 4.63)
(envelope-from [email protected])
id 1Q4BZV-00032m-Fq
for [email protected]; Mon, 28 Mar 2011 13:29:25 +0100
Date: Mon, 28 Mar 2011 13:28:39 +0100
From: [email protected]
To: Dummy U. [email protected]
Subject: Hello dummy
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Message-Id: [email protected]
Return-Path: [email protected]
X-OriginalArrivalTime: 28 Mar 2011 12:30:03.0500 (UTC)
FILETIME=[DCE862C0:01CBED43]

Hello dummy

I tried again, setting the ‘Return-Path’ header when building the email,
but the “Return-Path” header in the received mail is still set to be the
same as the from address.

On Mar 28, 1:52pm, Max W. [email protected] wrote:

Hello dummy

I tried again, setting the ‘Return-Path’ header when building the email,
but the “Return-Path” header in the received mail is still set to be the
same as the from address.

Yahoo may be forcing the return path (eg so that you can’t spam people
by sending email you know will bounce and setting the return-path to
be the victim’s email address, thus getting someone else’s mail server
to send the spam message)

Fred

Frederick C. wrote in post #989604:

On Mar 28, 1:52pm, Max W. [email protected] wrote:

Hello dummy

I tried again, setting the ‘Return-Path’ header when building the email,
but the “Return-Path” header in the received mail is still set to be the
same as the from address.

Yahoo may be forcing the return path (eg so that you can’t spam people
by sending email you know will bounce and setting the return-path to
be the victim’s email address, thus getting someone else’s mail server
to send the spam message)

Fred

ah…in that case (assuming other mail servers will do the same thing)
then i’m screwed, right? As far as having a bounce address which is
different to the from address goes anyway.

Frederick C. wrote in post #989568:

On Mar 28, 9:43am, Max W. [email protected] wrote:

Fred

Hi fred - i’m not sure what you mean. Do you mean i should be setting
reply-to (or is it “Reply-To”?) to “[email protected]” as well? Or
instead of Return-Path?

it was my understanding that reply-to is what gets used when the user
tries to reply to one of your emails, but that return-path is used for
bounces (I may of course be wrong)

Fred

That’s what i thought, but it’s not working for me: currently i’m doing
this

‘From’ = “[email protected]
‘Return-Path’ = “[email protected]
‘To’ = “[email protected]

This should get bounced back by gmail, and i’d think it would get
bounced back to the noreply address. But, the noreply mailbox doesn’t
get anything back.

On Mar 28, 4:47pm, Max W. [email protected] wrote:

be the victim’s email address, thus getting someone else’s mail server
to send the spam message)

ah…in that case (assuming other mail servers will do the same thing)
then i’m screwed, right? As far as having a bounce address which is
different to the from address goes anyway.

I don’t think it will be true of all mail servers, although it may
well be true of most services like yahoo, gmail etc.

Fred

Just thought of something - we can see that it’s NOT yahoo changing the
return path: in the original mail, forwarded on as part of the bounce,
the return path is set to be the same as the from address. So it looks
like it is something that happens as part of the sending process -
right?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs