Setting up a cronjob in Webmin

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
fredo
Posts: 37
Joined: Fri Sep 12, 2014 10:09 pm

Setting up a cronjob in Webmin

Post by fredo »

Hello,
I'm trying to set up a cronjob through webmin in order to allow fetchmail to run periodically in retrieving a number of email accounts from a remote server to my zimbra accounts.
It seems the cronjob doesn't start though and i'm having to initiate it manually. :confused:
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Setting up a cronjob in Webmin

Post by phoenix »

I presume you're using the fetchmail icon on the Webmin/Servers page to set this up? You have also set polling enabled? You have also set the 'Schedule Checking'?
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
fredo
Posts: 37
Joined: Fri Sep 12, 2014 10:09 pm

Setting up a cronjob in Webmin

Post by fredo »

[quote user="10330phoenix"]I presume you're using the fetchmail icon on the Webmin/Servers page to set this up? You have also set polling enabled? You have also set the 'Schedule Checking'?[/QUOTE]
Yes mate have set all that but it's not polling by itself.
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Setting up a cronjob in Webmin

Post by phoenix »

On the System/Scheduled Cron Job does it show an entry for fetchmail and is it enabled?
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
fredo
Posts: 37
Joined: Fri Sep 12, 2014 10:09 pm

Setting up a cronjob in Webmin

Post by fredo »

[quote user="10330phoenix"]On the System/Scheduled Cron Job does it show an entry for fetchmail and is it enabled?[/QUOTE]
Yes it shows an entry set as /etc/webmin/fetchmail/check.pl --mail user.name@domain.com --errors
fredo
Posts: 37
Joined: Fri Sep 12, 2014 10:09 pm

Setting up a cronjob in Webmin

Post by fredo »

[quote user="fredo"]Yes it shows an entry set as /etc/webmin/fetchmail/check.pl --mail user.name@domain.com --errors[/QUOTE]
But it doesn't actually run the .fetchmailrc script.
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Setting up a cronjob in Webmin

Post by phoenix »

That's incorrect, it should show the following (if you set this up with the webmin fetchmail module):
/etc/webmin/fetchmail/check.pl --null
It runs that cron job as root not the user.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
fredo
Posts: 37
Joined: Fri Sep 12, 2014 10:09 pm

Setting up a cronjob in Webmin

Post by fredo »

[quote user="10330phoenix"]That's incorrect, it should show the following (if you set this up with the webmin fetchmail module):
/etc/webmin/fetchmail/check.pl --null
It runs that cron job as root not the user.[/QUOTE]
mmm... dunno mate. I'll be trying to dabble with it.
fredo
Posts: 37
Joined: Fri Sep 12, 2014 10:09 pm

Setting up a cronjob in Webmin

Post by fredo »

[quote user="fredo"]mmm... dunno mate. I'll be trying to dabble with it.[/QUOTE]


Yes, the cronjob command i stated above runs as root also. Should i create a cronjob to execute the .fetchmailrc script for each user ? Could this do the trick ?
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Setting up a cronjob in Webmin

Post by phoenix »

It's fairly straight forward using the webmin fetchmail module. I'd suggest you delete that cron job and anything you've created with the fetchmail module and start again. Post back the details when you've done that and describe exactly what you've done (if it doesn't work).
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
Post Reply