Re: Fetchmail revisited
From: Preben Traerup (invalid_at_invalid.invalid)
Date: Tue, 05 Jul 2005 16:58:21 +0200
Martin Blume wrote:
> "Phil Da Lick!" schrieb
>>All mail to mydomain is put into one mailbox at my isp. I
>>think they call it host based mail. Anyhow, fetchmail
>>should retrieve it all and pass it on unmodified for the
>>local smtp server to sort based on the usernames before
>>the @ in the domain. Seems simple enough to me.
> That one is new to me, "host based mail". Don't know if
> fetchmail supports that.
It can be done kinda piece of cake,
read about how to use MTA option in fetchmail...(*)
This option makes fetchmail to forward each and every mail to
a script written by you rather than handing it to the MTA untouched. In
this script, you decide who realy should receive this mail locally and
you make the (sendmail -f and a bunch of other arguments) MTA call.
I know for SUSE it is postfix which is the MTA, but postfix should be
able to do the same, just a matter of RTM and google.
I used a (buggy) perl script on the net as a sample, but might be able
to find my old script again together with the fetchmail configuration.
(*) fetchmail I used to do this trick was on FreeBSD 5.0, but I think
the option still lives. The hardest part is to get the script right
because one need to parse the mail header.
AND I did help the sorting a bit because at my ISP I'm allowed to
have aliases to the same mailadress
thus email@example.com goes to firstname.lastname@example.org
email@example.com goes to firstname.lastname@example.org
This made the script less complicated....