Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This seems like it should be fairly easy to do, but I've run into a few problems.

I've added a cron job to parse all users whose UID is greater than 500:

## This checks if the passwd file has been updated, and generates
## the .forward file from all users whose UID > 500, excluding nobody.
* * * * *       root /usr/bin/test /etc/passwd -nt ~allusers/.forward \
&& /bin/egrep '([5-9]|[0-9]{2})[0-9]{3}' /etc/passwd | /bin/grep -v 65534 \
| /bin/cut -d ':' -f 1 > ~allusers/.forward

Then I created a .procmailrc file:


#Allow only certain users to send
* ^From.**

But, the .forward file is processed before it even gets to procmail, evidently. If I moved the .forward file to another filename, can I use it in procmail to send an email to the users in this file?

share|improve this question
If there's an easier way to send a mailing list to all users in a system, please let me know. My Google searches are failing me. – bradlis7 Mar 24 '10 at 16:34
up vote 0 down vote accepted

I think we're just going to use a program to do the mailing -- Simple Mailing List. Procmail is just too difficult.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.