Are you facing the error, Procmail: Suspicious rcfile message?
This guide is for you.
Recently we had a customer who came across the error, Procmail: Suspicious rcfile message while trying to run fetchmail for each mail message.
Procmail is a program for filtering, sorting and storing email. It can be used both on mail clients and mail servers. It can be used to filter out spam, checking for viruses, to send automatic replies, and so on.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix Ubuntu packages errors.
Nature of Procmail: Suspicious rcfile message
An autonomous mail processor, Procmail invoke automatically over the .forward file mechanism as soon as mail arrives.
Once it arrives it will start to look for the file, $HOME/.procmailrc.
The rcfile can contain a mixture of environment variable assignments and recipes.
Our customer received this message:
#*****procmail: Suspicious rcfile “/home/user/.procmailrc”
procmail: Couldn’t read “/home/user/.procmailrc”
Though it is not a big issue, it relates to file permission.
Procmail usually gives this error if:
i. The .procmailrc is owned by someone other than the user or root, or is world-writable (independent of who owns it); and
ii. It's not /dev/null; and
iii. The directory is both world-writable and world executable but not ‘sticky’ (mode +t).
How to fix the error, Procmail: Suspicious rcfile message ?
To fix this error, use the chmod command:
$ chmod 0640 /home/user/.procmailrc
$ chmod 0640 ~/.procmailrc
We make sure the user owns the .procmailrc file and not someone else:
$ ls -al ~/.procmailrc
If the file is not owned by the user, we use chown command to setup correct ownership:
# chown user:user ~/.procmailrc
Finally, we make sure that our home directory belongs to us alone:
$ ls -ald ~
We use chown to setup correct group permission on our home directory:
# chown user:user /home/user