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

fetchmail config question



Hi,

I want to grab emails for a whole domain (fred.com) from a mailbox - 
either POP3 or IMAP, either will do - and forward to Postfix on the 
local domain (insidefirewall.blah) and have the emails distributed to 
the appropriate local accounts. Postfix is set-up with mostly with 
virtual accounts - and a few local /Maildir accounts, as you'd expect.

I've had a look at getmail and fetchmail, but can't understand the 
required config to make this work.

I've no problem connecting to the mail server with, say:

  poll mail.fred.com with protocol pop3
    user marc@fred.com there with password "pa55werd"

but this, of course, dumps everything into one local email account.

I also tried the likes of:

  poll mail.fred.com with protocol pop3 no envelope localdomains 
insidefirewall.blah
    user marc@fred.com there with password "pa55werd" to * here
    smtphost localhost

but this retains the original domain on emails, so sets up an email loop 
when Postfix re-relays the emails.

I understand that I can do what I want one account at a time, but that 
simply increases the admin required in the setup by a couple of orders 
of magnitude. This is not an option.

The fetchmail docs are close to impenetrable, which doesn't help. The 
getmail docs are much, much better, but, as I read them, getmail doesn't 
write to SMTP:25, only directly to Maildir or mbox.

Is there a sane way to do this?

-- 
Best,
Marc



Reply to: