fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]RFC2821 Return-Path

2001-07-31 08:53:15
Jonathan Hudson <jonathan(_at_)daria(_dot_)co(_dot_)uk>:
I recently started using myrealbox.com, mainly for their IMAP
mailboxen. They have implemented RFC 2821 [0] Return-Path: (i.e reverse
('bang') paths). Fetchmail doesn't work too well with this, as it
rewrites bar.com!foo => bar(_dot_)com!foo(_at_)isp(_dot_)com, and passes that 
to the
MTA. Problem if the MUA wants to bounce the message.

Workarounds:

a) Use BSMTP, which does not rewrite Return-Path and uses it verbatim
as MAIL-FROM:

b) set norewrite and apply the following:

--- sink.c.orig Sun Jul 22 13:39:04 2001
+++ sink.c      Sun Jul 22 13:41:24 2001
@@ -642,7 +642,8 @@
                  "%s(_at_)%s", ctl->remotename, ctl->server.truename);
            ap = addr;
        }
-       else if (strchr(msg->return_path, '@'))
+                      /* Add RFC 2821 'bang' paths */
+       else if (strchr(msg->return_path, '@') || strchr(msg->return_path, 
'!'))
            ap = msg->return_path;
        else            /* in case Return-Path existed but was local */
        {

I assume a more complete solution would involve rewriting
rfc822.c/reply_hack. 

Comments? Anyone working on this ? Or I'll have a look at that next. 

[0] Which documents how it seems to contradict what RCC2822 seems to
define

I've applied this patch.  I'll accept a parallel one for reply_hack().
-- 
                <a href="http://www.tuxedo.org/~esr/";>Eric S. Raymond</a>

"Gun control" is a job-safety program for criminals.


<Prev in Thread] Current Thread [Next in Thread>