Fetchmail Type Question
Nathan Meyers
nmeyers at javalinux.net
Tue Jul 9 18:25:03 EDT 2002
On Tue, Jul 09, 2002 at 05:31:14PM -0400, John Abreau wrote:
> Jon <ghia at ccs.neu.edu> writes:
>
> > I was thinking
> > that I would rather set up a general mailbox on my web-hosting ISP
> > (xeran.com) and then setup a program like fetchmail to pop
> > that one mailbox and deliver the mail to separate accounts on my
> > mail server at home. Is this possible?????
> >
> > IE. Email for jon, bill, and ed all end up at bigbox at xeran.com
> > and then I pop bigbox and deliver the mail to jon at home, bill at home and
>
> Yes, that's possible. You can use procmail to separate the incoming mail;
> I believe sendmail and postfix on Redhat 7.x both use procmail for
> local delivery, so I'd guess it's as simple as setting up a .procmailrc
> in the home directory of the user that fetchmail runs as.
There's one complication: the name of the recipient doesn't always appear
in the standard headers. For example: if you're on a mailing list or
receive a BCC, your name may not appear anywhere in the mail. So sorting
the mail from bigbox may be challenging.
Fortunately, there's an option with most mailers to add a special header
that identifies the targeted recipient. That header is commonly called
X-Envelope-To, which is easily handled by fetchmail (see the --envelope
option on the fetchmail man page). You need to add that header at the
final mailer - the one that mixes the mail.
The trick is how to get the header added. At my last ISP, I had to ask
them to set a sendmail option for my mailbox - it resulted in setting an
environment variable that I could use in my own ~/.procmailrc recipes (at
the ISP) to add the header before the mail was dropped into the big box.
Nathan Meyers
nmeyers at javalinux.net
More information about the Discuss
mailing list