Tiny bug in ActionMailer

Ran into this a while back, but hadn't gotten around to putting it on Lighthouse.

http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1842

In short, the SMTP delivery handler adds an extra set of <>s to the address specified
in the Return-Path header when sending the SMTP MAIL FROM command.
The needed change is 5 characters on a single line.

Anyone else run into this? Surely I'm not the only one delivering mail via SMTP and
using Return-Path... Would be great to get this into 2.3 final

--Matt Jones

Matt,
I've seen this behavior and wondered if that behavior was legit. But
it didn't seem to have any adverse effect and so I moved on to other
things. Admittedly, I didn't test the behavior of all mailers in the
wild though...

Can somebody definitively point to the SMTP spec for addressing and
the Return-Path to confirm this is unacceptable? My gut says it's
unacceptable, and you've now reinforced my belief. But a definitive
reference would be good.

-Chris

Section 4.1.2 of RFC 2812 defines the contents of the header to be
MAIL FROM:<Reverse-path>,
where reverse path is the source mailbox.

In the wild, I have seen the 2.2.2 version of this code get errors on
the address with
double << marks, something to the effect of 'bad local part'.

It should also be noted that TMail performs an equivalent process on
'from' headers
already to produce mail.from (the other possible source of the header
in the current code).

--Matt Jones

I've put a patch up - can somebody take a look at it? I'd like to have
this working in
2.3...

--Matt Jones