1831420 Members
3173 Online
110025 Solutions
New Discussion

Sendmail -- plz help

 
SOLVED
Go to solution
Maaz
Valued Contributor

Sendmail -- plz help

smtp server is ssendmail

I have two mail domains, both are maintained/configure on separate machines
Sendmail 8.x is used as smtp or MTA.

one is smtpC.abc.com(IP: 10.0.0.55), mail server for abc.com
and
second is smtpZ.xyz.com(IP: 10.0.0.100) mail server for xyz.com domain

now if a user say a@abc.com mails to b@abc.com ... success
now if a user say c@xyz.com mails to d@xyz.com ... success

but if a@abc.com mails to d@xyz.com ... failure


on smtpC.abc.com (Sender)
---------------
tail -f /var/log/maillog

Jan 8 16:44:20 smtpC Sendmail[2484]: K088hrwL002483: SYSERR(root): smtpZ.xyz.com. config error: mail loops back to me (MX problem?)


Jan 8 16:44:20 smtpC Sendmail[2484]: K088hrwL002483: to=, ctladdr= (507/508), delay=00:00:15, xdelay=00:00:15, mailer=esmtp, pri=60555, relay=smtpZ.xyz.com [10.0.0.50], dsn=5.3.5, start=Local config error

Jan 8 16:44:20 smtpC Sendmail[2484]: K0Bhnwl002483: K088ikwl002484: DSN: Local Config error

and root received mail which contains following message

---The following adress had permanent fatal errors ----

(reason: 533 5.3.5 system config error)


on smtpZ.xyz.com (Rece...








13 REPLIES 13
Vitaly Karasik_1
Honored Contributor

Re: Sendmail -- plz help

what is your DNS setup for these two domains?
e.g., I'd like to see output of

host -t mx abc.com
host -t mx xyz.com
Maaz
Valued Contributor

Re: Sendmail -- plz help

Thankx Dear Vitaly Karasik

DNS is working JUST fine

host -t mx abc.com
abc.com mail is handled by 10 smtpC.abc.com

host -t mx xyz.com
xyz.com mail is handled by 10 smtpZ.xyz.com

Regards
Maaz
Maaz
Valued Contributor

Re: Sendmail -- plz help

I m sure DNS is not the issue here, because I have tested it with 'host -t mx domainname' command and its also clear that when a@abc.com tries to send mail to d@xyz.com, the mail server for abc.com i.e smtpC.abc.com(Sender/forwarder) succesfuly hit/access the mail server for xyz.com i.e smtpZ.xyz.com(Receiver) and that is confirm/varified with the following output(this output comes when smtpC.abc.com tries to forward mail to d@xyz.com)

on smtpZ.xyz.com (Receiver)
---------------
tail -f /var/log/maillog

Jan 8 16:44:20 smtpZ Sendmail[2484]: K086j0wl002484: [10.0.0.99] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

Regards
Maaz
Steven E. Protter
Exalted Contributor

Re: Sendmail -- plz help

Couple of tricks.

You need to see that your MX records in DNS permit routing of mail like you expect it to route.

Next you may need to do a sendmail macro or the complex sendmail.cf equivalent of one of these tricks.

Cwnapervilleapartments.com

Enables the sendmail daemon to accept mail from in this example napervilleapartments.com

MASQUERADE_DOMAIN(napervilleapartments.com)dnl

Same trick here. I do not know if both are needed, I do both because I don't normally have time to futz around.

If the MX records permit the routing and the sendmail daemon is configured, the server should accept the mail.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vitaly Karasik_1
Honored Contributor

Re: Sendmail -- plz help

>second is smtpZ.xyz.com(IP: 10.0.0.100) >mail server for xyz.com domain

>but if a@abc.com mails to d@xyz.com ... >failure

>on smtpC.abc.com (Sender)
>---------------
>tail -f /var/log/maillog

>Jan 8 16:44:20 smtpC Sendmail[2484]: >K088hrwL002483: to=, >ctladdr= (507/508), >delay=00:00:15, xdelay=00:00:15, >mailer=esmtp, pri=60555, >relay=smtpZ.xyz.com [10.0.0.50], dsn=5.3.5, >start=Local config error

I don't understand why we see 10.0.0.50 in maillog. May be make sense to check DNS and /etc/hosts on both servers again?
Maaz
Valued Contributor

Re: Sendmail -- plz help

and yes Vitaly Karasik i had make some errors in posting maillog .. plz check the following to understand my prblm... tHanKs


smtpC.abc.com IP: 10.0.0.6
smtpZ.xyz.com IP: 10.0.0.5


on smtpC.abc.com (Sender)
---------------
tail -f /var/log/maillog

Jan 8 16:44:20 smtpC Sendmail[2484]: K088hrwL002483: SYSERR(root): smtpZ.xyz.com. config error: mail loops back to me (MX problem?)


Jan 8 16:44:20 smtpC Sendmail[2484]: K088hrwL002483: to=, ctladdr= (507/508), delay=00:00:15, xdelay=00:00:15, mailer=esmtp, pri=60555, relay=smtpZ.xyz.com [10.0.0.5], dsn=5.3.5, start=Local config error

Jan 8 16:44:20 smtpC Sendmail[2484]: K0Bhnwl002483: K088ikwl002484: DSN: Local Config error

and root received mail which contains following message

---The following adress had permanent fatal errors ----

(reason: 533 5.3.5 system config error)


on smtpZ.xyz.com (Recei...













Maaz
Valued Contributor

Re: Sendmail -- plz help

Dear SEP
>You need to see that your MX records in DNS permit routing of mail like you
>expect it to route.

How I can know that.. which file and what syntax should i write ?
Ivan Ferreira
Honored Contributor

Re: Sendmail -- plz help

To check that DNS is correct, use:

dig xyz.com MX

You must have an answer section that shows the MX record that is your mail server.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Maaz
Valued Contributor

Re: Sendmail -- plz help

Thanks Ivan Ferreira
DNS is working just fine.
Plz see my previous post.

I think I should describe what I have done to configure my mail servers(smtpC and smtpZ)

1) in sendmail.mc i simply put "dnl" b4 the line deamon_options(....127.0.0.1...)
2) m4 sendmail.mc > sendmail.cf
3) in access i add 3 lines
10 RELAY
abc.com RELAY
xyz.com RELAY

4a) on smtpC in local-host-names i add
abc.com
4b) on smtpZ in local-host-names i add
xyz.com
5) make
6) servce sendmail start
8) /etc/resolv.conf
nameserver 10.0.0.99
nameserver 10.0.0.100
Note: Both mail servers are client of the same dns server

Vitaly Karasik_1
Honored Contributor
Solution

Re: Sendmail -- plz help

Maaz, can you send us your sendmail.mc files?
Vipulinux
Respected Contributor

Re: Sendmail -- plz help

Hi

You need to make sure that both the domains are added to the /etc/mail/access
eg in abc add
xyz RELAY

try this, does it amke a difference.

Cheers
Ivan Ferreira
Honored Contributor

Re: Sendmail -- plz help

I think that this won't be the problem because you don't have relaying denied, but by default mail will go as user@servername.domain.com, so in your access database you should also add:

domain.com
servername.domain.com

What if you connect via telnet to the port 25 and send the mail interactively:

telnet mailserver 25

helo domain.com
mail from: username@domain.com
rcpt to: username@domain2.com
data
subject: testing
just testing
.
quit

What do you see in the logs?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Maaz
Valued Contributor

Re: Sendmail -- plz help

Thanks Dear All, esp Vitaly Karasik, and Ivan Ferreira for the continous help and support.

the only prblm was that /etc/hosts file was not configured properly on both servers.

i.e on smtpC.abc.com /etc/hosts was
127.0.0.1 smtpc localhost localhost.localdomain

i.e on smtpZ.xyz.com /etc/hosts was
127.0.0.1 smtpz localhost localhost.localdomain

problem was solved after i edit /etc/hosts file on both server as:

127.0.0.1 smtpC.abc.com localhost localhost.localdomain

127.0.0.1 smtpZ.xyz.com localhost localhost.localdomain

Thanks All Once Again
Regards
Maaz