Fetchmail question

Rasjid Wilcox rasjidw at openminddev.net
Sun Jul 14 14:31:23 EST 2002


On Sun, 14 Jul 2002 1:05 pm, Ian Matters wrote:
> I've installed Fetchmail and can get it to retrieve mail from my ISP's mail
> server without any trouble.
>
> Just to cause myself extra pain I decided to see if I could get it to allow
> multiple local users to use a single maildrop and get Fetchmail to forward
> messages to the appropriate local user.  According to the Fetchmail manual
> page I think that I should be able to do this.  Here's what I think to be
>
> the relevant  excerpt from the manual page:
> >Here's  what a simple retrieval configuration for a multi-
> >drop mailbox looks like:
> >
> >   poll pop.provider.net:
> >         user maildrop with pass secret1 to golux 'hurkle'='happy' snark
> > here
> >
> >This says that the mailbox of account  `maildrop'  on  the
> >server is a multi-drop box, and that messages in it should
> >be parsed for the server user names 'golux', `hurkle', and
> >'snark'.   It  further  specifies that 'golux' and `snark'
> >have the same name on the client as  on  the  server,  but
> >mail  for  server  user  'hurkle'  should  be delivered to
> >client user 'happy'.
>
> I would like Fetchmail to send messages to user1 at mydomain.com to the local
> user "user1", messages to user2 at mydomain.com to the local user "user2" and
> all other messages sent to mydomain.com to be forwarded to the local user
> "user3".  What is the appropriate syntax for the .fetchmailrc file?  ANy
> help would be appreciated.

I'm pretty sure what you want is the next example:
|	poll pop.provider.net localdomains loonytoons.org toons.org:
| 		user maildrop with pass secret1 to 'esr' * here

perhaps:
	poll pop.provider.net localdomains mydomain.com
		user maildrop with pass secret to * here

and then set up your local mail server or MDA to deliver any mail with an 
unknown username to "user3".  (I'm not quite sure what the 'esr' does in the 
above example from the man page.)

Beware: Read "THE USE AND ABUSE OF MULTIDROP MAILBOXES" carefully.  Unless the 
MTA you are polling creates an 'X-Envelope-To' (or equivalent) header, BCC 
and List mail will generally be delivered to "user3", even if "user1" or 
"user2" is the list subscriber or intended recipient, and in some cases BCC 
mail will get lost altogeher.  (In particular, if mail is addressed to User1, 
with User2 as BCC, then it will never be delivered to User2.  Also, and 
potentially worse, if mail is BCC'ed to User2 but with no other local 
recipients, it will be delivered to User3 instead.  This could be very bad in 
an office setup.)

If you are okay with all BCC and List mail going to 'User3' (regardless of who 
it is meant to go to) then the above setup will be okay.  If this is not 
okay, then you need to get the MTA that delivers to the POP3 mailbox to 
insert an 'X-Envelope-To' header into each and every mail delivered to that 
POP3 mailbox.  If you are running your own mail-servers, then this should not 
be too hard.  If you are going through your ISP's mail-servers, then it could 
be difficult.

Rasjid.





More information about the linux mailing list