0

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:

VERBOSE=yes
LOGFILE=/var/log/procmailrc


#Allow only certain users to send
:0
* ^From.*support@example.com.*
{}
:0E
/dev/null

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?

bradlis7
  • 353
  • 1
  • 5
  • 16
  • 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

1 Answers1

0

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

bradlis7
  • 353
  • 1
  • 5
  • 16