I'm working on setting up a new server for sending email and I'm trying to figure out how to configure postfix to send email from 3 different domains. Ideally the nobody user on the server should be able to email using *@domain1.com, *@domain2.com, *@domain3.com just by changing the from field in the email that is being sent.

Incoming email is handled by google apps and port 25 (incoming) on the server is blocked.

2 Answers 2


Postfix appends the value of the main.cf 'myorigin' parameter to unqualified sender addresses. So you should set $myorigin to whichever of 'domain1.com', 'domain2.com' or 'domain3.com' is the normal default.

Postfix doesn't do anything special to prevent any address/domain being used as the sender. You can enforce it if you like using a check_sender_access map in smtpd_mumble_restrictions.

If you want to use the value of the 'From:' header to specify the envelope sender, you can use 'sendmail -t' to trust the headers. Only do this for mail for which you really do trust the headers (i.e., don't use it in content filters where mail may have been BCC-ed or otherwise have headers that don't match the envelope).

As Evan said above, the mynetworks main.cf parameter usually controls which clients can use your server as a relay. See the BASIC_CONFIGURATION_README, SOHO_README or STANDARD_CONFIGURATION_README that comes with your distribution or via http://www.postfix.org/documentation.html.

Local submission via the sendmail command can use '-f' to specify the sender. Do check authorized_submit_users to make sure the nobody user can use local submission. The upstream default is

$ postconf authorized_submit_users
authorized_submit_users = static:anyone

but your distribution may set it to something else by default.


You should be able to configure the "mynetworks" setting to be allowed to send e-mail from whatever IP address you're submitting from (see http://www.postfix.org/postconf.5.html#mynetworks) and be good to go. For example, as long as is allowed to relay if you're submitting mail via SMTP to the local machine, you should be set.

  • 1
    @womble: I appreciate the edit, but if I'm wrong I don't want the rep. points for it. That's just not fair to others. I think I should probably just delete my answer. Jun 19, 2009 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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