LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-11-2013, 06:21 PM   #1
YellowApple
Member
 
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95

Rep: Reputation: 37
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.
 
Old 07-11-2013, 07:32 PM   #2
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

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

mydomain = mydomain.tld
myorigin = $mydomain
 
Old 07-12-2013, 12:20 AM   #3
michaelslack
Member
 
Registered: Feb 2013
Location: Sydney
Distribution: slackware
Posts: 110

Rep: Reputation: 36
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
 
1 members found this post helpful.
Old 07-12-2013, 12:52 AM   #4
YellowApple
Member
 
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by michaelslack View Post
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"?
 
Old 07-12-2013, 02:59 AM   #5
YellowApple
Member
 
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95

Original Poster
Rep: Reputation: 37
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
 
Old 07-12-2013, 03:25 AM   #6
michaelslack
Member
 
Registered: Feb 2013
Location: Sydney
Distribution: slackware
Posts: 110

Rep: Reputation: 36
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rewrite sender address in postfix williebens Linux - Server 27 11-07-2014 05:29 AM
[SOLVED] Configuring postfix to send system mail to an external address (DynDNS) pwatk Linux - Server 5 10-07-2014 04:04 PM
[SOLVED] Postfix/Dovecot: Can't receive external eMails, but I can send to an external address Sebi94 Linux - Server 2 07-05-2013 01:07 PM
Change sender address of outgoing emails in Sendmail ALInux Linux - Server 8 05-10-2012 06:25 PM
qmail: how can I block emails which have no sender address? hamish Linux - Networking 0 08-16-2006 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration