Mombu the GNU Linux Forum

Mombu the GNU Linux Forum > GNU_Linux > fetchmail cron
REGISTER NOW! Mark Forums Read




Reply
 
Thread Tools Display Modes
1 5th September 10:11
jdk
External User
 
Posts: 1
Default fetchmail cron



I'm a recent convert to Gentoo. I followed the console mail tools doc on
the Gentoo site. So I have mutt, nbsmtp, procmail, and fetchmail all
setup and working individually. However, I've tried to setup a cron to
fetch my mail, and can't seem to get it working. If I run my command
from the prompt, it completes normally, fetches my mail, and all is well.
But from the cron job, I never get any mail. The messages log shows that
the cron job is running, with no obvious errors.

Any ideas what I'm doing wrong?

TIA,
jdk


--
gentoo-user@gentoo.org mailing list
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


2 5th September 10:11
filip legeny
External User
 
Posts: 1
Default fetchmail cron



I'd say you have run as daemon option somewhere in your .fetchmail so
the first cron job will execute a deamon and all ohers cra$h because of
this.

if not, you should redirect output to some file and look for errors.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA24rJOpJ/ZbSgnjURAotoAJsE2agtKKj4S8TCVd73jghZ+p9EiwCffF3m
8AWAKhpeQJgdFKCPc4NIaa4=
=WApj
-----END PGP SIGNATURE-----
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


3 5th September 10:11
lukas
External User
 
Posts: 1
Default fetchmail cron


Create a config file etc/fetchmailrc for the mailboxes you wanna check
and add /etc/init.d/fetchmail to your default runlevel.
The default interval between the mailchecks is 120s. You an change this
value by editing /etc/init.d/fetchmail.

cu

lukas

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBA25Dm0OiZ19O5984RAn1hAJsEAlGY49Hg44fjPuSQMB LRnGRxowCffm1y
u4MGDp/e12T2wm4FqaOVzzY=
=zdei
-----END PGP SIGNATURE-----
  Reply With Quote
4 5th September 10:11
pat kerwan
External User
 
Posts: 1
Default fetchmail cron


Is your cron job running as root, instead of as your regular user? - PK


--
gentoo-user@gentoo.org mailing list
  Reply With Quote
5 5th September 10:11
lukas
External User
 
Posts: 1
Default fetchmail cron


/etc/fetchmailrc should have set file permissions to 600 (access
allowed for root only)!

cu

lukas

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBA25KU0OiZ19O5984RAieWAJ9B3Afym2Z1eCzbPpOrxT JqQ4mM1ACeMIRH
eQhlqR4NST3d5z++FKC86uU=
=NI1e
-----END PGP SIGNATURE-----
  Reply With Quote
6 5th September 10:11
brett i. holcomb
External User
 
Posts: 1
Default fetchmail cron


You run fetchmail -d xx where xx is the interval in seconds. Check man
fetchmail. I start mine in /etc/conf.d/local.start with sudo -H -u myname
fetchmail -d 60. Or do rc-update add fetchmail default and it should
start.


--
Brett I. Holcomb

--
gentoo-user@gentoo.org mailing list
  Reply With Quote
7 5th September 14:38
jdk
External User
 
Posts: 1
Default fetchmail cron


Double checked. Not running in daemon mode. That's what I'm specifically
avoiding running as a cron.

jdk


--
gentoo-user@gentoo.org mailing list
  Reply With Quote
8 5th September 14:38
jdk
External User
 
Posts: 1
Default fetchmail cron


I'd rather have it all running from my user cron. Is there a reason it
should not work that way. I looked at the log and find two entries each
time it runs:

Jun 25 05:52:00 starport CRON[28632]: (jdk) CMD (/usr/bin/fetchmail -aKF -f "/home/jdk/.fmfreeshell" -m "/usr/bin/procmail -d )
Jun 25 05:52:00 starport CRON[28631]: (jdk) MAIL (mailed 125 bytes of output but got status 0xffffffff )

I'm not sure what the second line is indicating. I do notice that the
cron command shown above is incomplete. I don't know if that is just
cutoff in the log or it's actually using the wrong command line. The
command is actually:

/usr/bin/fetchmail -aKF -f "/home/jdk/.fmfreeshell" -m "/usr/bin/procmail -d %T"

As you can see, the %T" is cutoff the end. Am I on to something?

TIA,
jdk


--
gentoo-user@gentoo.org mailing list
  Reply With Quote
9 5th September 19:07
greg donald
External User
 
Posts: 1
Default fetchmail cron


Is it possible you are using an editor with cron that is hard wrapping
the long lines?

I dunno if it'll help much but my fetchmail entries looks like this:
0-59/10 9-17 * * 1-5 /usr/bin/fetchmail --syslog -d0 -a -K -t 600 -m
"/usr/bin/procmail -d %T" >/dev/null 2>&1
0-59/30 18-23,0-8 * * 1-5 /usr/bin/fetchmail --syslog -d0 -a -K -t 600
-m "/usr/bin/procmail -d %T" >/dev/null 2>&1
0-59/30 * * * 0,6 /usr/bin/fetchmail --syslog -d0 -a -K -t 600 -m
"/usr/bin/procmail -d %T" >/dev/null 2>&1


--
Greg Donald
http://destiney.com/

--
gentoo-user@gentoo.org mailing list
  Reply With Quote
Reply


Thread Tools
Display Modes







Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
Also visit Ogoun the Usenet Archive
666