From: Peter P. <ro...@ri...> - 2020-09-21 06:12:43
|
On Mon, Sep 21, 2020 at 11:56:43AM +1000, Chris James wrote: > Hi, > > I’ve been having issues (potential bug) with the polling interval using fetchmail-6.4.8 > > I’m running FreeBSD 11.3 inside an iocage jail. The package was pulled from the ‘quarterly’ repository, and is the latest currently available from that source. I’ve checked the bug tracker and see nothing related, nor any fix in releases 6-4-9 >> 6-4-12. > > My mail stack is comprised of: > > - fetchmail > - postfix > - rspamd > - dovecot > > The full stack has been operating for months with no issues. > > Fetchmail is running in daemon mode, with the config file located at: > > /usr/local/etc/fetchmailrc > > … and (redacted) contains: > > set daemon 180 [snip] > > This adds a time stamp to the log file for every fetch. There are other mailboxes that pull from the same server using essentially the same config (sans the ‘preconnect’ assertion). > > >>> BEHAVIOUR >>> Changing the value of “set daemon” in /usr/local/etc/fetchmailrc has no effect - fetchmail continues to poll every 900 seconds, irrespective of the value set here. I have made repeated changes to the interval (300 seconds, 180 seconds, 120 seconds, 60 seconds) with service fetchmail restart issued after each change, but the polling interval remains at 900 seconds. > > However, editing the file: /usr/local/etc/rc.d/fetchmail > … and changing > > : ${fetchmail_config="/usr/local/etc/fetchmailrc"} > ${fetchmail_polling_interval=“900"} > > … to > > : ${fetchmail_config="/usr/local/etc/fetchmailrc"} > : ${fetchmail_polling_interval="300"} > > … causes the polling interval to change to 300 seconds, irrespective of the value specified in the /usr/local/etc/fetchmailrc settings file. Thus, it appears that when the daemon starts, it correctly loads the configuration from the fetchmailrc file (since it pulls emails according to the config) but subsequently overrides the polling interval with the setting in /rc.d/fetchmail. The fetchmail manual page states that command-line options override configuration file defaults. The startup script for the fetchmail service must pass -d to make sure that fetchmail starts in daemon mode, and since -d requires an argument, the startup script must pass one - and it uses the value from its own config file. Thus, whatever you put in the fetchmail config file will be silently ignored. G'luck, Peter -- Peter Pentchev ro...@ri... ro...@de... pp...@st... PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 |