Procmail Mailing List (With Access Control)

Posted by bradlis7 on Server Fault See other posts from Server Fault or by bradlis7
Published on 2010-03-24T16:30:29Z Indexed on 2010/03/24 16:33 UTC
Read the original article Hit count: 392

Filed under:
|

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 5000:

* * * * *       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.*[email protected].*
{}
: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?

© Server Fault or respective owner

Related posts about procmail

Related posts about mailing-list