Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fetchmail Type Question



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




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org