LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-21-2018, 03:16 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,461

Rep: Reputation: 122Reputation: 122
Sendmail, why am I not getting FQDN in email address with masquerading off?


I have a host at myhost.mydom.org. I do not have any of the masqerading features turned on in the sendmail.mc file. Yet, when I send a message from a user on this host the sees the from address as user@mydom.org. I am expecting the from address to be user@myhost.mydom.org. Why am I not seeing this?

Yes, I regenerated the /etc/sendmail.cf from the .mc and yes, I restarted sendmail.

The email client is mailx and there is no "set from" in the .mailrc or /etc/nail.rc files.

Last edited by mfoley; 06-21-2018 at 03:20 PM.
 
Old 06-21-2018, 03:21 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 1,800

Rep: Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562
How are you sending the mail? That is, what command or program are you using to send the mail? e.g.: mailx, Thunderbird, etc.
...asked as you answered...

Please show the exact mailx command you used.
What does
Code:
hostname
return?

Last edited by scasey; 06-21-2018 at 03:26 PM.
 
Old 06-22-2018, 02:52 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,272

Rep: Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692
Quote:
Originally Posted by mfoley View Post
I have a host at myhost.mydom.org. I do not have any of the masqerading features turned on in the sendmail.mc file. Yet, when I send a message from a user on this host the sees the from address as user@mydom.org. I am expecting the from address to be user@myhost.mydom.org. Why am I not seeing this?

Yes, I regenerated the /etc/sendmail.cf from the .mc and yes, I restarted sendmail.

The email client is mailx and there is no "set from" in the .mailrc or /etc/nail.rc files.
If it's not masquerading, it could be that you're using genericstable to rewrite the From: address.
 
Old 06-22-2018, 12:47 PM   #4
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,461

Original Poster
Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by scasey View Post
Please show the exact mailx command you used.
What does
Code:
hostname
return?
The exact command is simply 'mail user@thatdom.com'. 'hostname' returns "webserver" (the name of this host).
Quote:
Originally Posted by bathory View Post
If it's not masquerading, it could be that you're using genericstable to rewrite the From: address.
I have no genericstable. However, I do have a smart host defined. The smarthost does have masquerading defined. Could that be it? If so, what if on the smart host I defined:
Code:
EXPOSED_USER(`useridOnOtherHost`)
 
Old 06-22-2018, 04:07 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,272

Rep: Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692
Quote:
I have no genericstable. However, I do have a smart host defined. The smarthost does have masquerading defined. Could that be it? If so, what if on the smart host I defined:

EXPOSED_USER(`useridOnOtherHost`)
Alright, so the rewrite happens on the smarthost.
Use the EXPOSED_USER as above in the smarthost's sendmail.mc, recreate sendmail.cf, restart sendmail and test.
 
Old 06-24-2018, 10:13 AM   #6
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 1,461

Original Poster
Rep: Reputation: 122Reputation: 122
Bingo! That did the trick!
 
  


Reply

Tags
masquerade, sendmail


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
email address stuck in sendmail D0zer Linux - Server 6 11-28-2014 01:05 AM
sendmail masquerading email from address devnull10 Linux - Newbie 4 07-24-2010 07:35 AM
Creating A Second Email Address For Email Account On Sendmail treedstang Linux - Software 1 04-27-2004 10:31 PM
sendmail email address includes localhost name? kevindv10 Linux - Software 0 04-13-2004 01:22 PM
Sending email to a smtp address through sendmail guilmetrp Linux - General 0 02-27-2004 08:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration