Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the destination

Status
Not open for further replies.

phorbiuz

Technical User
Jul 22, 2004
67
GB
Hi

Further to an earlier question, can anyone enlighten me on the following?

I have 2 boxes running sendmail, 1 of them works OK and 1 doesn't. On the first box if I run sendmail -v I get the successful outcome, with the beginning showing:

root:/ =>sendmail -v james.xxxxx@xxxxx.com
TEST MESSAGE FROM SERVER A
.
james.xxxxx@xxxxx.com... Connecting to xxxxx.ema.itnet.octel. via relay...
220 xxxxx.ema.itnet.octel Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Tue, 18 Mar 2008 11:06:06 +0000
>>> EHLO xxxxx.ema.itnet.octel
250-xxxxx.ema.itnet.octel Hello [10.1.9.18]

Whereas on the server that doesn't work I get the following (note that the destination automaticallly changes to root):

root:/> sendmail -v james.xxxxx@xxxxx.com
TEST MESSAGE FROM SERVER B
.
root... Connecting to [127.0.0.1] via relay...
220 xxxxx. ESMTP Sendmail Tue, 18 Mar 2008 11:12:54 GMT
>>> EHLO xxxxx.
250-xxxxx. Hello loopback [127.0.0.1], pleased to meet you

Somehow, the destination is changing. Anyone any tips? I've even stopped sendmail, copied over the sendmail.cf file from the working server, and restarted sendmail, but I still get the same error.

Thanks.
 
By default, senmail is set to look at only the loopback device for security. You need to open sendmail.mc and look for this line:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

If it is there, change the 127.0.0.1 to the local ip ov the server or delete it all together.

 
Thanks for the reply - I was beginning to think no-one liked me!

Anyway you may be right but there's nothing in there. Checking the mc files in /usr/samples/tcpip/sendmail/cf gives the following:

sendmail.mc
submit.mc

Sendmail.mc has the following entries only:

include(`/usr/samples/tcpip/sendmail/m4/cf.m4')
divert(0)dnl
OSTYPE(aixsample)dnl
FEATURE(genericstable)dnl
FEATURE(mailertable)dnl
FEATURE(virtusertable)dnl
FEATURE(domaintable)dnl
FEATURE(allmasquerade)dnl
FEATURE(promiscuous_relay)dnl
FEATURE(accept_unresolvable_domains)dnl
FEATURE(accept_unqualified_senders)dnl
FEATURE(no_default_msa)
DOMAIN(generic)dnl
define(`confSMTP_LOGIN_MSG', `$j Sendmail $b')
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(uucp)
define(`SMART_HOST', `hoex1')
define(`confPRIVACY_FLAGS',`authwarnings,novrfy,noexpn,restrictqrun')dnl

However, submit.mc does have entries for loopback, albeit not as you describe:

include(`/usr/samples/tcpip/sendmail/m4/cf.m4')
divert(0)dnl
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`aix5')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
define(`SMART_HOST',`mailgw')dnl
define(`MAIL_HUB',`mailgw')dnl
define(`LOCAL_RELAY',`mailgw')dnl
FEATURE(`msp', `[127.0.0.1]')dnl

Any more ideas? I've noticed that 'smart host' is different in both files but I'm not used to a submit.mc.

Thanks.


 
In most cases, you should find /etc/mail/sendmail.mc. Sendmail actually uses a file called sendmail.cf as its configuration file. To build sendmail.cf, it uses the m4 macro compiler. What it does is take all the .mc files you are talking about and combines them with sendmail.mc to produce sendmail.cf. Here is the command to do that:

Code:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

If you open the sendmail.cf file, you will see that it doesn't look anything like sendmail.mc. First of all it's bigger because it has stuff from all those other .mc files but doesn't have those line that are commented out (have dnl in front of them). Remember that any time you make changes to this file, you need to restart sendmail.
 
are the 2 machines hosts file setup in the same manner?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top