0

I recently installed Webmin, Postfix, and Dovecot on a fresh Debian Wheezy system. Everything is working fine, except I'd like to know how I can configure Postfix to not only receive but also send mail from multiple domains.

I have one domain (the default) that sends and receives mail just fine. I have a system user named "joey", and mapped to him is joey@domain1.com. I have another user named "joey.domain2" who has joey@domain2.com mapped to him. I have no problems with receiving mail (I do most through Webmin) - receiving mail addressed to joey@domain2.com will have it delivered to joey.domain2's mailbox just fine. However, when I reply to it, the address appears to the receiver (I test stuff on Gmail) as joey.domain2@domain1.com.

How do I configure postfix so that I can send mail through other addresses rather than the default?

masegaloeh
  • 18,236
  • 10
  • 57
  • 106
Joey Miller
  • 111
  • 5

3 Answers3

1

Bot: convert self-answered-post-in-question-section to CW

Canonical mapping fixed this problem for me.

Putting this line

joey.domain2@domain1.com    joey@domain2.com

in /etc/postfix/canonical allowed me to send mail from Domain 2. I set Webmin to read hash:/etc/postfix/canonical as all three canonical normal/send/receive mapping files.

masegaloeh
  • 18,236
  • 10
  • 57
  • 106
0

I think you should check

http://www.postfix.org/postconf.5.html#append_dot_mydomain 
http://www.postfix.org/postconf.5.html#append_at_myorigin. 

If you have a multiple domains I would suggest to use virtual domains with postfixadmin

ALex_hha
  • 7,193
  • 1
  • 25
  • 40
0

You may use generic to rewrite adresses in outgoing emails from OS accounts.
[ It is equivalent of sendmail's genericstable ]

http://www.postfix.org/generic.5.html

AnFi
  • 6,103
  • 1
  • 14
  • 27