Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using postfix + dovecot(imap+pop3) + mysql I whant to explicity define users or groups that can send email on behalf of others I was thinking doing this way: for all local(mysql) authenticated users filter outgoing mail: filter all mail by headers Return-Path/X-Original-To/From: field must matche authenticated user that sends it, otherwise bounce the email

Any ideas how to do this?

share|improve this question

You can use smtpd_sender_login_maps and reject_authenticated_sender_login_mismatch in smtpd_sender_restrictions to restrict which MAIL FROM addresses logged in users can use. For example:

smtpd_sender_login_maps = hash:/etc/postfix/sender_login_maps
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch

/etc/postfix/sender_login_maps:       alice         bob     charlie   alice,charlie

Don't forget to run postmap:

# postmap /etc/postfix/sender_login_maps
share|improve this answer
thanks a lot, it worked! – user118847 May 2 '12 at 10:36

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.