Nowhere in this thread did you post any logs. On Thu, May 08, 2014 at 02:11:50PM +0300, Gabor Szabo wrote: > I have just set up an Ubuntu 14.04 and installed postfix using > aptitude install postfix. > When I send an e-mail (as root) to a gmail account it arrives > from root@localhost > > I tried to configure it to send as r...@example.com but the > only way I managed to make it work isn't really right. In > /etc/postfix/main.cf I had > > myorigin = /etc/mailname > and /etc/mailname had example.com in it but that did not help. > I tried setting > myorigin = example.com > and tried > > myorigin = $mydomain > > but I still got the mail from root@localhost.
Yes. My guess (without logs that's all we CAN do, guess) is that whatever software which sent this message set that as a sender address and From: header. That guess is consistent with the masquerade_domains report of success. > The only way I could convince it to send from r...@example.com > was to add > > 162.243.46.210 example.com > > to the /etc/hosts file. This is not really acceptable as > example.com should resolve to another IP address and not to > this machine. > > Am I doing something incorrectly? 1. Posting here without logs. 2. Posting a general "how do I use email" question here. > How could I convince postfix to use the content of mydomain > as the domain name when sending e-mail? Postfix isn't sending this email, merely transporting it. -- http://rob0.nodns4.us/ Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: