LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Emails from postfix to external address display sender as 'user@mail.example.net' (http://www.linuxquestions.org/questions/slackware-14/emails-from-postfix-to-external-address-display-sender-as-user%40mail-example-net-4175469330/)

YellowApple 07-11-2013 06:21 PM

Emails from postfix to external address display sender as 'user@mail.example.net'
 
I'm betting this is a ridiculously stupid question. Here goes.

I'm setting up a very basic personal mail server on Slackware64 13.37 using postfix (obtained from slackbuilds.org). I can send mail to user@mydomain.tld just fine from anotheruser@remotedomain.tld using Outlook. Everything processes correctly.

However, when sending mail *from* user@mydomain.tld using mutt on the mailserver, anotheruser@remotedomain.tld receives the message fine, except that instead of the expected 'user@mydomain.tld', the sender is displayed as 'user@mail.example.net'.

Right now, /etc/postfix/mail.cf is minimal:

Code:

myorigin = mydomain.tld
myhostname = mail.mydomain.tld
relay_domains = mydomain.tld mail.mydomain.tld localhost.localdomain localhost

I can see that the @mail.example.net domain is being pulled as part of mail postfix/cleanup, as per /var/log/maillog:

Code:

Jul 11 23:15:33 mail postfix/pickup[7146]: DBC3F6F72030: uid=1000 from=<user>
Jul 11 23:15:33 mail postfix/cleanup[7155]: DBC3F6F72030: message-id=<20130711231533.GA7150@mail.example.net>
Jul 11 23:15:33 mail postfix/qmgr[7147]: DBC3F6F72030: from=<user@mydomain.tld>, size=497, nrcpt=1 (queue active)
Jul 11 23:15:35 mail postfix/smtp[7157]: DBC3F6F72030: to=<anotheruser@remotedomain.tld>, relay=mail.remotedomain.tld[xxx.xxx.xxx.xxx]:25, delay=1.6, delays=0.14/0/1.2/0.34, dsn=2.0.0, status=sent (250 ok:  Message 4156662 accepted)
Jul 11 23:15:35 mail postfix/qmgr[7147]: DBC3F6F72030: removed

So, what am I missing here? Where is this being set, and why isn't the myorigin variable in main.cf not overriding it? Or *should* it be overriding it? Maybe my sendmail didn't build right? Perhaps mutt is misbehaving? It looks as if it has something to do with the message-id.

If this turns out to be something stupidly simple, please send me your address so I can send you a beer.

gdizzle 07-11-2013 07:32 PM

No idea why your myorigin is not working however, you could try:

mydomain = mydomain.tld
myorigin = $mydomain

michaelslack 07-12-2013 12:20 AM

It may not be a postfix configuration issue at all.

When installing slackware, the ``default'' domain name that it suggests, if you choose to configure your network, is example.net.

Try running netconfig (as root) and entering the desired domain name there, reboot etc and then see what happens.

Michael

YellowApple 07-12-2013 12:52 AM

Quote:

Originally Posted by michaelslack (Post 4988848)
Try running netconfig (as root) and entering the desired domain name there, reboot etc and then see what happens.

Please send me your address so I can mail the beer I promised. Damn OpenVZ templates... I knew it was going to be something silly. Thank you.

So that fixed the original problem. However, there's still a bit of a nitpick: anotheruser@remotedomain.tld now sees "user@mail.mydomain.tld", since that's what's now appearing with the message-id according to /var/log/maillog; is there a way to make it just "user@mydomain.tld"?

YellowApple 07-12-2013 02:59 AM

Actually, never mind that last bit; including the hostname of the server itself is mutt misbehaving. Bad mutt! Bad!

Anyway, marking as solved. Thanks, Michael, for reminding me to always second-guess VPS hosts and their ability to provide a proper Slackware template ;)

michaelslack 07-12-2013 03:25 AM

It's a pleasure! There's no need to send beer, I've had enough already for three lifetimes. If you are itching to send beer though, please send it to Pat Volkerding with my regards. I believe he used to like receiving beer at one point. He is celebrating slackware's 20th birthday today.

Cheers,

Michael


All times are GMT -5. The time now is 08:10 AM.