Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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
share|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

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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