Procmail Suspicious rcfile message








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”
not flushed

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

OR

$ 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


[Couldn't resolve Linux related errors? We are here for you. ]



Conclusion

This article covers how to resolve the error, Procmail: Suspicious rcfile message, though not a big issue, relates to file permission.
Procmail is autonomous mail processor.
#Procmail should be invoked automatically over the .forward file mechanism as soon as mail arrives.
It starts to look for a file named $HOME/.procmailrc.

formail is a filter that can be used to format mail into mailbox format
lockfile is a utility that can lock a file for single use interactively or in a script
mailstat prints a summary report of mail that has been filtered by procmail since the last time mailstat was ran
procmail is an autonomous mail processor. It performs all the functions of an MDA (Mail Delivery Agent)

The rcfile can contain a mixture of environment variable assignments (some of which have special meanings to procmail), and recipes.
This is not really a big problem. It is related to file permission.
Use chmod command (change file access permissions) to fix problem (assuming that your user name is vivek):
$ chmod 0640 /home/you/.procmailrc
OR
$ chmod 0640 ~/.procmailrc

Further, make sure the .procmailrc file is owned by you and not by someone else:
$ ls  ~/.procmailrc

If file is not owned by you then use chown command to setup correct ownership (if your user name is vivek):
# chown ibmimedia:ibmimedia ~/.procmailrc

Finally make sure your home directory belongs to you only:
$ ls ~

Use chown to setup correct group permission on your home directory:
# chown ibmimedia:ibmimedia /home/ibmimedia


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com