Return-Path in Rails ActionMailer
So today I finally made Rails do something I needed for a long time: honour the Return-Path header on outgoing emails. This is basically the return address for MTAs, er, computers to use. It’s a quite useful header since you can manage your mailing list the proper way. I.e. have replies sent to you, but quota warnings and delivery faillures sent to a computer.
Rails would honor the Return-Path header, but then pass it off to Net::SMTP where it got lost.
I feared this would be a tough one to crack but the solution was tiny. It just took me a couple hours to figure it out, browsing the net/smtp.rb source.
I submitted the patch to the Rails repository just now and I expect it will be added to trunk (or as the Rails people say: “edge”). Should become available soon.
I did not find any documentation in the API (http://api.rubyonrails.org/classes/ActionMailer/Base.html). How can i define the ReturnPath for ActionMailer!?
Regards, Rainer
I’ve not massaged the patch through the released version of Rails yet. I need to convince a few more people to ‘vote’ for my patch, but it’s looking good already.
http://dev.rubyonrails.org/ticket/7572
In order words: if you can, post a comment that simply says +1 to the URL above. The more +1s, the faster this patch is approved so everybody can use it!