I wish to send email to all of my users. My userlist is contained in a txt file
I was previously doing this with an /etc/aliases entry
mylist: :include:/etc/mylist.txt
My problem occur when I recently sent a poll out to my users asking
for a response. Most of my users selected 'Reply To All' instead of
'Reply'. This causing their responses to go back to all users. In
order to prevent this I attempted to hack away at a recipe.
Here is what I attempted and please provide any suggestions or
cleanup that this is in need of
/etc/aliases entry
mytest: mailbot
mylist: :include:/etc/mylist.txt
.procmailrc in /usr/home/mailbot
# Mail to mytest pass if from staff
:0 i
# Line below prevents loops
* !^From.*mytest
* !^FROM_DAEMON
* ^TO.*mytest
* ^FROM.*staff
| mail mylist(_at_)ihs2000(_dot_)com
# No mail to mytest if not from staff
:0 i
# Line below prevents loops
* !^From.*mytest
* !^FROM_DAEMON
* ^TO.*mytest
| (formail -r -t ; cat /usr/home/mailbot/nopass.message) | $SENDMAIL -oi -t
If it's not from staff it works just fine... the problem arises when
it IS from staff.
The mail is sent back to the /etc/aliases file sent to mylist
This hasn't solved my problem since the received email is now
addressed to mylist.
How can I have the first part of the recipe match that it IS from
staff and have it pass the mail along without changing the TO: or
FROM: and adding mylist to the BCC field?
TIA
http://www.ihs2000.com
mailto:hensj(_at_)ihs2000(_dot_)com
Henry Smith
System Administrator