Offlineimap doesn't get mails when running from cron
tomka at gentoo.org
Mon Jul 28 13:55:33 BST 2014
On 23/07/14 10:07, Niels Kobschaetzki wrote:
> On 23/07, Niels Kobschaetzki wrote:
>> I googled a lot but I just cannot get offlineimap to run from a cronjob.
>> Looking into the logs and exits without an error which doesn't mean
>> anything to me. And of course it doesn't get any mails.
>> */5 * * * * /usr/bin/offlineimap -q -f INBOX -u TTYUI >
>> */20 * * * * /usr/bin/offlineimap -u quiet > /home/user/mycommand.log
>> I want to write into the mycommand.log right now just for
>> debugging-reasons but the file stays empty
>> The output in syslog shows the following:
>> Jul 23 06:08:01 venus CRON: (nik) CMD (/usr/bin/offlineimap -q -f
>> INBOX -u TTYUI >/home/nik/mycommand.log)
>> Jul 23 06:08:02 venus CRON: (CRON) info (No MTA installed,
>> discarding output)
>> Of course I tried basic and quiet as UIs as well.
>> Any ideas?
> It works now. 1) It didn't want to work with gnome-keyring and the fixes
> I found in
> the net, didn't work out for me
> 2) "offlineimap" works from a cronjob while "offlineimap -f INBOX" or
> "offlineimap -q -f INBOX" doesn't work. Logging into the account is no
> problem apparently but offlineimap doesn't get any mails.
Quite generally, if a command works from the commandline, but not
from cron, then it can have to do with the shell environment.
Reaching gnome-keyring via dbus is one example of a thing that
needs special setup to work from cron.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 601 bytes
Desc: OpenPGP digital signature
More information about the OfflineIMAP-project