RE: [SLE] Fetchmail setup
Hi, Haven't heard from anyone on the following (from last Friday) and it's still giving me a bellyache. Can anyone help with this?
Hi, I'm looking through the suse docs and one of them is a script which checks mail via fetchmail on a regular basis.
To make sure that things were generally working and configured right, I set up a file /root/.fetchmailrc and ran it and it worked like a charm.
Now I get to the script. It says this:
case "$1" in start) echo -n "Starting fetchmail-daemon" /usr/bin/fetchmail -d 900 -a -f /etc/fetchmailrc -L /var/log/fetchmail 2>&1 || return=$rc_failed echo -e "$return" ;; stop) echo -n "Shutting down fetchmail-daemon" /usr/bin/fetchmail -quit || return=$rc_failed echo -e "$return" ;; *) echo "Usage: $0 {start|stop}" exit 1 esac exit 0
And then it says this:
The file to which the -f option points must be the .fetchmailrc of the user who has to fetch the mail.
Hmmm. I suppose I'm asking is root the user who has to fetch the mail?
Right now it has me at /root/.fetchmailrc, bu the script which suse provides asks me to "edit /etc/fetchmailrc" (I suppose with the same information about users, passwords and procmail) - but is that being run as ROOT or as USER?
(You all know that the next questions will be about procmail and spastic!!)
TIA, Nick
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com
On Monday 06 May 2002 16:11, Nick Selby wrote:
Hi, Haven't heard from anyone on the following (from last Friday) and it's still giving me a bellyache. Can anyone help with this?
Hi, What do you get if you do "ls -l /etc/fetchmailrc" ? The file has to be rw------- if fetchmail is to accept it. If it isn't, do "chmod 600 /etc/fetchmailrc" and try starting rcfetchmail again regards Anders
Hi, On Monday 06 May 2002 16:18, Anders Johansson wrote:
What do you get if you do "ls -l /etc/fetchmailrc" ?
The file has to be rw------- if fetchmail is to accept it.
Yup. Did that. It Is rw------- . Here's the file /etc/fetchmailrc with mail server details fudged - NOTE: my mail server requires the user name as user@domain.com) poll mail.foo.com protocol POP3 user user@foo.com password seCRET mda "/usr/bin/procmail -d nick" Here's the file /etc/init.d/fetchmail #! /bin/sh #opyright (c) 1996-2000 SuSE GmbH Nuremberg, Germany. All rights reserved. # # Authors: Klaus Franken # Björn Jacke # # /etc/init.d/fetchmail # # please edit /etc/fetchmailrc and make a chmod 600 /etc/fetchmailrc # ### BEGIN INIT INFO # Provides: fetchmail # Required-Start: $network # Required-Stop: # Default-Start: 3 5 # Default-Stop: # Description: run fetchmail in daemon mode ### END INIT INFO . /etc/rc.config return=$rc_done case "$1" in start) echo -n "Starting fetchmail-daemon" /usr/bin/fetchmail -d 300 -a -f /etc/fetchmailrc -L /var/log/fetchmail 2>&1 || return=$rc_failed echo -e "$return" ;; stop) echo -n "Shutting down fetchmail-daemon" /usr/bin/fetchmail -quit || return=$rc_failed echo -e "$return" ;; *) echo "Usage: $0 {start|stop}" exit 1 esac exit 0 The daemon is running (I see it shutdown on reboot) Is the 300 in /usr/bin/fetchmail -d 300 -a -f /etc/fetchmailrc the time in seconds between pollling of the mail server? Ihope? TIA, Nick
On Monday 06 May 2002 18:36, Nick Selby wrote:
The daemon is running (I see it shutdown on reboot)
OK, so what's the problem? Isn't it fetching the mail?
Is the 300 in /usr/bin/fetchmail -d 300 -a -f /etc/fetchmailrc the time in seconds between pollling of the mail server? Ihope?
Yup, that's exactly what it is. //Anders
On Monday 06 May 2002 18:36, Nick Selby wrote:
The daemon is running (I see it shutdown on reboot)
OK, so what's the problem? Isn't it fetching the mail? Hmmm. I think not. I set up KMail with a local mailbox, pointing to /var/mail/nick and each time I have checked that box it's said that no messages were
At 05:02 PM 5/6/2002 +0200, you wrote: there. The only thing I see that looks weird is that KMail defaulted to Procmail lockfile=/var/mail/nick.lock which does not exist. Could that be my problem. Well, I guess I mean my problem with THIS particular issue? TIA, NIck
Is the 300 in /usr/bin/fetchmail -d 300 -a -f /etc/fetchmailrc the time in seconds between pollling of the mail server? Ihope?
Yup, that's exactly what it is.
//Anders
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com
On Monday 06 May 2002 17:07, Nick Selby wrote:
Hmmm. I think not. I set up KMail with a local mailbox, pointing to /var/mail/nick and each time I have checked that box it's said that no messages were there. The only thing I see that looks weird is that KMail defaulted to
Procmail lockfile=/var/mail/nick.lock
This is a file that procmail creates when it is writing to the spool file. It only exists to tell other programs that the file is "busy".
which does not exist. Could that be my problem. Well, I guess I mean my problem with THIS particular issue?
Try adding "set logfile /var/log/fetchmail.log" in the fetchmailrc and restart fetchmail. Then check the logfile to see what's really happening. regards Anders
participants (2)
-
Anders Johansson
-
Nick Selby