Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Even though my postfix server cannot be used without authentification (open relay), sending mail in another users name after logging in is still possible like this:

auth plain eW91IGxpdHRsZSBkaXJ0eSBiYXN0YXJkIDstKQ==
235 2.7.0 Authentication successful
mail from:
250 2.1.0 Ok
rcpt to:
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
Please send me your account info.
250 2.0.0 Ok: queued as D40692A61AA

How can this be prevented?

share|improve this question
up vote 5 down vote accepted

In your

smtpd_sender_restrictions =

you should have (possibly among other things):


You must have smtpd_sender_login_maps defined to provide a username to email address mapping.

share|improve this answer
This looks very promising, thank you! I suppose it is also possible to specifically allow a certain user to send using another users name? (For example, when acting as a relay host) – Zulakis May 25 '13 at 17:20
Yes, if you put them in the aforementioned login map. – Michael Hampton May 25 '13 at 17:21
That's exactly what I was looking for. Thanks! – Zulakis May 25 '13 at 17:22

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.