fetchmail running as a daemon, but can't deliver to user's mail box

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

fetchmail running as a daemon, but can't deliver to user's mail box

ze phyr
Hi Debianers,

Sorry to trouble you with this newbie problem:

I installed fetchmail on Debian/Sarge and copied ~/.fetchmailrc as
/etc/fetchmailrc. Then I ran ps aux|grep fetchmail and saw that fetchmail
daemon was running.

But I couldn't get any mail. I thought it was fetchmail configuration problem
then I added 'user foo there is bar here' in /etc/fetchmailrc but still
useless.

I use mutt to collect mail and in my muttrc file, I have this line:

macro index G "!fetchmail -m 'procmail -d %T'\r"

and fetchmail is delivered to procmail but how does that daemon know where to
find ~/.procmailrc and make it for further processing?

What should I configure in order to make fetchmail daemon become
procmail-wise and source ~/.procmailrc?

Thank you.


bxuef
------


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: fetchmail running as a daemon, but can't deliver to user's mail box

Stephen R Laniel
On Sat, Jul 16, 2005 at 01:24:00AM +0800, bxuefeng wrote:
> I use mutt to collect mail and in my muttrc file, I have this line:
>
> macro index G "!fetchmail -m 'procmail -d %T'\r"

You'll want to take this stuff out of mutt. For one thing,
what if another user decides to retrieve his or her mail in
Evolution? Put the procmail command in Postfix or Exim or
whatever MTA you're using.

Now, I've never been clear why -- I'm sure others are -- but
fetchmail can't really run as a global daemon. You can have
each user's copy of fetchmail run as a daemon, and that
works fine. You include that configuration option in
~/.fetchmailrc. My ~/.fetchmailrc looks like so:

poll [mailhost] with proto imap:
        plugin "ssh %h /usr/sbin/imapd" auth ssh fetchall

set daemon 300

which says "Connect via ssh to the remote host every 5
minutes."

Now you can get rid of that mutt command. When you want to
refresh mutt, just press Ctrl+L; it'll check whether there
are any new messages in /var/mail/[username].

> What should I configure in order to make fetchmail daemon become
> procmail-wise and source ~/.procmailrc?

One of the trickiest parts of Linux to get used to is how
all the pieces fit together. Here's a rough sketch:

0) Fetchmail connects to remote server, grabs mail, delivers
it to Exim/Postfix/etc. (generically, "MTA").
1) MTA does its processing.
2) MTA can hand mail off to procmail.
3) Procmail slices and dices your mail, puts various
messages in various boxes, etc. Often messages end up in
user's spool (/var/mail/[username]).
4) mutt checks spool periodically to see whether it's
changed.

Does that help at all?

--
Stephen R. Laniel
[hidden email]
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: fetchmail running as a daemon, but can't deliver to user's mail box

Stephen R Laniel
On Fri, Jul 15, 2005 at 01:34:11PM -0400, Stephen R Laniel wrote:
> Now, I've never been clear why -- I'm sure others are -- but
> fetchmail can't really run as a global daemon.

A Debian developer corrected me on this. Let me just amend
this, then, by saying that *I*, personally, have never
gotten it to work right as a global daemon.

--
Stephen R. Laniel
[hidden email]
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key

signature.asc (196 bytes) Download Attachment