Think you have a group email ID [alluser] with 500+ aliases.
Boss has declared a bonus for all employee and he wants give the news everyone
by mail. As a mail administrator you request your boss to send a common mail in
alluser@staffs.com and he did that.
Later you found other users started to reply thanks mail to
that ID. For every single reply 500+ mail is generating and everyone is
receiving that mail. So…. How to stop this??
We can restrict those group ID’s so that only specific users
are allowed to send mails to those ID’s. Here’s the how to…………
[We are working with POSTFIX]
Edit the following in main.cf
smtpd_restriction_classes = groupaccessclass1,
groupaccessclass2
groupaccessclass1 =
check_sender_access hash:/etc/postfix/access_groupaccessclass1
reject
groupaccessclass2 =
check_sender_access hash:/etc/postfix/access_groupaccessclass2
reject
smtpd_recipient_restrictions =
hash:/etc/postfix/access_grouprecipient, permit_mynetworks, reject_unauth_destination
[Save and Exit]
***** First Declare smtpd_restriction_classes......... then define
their duties..... then call them by smtpd_recipient_restrictions
Now who is authorized to send mails in group ID’s….
vim etc/postfix/access_grouprecipient
allusers@staffs.com access_groupaccessclass1
managers@staffs.com
access_groupaccessclass2
[Save and Exit]
**** Only access_groupaccessclass1 has permission to send
mail to allusers@staffs.com and
access_groupaccessclass2 has permission to send mail to managers@staffs.com. Who is there in access_groupaccessclass1
and access_groupaccessclass2??
vim /etc/postfix/ access_groupaccessclass1
md@staffs.com OK
ceo@staffs.com OK
[Save and Exit]
vim /etc/postfix/ access_groupaccessclass2
md@staffs.com OK
xyz@staffs.com OK
[Save and Exit]
Now postmap all the created files [access_groupaccessclass1,
access_groupaccessclass2 and access_grouprecipient] in /etc/postfix.
postmap /etc/postfix/access_grouprecipient
postmap /etc/postfix/access_groupaccessclass1
postmap /etc/postfix/access_groupaccessclass2
Check now……..