LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 02-22-2008, 04:55 AM   #1
mks_jangra
LQ Newbie
 
Registered: Oct 2005
Location: Gurgaon
Posts: 7

Rep: Reputation: 0
Sendmail 8.13 on RHEL 4


Hi

We are using Sendmail version 8.13.1 on RHEL 4 and facing mailing problem

Currently, all emails are sent from the mail server in the following
format : UserName@MyServer.MydomainName.com

i.e root@ggns1dev04.hsc.com

We need to have all emails sent using the correct format of :

(UserName@MydomainName.com) i.e root@hsc.com
------------------------------------------------------------------------

Here is mail -v command output

mahesh.sharma@hsc.com... Connecting to [IPAddress_Remote_SMTP_Server] via relay...
220 "HostName_Remote_SMTP_Server".in ESMTP
>>> EHLO "MyServer.MydomainName.com"
250-"HostName_Remote_SMTP_Server"
250-8BITMIME
250 SIZE 10485760
>>> MAIL From:<Root@MyServer.MydomainName.com> SIZE=61
250 sender <Root@MyServer.MydomainName.com> ok
>>> RCPT To:<maheshs@yahoo.com>
250 recipient <maheshs@yahoo.com> ok
>>> DATA
354 go ahead
>>> .
250 ok: Message 2463711 accepted
maheshs@yahoo.com... Sent (ok: Message 2463711 accepted)
Closing connection to [IP_Address]
>>> QUIT

------------------------------------------------------------------------
Could you let me know how can I make the switch please in sendmail ?

Thanks for support in advanced

Thanks & Regards
Mahesh
 
Old 02-22-2008, 08:50 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 10,003

Rep: Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189Reputation: 1189
I don't know the commands for editing the .mc file and running it through the m4 processor (as you really should do), but if you edit your sendmail.cf file, look for the Dj directive. It may be commented out now. If so, make it read:

Dj mydomain.com

You can also try masquerading, with the DM directive, but that needs more than one directive, and you really need to do that through the .mc file.

Check out the documentation:

http://www.sendmail.org/
 
Old 02-22-2008, 10:11 AM   #3
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS
Posts: 370

Rep: Reputation: 38
You should have a line in your sendmail.mc like this:
Code:
MASQUERADE_DOMAIN(`example.com')
then:
Code:
# make -C /etc/mail
# service sendmail restart
assuming you have sendmail.cf installed, the make will fail if you don't have the configuration tools installed.
 
Old 02-25-2008, 03:54 AM   #4
mks_jangra
LQ Newbie
 
Registered: Oct 2005
Location: Gurgaon
Posts: 7

Original Poster
Rep: Reputation: 0
Both the option are not working
 
Old 02-25-2008, 04:17 PM   #5
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS
Posts: 370

Rep: Reputation: 38
try
Code:
>>> MAIL From:<Root@MydomainName.com> SIZE=61
instead of
Code:
>>> MAIL From:<Root@MyServer.MydomainName.com> SIZE=61
 
Old 02-25-2008, 11:25 PM   #6
vedang
Member
 
Registered: May 2006
Posts: 89

Rep: Reputation: 15
Wink sendmail 8.13 in RHEL4

If your mails are going out as user@hostname.domain.com

Then the receiver cannot reply back to you as his mail server cannot find dns record of your mail server. So it must be as user@domain.com

Typically for sendmail 8.13.1 in RHEL4 there are two lines already present in the sendmail.mc configuration file as

dnl # LOCAL_DOMAIN(`localhost.localdomain')dnl
LOCAL_DOMAIN(`vvdesign.com')dnl

dnl # MASQUERADE_AS(`mydomain.com')dnl
MASQUERADE_AS(`vvdesign.com')dnl


two commented lines are for masquerading. Use as per your domain name.
Then use

#m4 /etc/mail.sendmail.mc > /etc/mail/sendmail.cf


And never edit sendmail.cf file manually.

Then restart the sendmail service and observe. It will definitely work But let me know.
 
Old 02-27-2008, 02:16 AM   #7
mks_jangra
LQ Newbie
 
Registered: Oct 2005
Location: Gurgaon
Posts: 7

Original Poster
Rep: Reputation: 0
1. Still problem is same all the mails are going out as user@hostname.domain.com

2. That is OK we want to send the mail as user@domain.com only . Don't want to receiver the reply back.

Thanks
Mahesh
 
Old 02-27-2008, 03:10 AM   #8
vedang
Member
 
Registered: May 2006
Posts: 89

Rep: Reputation: 15
sendmail 8.13.1 problem.

If you try to send a mail with command prompt with

mail -v user@example.com

it will show you fqdn with hostname in mail id of the user if you send any mail from command prompt.

try configuring outlook and try sending a mail through it. It will be delivered with domain nmae only.

i.e. user@example.com

and try sending a reply. Observer if you receive that mail or it bounce back. Letr me know the output of it. I will guide you to solve the problem.

Last edited by vedang; 02-27-2008 at 03:11 AM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail on RHEL - mailing as root; want root@hostname.domain davee Linux - Software 2 07-13-2007 03:30 AM
Login problems with XDMCP from a pre-RHEL-4 client to a RHEL-4 server running KDE cspao Red Hat 0 07-21-2006 06:30 AM
Redhat Linux RHEL 3 Sendmail issue am_raees Linux - Enterprise 2 06-10-2006 02:11 AM
RHEL 4: Webmin 1.22 dont find sendmail base dir.. latino Linux - Networking 0 09-05-2005 12:34 PM
RHEL 4 and Sendmail Corrado Red Hat 1 09-01-2005 03:25 AM


All times are GMT -5. The time now is 04:58 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration