Sign up ×
Server Fault is a question and answer site for 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  OK  OK

or you can add a domain and then list only blocks   OK       550 Account compromised      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 L 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.

share|improve this answer

Your Answer


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.