Red Hat Bugzilla – Bug 187976
Annoying warning messages
Last modified: 2007-11-30 17:11:29 EST
Description of problem:
I run fetchmail periodically from /etc/crontab:
02 7,13,19 * * * root /usr/bin/fetchmail -f /etc/fetchmailrc
to collect mail from a number of disparate Internet maildrops for a number of
users for local redistribution, virus and spam scanning. It has worked
flawlessly and _quietly_ since about RH7.2.
Every run now emits a nicely formatted message to root informing me "fetchmail:
WARNING: Running as root is discouraged.".
The documentation describes how to run fetchmail as root to do exactly what I
need but offers no alternative configuration to avoid the "discouraged" use or
disable the message.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Set up a 'fetchmailrc', owned by root, mode 600, named /etc/fetchmailrc.
2. Run 'fetchmail -f /etc/fetchmailrc' as root.
3. Check the maildrop for root.
A nice warning message from fetchmail in both text and HTML.
NO MESSAGE! It did what I asked so there's no need to tell me. Maybe a warning
note in the changelog?
line #168 of fetchmail.c from fetchmail-126.96.36.199-1.2.src.rpm
Warning message is generated before syslog is set up and without checking any
arguments or configuration file settings. i.e. there's no way to turn it off.
The alternative is to run fetchmail using an unprivileged user account, preferably
an account designated purely for fetchmail. fetchmail in most configurations
doesn't need to be run as root; therefore using an unprivileged account limits the
possible damage, should a bug in fetchmail be exploited.
In this case the message seems to have the intended effect of encouraging
you to change the system setup :)
Another reason to switch is
OK, fair enough.
Not as much work as I suspected.
Now tested and working under a non-root user id.