Possibly a simple question but I'm trying to lockdown which users can send email from the local machine. I've locked down which ones can receive by running newaliases on an /etc/postfix/allowed_recipients file and setting something similar to
smtpd_recipient_restrictions = hash:/etc/postfix/allowed_recipients, reject
It works, but how can I do the same for sender restrictions?

link|improve this question

67% accept rate
feedback

2 Answers

up vote 1 down vote accepted
smtpd_sender_restrictions = reject_unknown_sender_domain, reject_unlisted_sender, check_sender_access hash:/etc/postfix-internal/localusers, reject

Inside localusers, list each OK address

joe@example.com  OK
fred@example.com  OK

or you can add a domain and then list only blocks

example.com   OK
goofy@example.com       550 Account compromised
stinky@example.com      550 Account closed
link|improve this answer
when I try to use newaliases on that file it complains, is there a better way to generate the .db? – James Lawrie Aug 12 '10 at 15:05
Newaliases is only for alias files, generally /etc/aliases. Postfix files are compiled with postmap command. – labradort Aug 12 '10 at 17:11
feedback

Take a look at the postfix documentation. http://www.postfix.org/RESTRICTION_CLASS_README.html

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.