Hello Carlos, hello Per, Am Dienstag, 9. Mai 2017, 07:48:27 CEST schrieb Per Jessen:
Carlos E. R. wrote:
On 2017-05-08 19:02, Wilhelm Boltz wrote:
Hello,
I don't like fetchmail (6.3.26-14.1) logging to an extra logfile without giving the date & time. Setting syslog in fetchmailrc is not the successfull way to get fetchmail log to syslog, it only produces this message: "fetchmail[3045]: syslog and logfile options are both set, ignoring syslog, and logging to /var/ log/fetchmail".
Probably it is caused by systemd-fetchmail-exec in /usr/lib because of the option "-L /var/log/fechtmail". Commenting it out makes fetchmail logging to syslog which can be read by "journalctl -u fetchmail.service".
Because I am DAU (with some experience) I wonder whether next update will overwrite my setting. And, of course, it may be big nonsense what I am doing. Any hints?
Your assumptions are all correct. No nonsense at all. IMO, it is a bug that fetchmail service is set to log to a file, the default should be syslog.
But the default syslog is not syslog at all, but systemd journal. The journal will fill up fast to a huge size with mail reports. You can of course start a standard syslog daemon (I recomend rsyslog), and limit the size of the systemd journal.
You can, however, override a service with your own service with a file of the same name under /etc/systemd/system/, and this will not be overwritten.
The problem is that '-L /var/log/fetchmail' is hardcoded in the startup script. You can write another startup script, and override that in /etc/systemd/system/fetchmail.d/, but that does seem a bit much. The right thing to do would be to fix that startup helper script and move '-L /var/log/fetchmail' into the options so it may be changed by way of /etc/sysconfig/fetchmail.
Still -
copy /usr/lib/systemd-fetchmail-exec to /usr/local/bin/wilhelm-fetchmail-exec remove the '-L /var/log/fetchmail' from that script create /etc/systemd/system/fetchmail.service.d/wilhelm.conf:
------- [Service] ExecStart= ExecStart=/usr/local/bin/wilhelm-fetchmail-exec ---------
systemctl daemon-reload
I followed Per's recommendation and it works well. Thank you very much for your help. And I agree to your statement, Carlos, that a separate logfile shouldn't be the default setting. I know logging goes now to systemctl journal, and it may increase. Do you think a separate logfile will be much smaller than the additional space on systemctl journal? Kind regards Will -- openSUSE Tumbleweed 20170505 GNU/Linux 4.10.13-1-default x86_64 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org