[Wylug-help] Fetchmail/procmail question
Stephen Patterson
steve at patter.mine.nu
Wed Aug 22 14:38:17 BST 2007
Anne Wilson wrote:
> For a long time I've used fetchmail/procmail/dovecot for my mail, running
> fetchmail and procmail as user. Now I want to be able to fetch mail for David
> and route it to his mailboxes, which I presume will not be possible when I
> run as user.
>
> I was running fetchmail as a cron job, but have been told that it's better to
> run it as a daemon, so I'm trying that, but this new development is something
> I don't really understand.
>
> Should fetchmail be running as root (I assume that a user fetchmail will not
> be able to write to his mailbox)? Does that mean that procmail also has to
> run as root? I assumed so, but then it begs the question of procmailrc. I
> tried adding a section at the end, changing the user parameters and setting
> his filters, but that doesn't seem to work.
Fetchmail doesn't write to procmail directly unless you have configured
it to do that (with 'mda /usr/bin/procmail' in the fetchmailrc), so a
fetchmail instance can receive mail for multiple local users. Fetchmail
sends (via smtp) to the local smtp mail server which then executes
procmail for each user if they have messages and a .procmailrc
For multi-user systems fetchmail should be running as a daemon
(non-root) with a line in the config file for each remote mailbox you
need to pick up email from.
If his local username is different from his login username at the server
fetchmail downloads from, then you can use the 'user xxx there is yyy
here' syntax in fetchmailrc.
I'd suggest removing his .procmailrc initially to simplify testing.
> I'm obviously missing something important. There's no mail in any of his
> Maildir folders, nor in /var/spool/mail.
It may be worth checking in /var/log, you should see some sign of the
messages here.
In debian, fetmail logs to /var/log/mail.log & exim (the smtp server)
logs to /var/log/exim/mainlog.
--
Stephen Patterson
More information about the Wylug-help
mailing list