fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]Fetchmail + Amavis: send address problem

2004-05-04 00:29:39
On Tue, May 04, 2004 at 08:36:08AM +0200, Julien V. wrote:
My problem is that is works perfectly wy my own local domain, but not for
e-mails that come fomr fetchmail. In the latter case, the address becomes
: julien(_at_)localhost (and not for example the original address
julien(_at_)skolelinux(_dot_)no)
The headers show the right address (Return-path :) but the envelope:
header is always julien(_at_)localhost

It's not clear what you mean in the above.

An SMTP envelope has two components:
  - the return path          MAIL FROM:<...>
  - the recipient(s)         RCPT TO:<...>

Which of these is wrong?

When passing a mail to your MTA (exim), fetchmail *will* rewrite the
_recipient_ to ensure the message is delivered. For example, mail going to
'julian(_at_)localhost' is normal. You can change this with the 'is' setting.

However this is definitely correct behaviour. If incoming mail arrives at a
POP3 mailbox with envelope julien(_at_)skolelinux(_dot_)no, you almost never 
want
fetchmail to send it out with RCPT TO:<julien(_at_)skolelinux(_dot_)no>, 
because that
would make your exim configuration deliver it back to the POP3 mailbox.
That's unless you're doing some nasty tricks, such as both machines thinking
that their own domain is 'skolelinux.no', which often leads to problems.

If it were me, I would configure my end machine as 'laptop.skolelinux.no'
say, and get fetchmail to deliver to julien(_at_)localhost or
julien(_at_)laptop(_dot_)skolelinux(_dot_)no(_dot_) I'd then configure my MUA 
to send outgoing mail
as "From: julien(_at_)skolelinux(_dot_)no" instead of "From: 
julien(_at_)laptop(_dot_)skolelinux(_dot_)no"
so that replies went to the POP3 mailbox instead of direct to the laptop.

However, none of this has anything to do with the Return-Path: header,
because that's where the envelope SENDER (MAIL FROM) is stored once a
message has been delivered to the maildrop.

There *is* a bug (in my opinion) in fetchmail, where messages with an empty
envelope-sender have a fake one made up by fetchmail. e.g. if you receive a
bounce with

    Return-Path: <>
    From: mailer-daemon(_at_)example(_dot_)com

Then fetchmail sends it as

    MAIL FROM:<mailer-daemon(_at_)example(_dot_)com>

instead of the correct

    MAIL FROM:<>

This causes problems, but I'm not sure if it's the one you're referring to.

For the example, here are the full headers of the e-mail confirming my
subscription to this mailing list:
Envelope-to: julien(_at_)localhost
Delivery-date: Tue, 04 May 2004 08:20:19 +0200

Since you withheld the Return-Path: header, I can't tell whether that's the
problem you're referring to.

Brian.