How to filter mail for a mailing list – RHEL6U2

So the *#?@ I had to do for the mail account that is a mailing list with some 150 addressess, for it to forward mail ONLY from my domain, and to delete other messages is this :
Mail list account is list1@my.domain
In /home/list1 you put two files :
.forward – in it is only one line, which is used to call up Procmail (in earlier versions of RHEL that was done automatically, here it is not, and reasons are a mystery to me) :
|exec /usr/bin/procmail
.procmailrc :
* ^(To).*(list1@my.domain)
* !^(From).*(my.domain)
* ^(To).*(list1@my.domain)
! user1@domain1 user2@domain2 user3@domain3

NOTE!!!! There is a limit of addressess to which the mail may be forwarded (I do not know what it is, but it is smaller than 120).
Solution is to do filtering on account1, and forward mail to account2, from which you do classicxal .forward-ing.

In /home/list1 manually make file, with characteristics :
-rwxrwxrwx 1 root root 2896 May 29 10:08 procmail.log

This entry was posted in Linux and tagged , . Bookmark the permalink.

Comments are closed.