Operating System - Linux
1827804 Members
2164 Online
109969 Solutions
New Discussion

Re: Sendmail not sending to Relay

 
SOLVED
Go to solution
KPS
Super Advisor

Sendmail not sending to Relay

Hi,

We have the sendmail daemon disabled, and we're wanting to send mail to a relay server using a "Smart" relay host. (We have this same config running on other servers and it works fine for us)

I just built a system with our imaging product and after the install, I notice I can't send mail to our relay. The OS here is RHES-3.0. I'm getting the following in my /var/log/maillog:

Feb 13 15:35:45 yogi sendmail[4466]: k1DKZjWZ004466: to=john.doe@mynet.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30066, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
:q!
7 REPLIES 7
Steven E. Protter
Exalted Contributor
Solution

Re: Sendmail not sending to Relay

Shalom KC,

Have you ever generated a sendmail.cf file from a sendmail.mc macro?

It would appear that your sendmail.cf configuration is set to refuse from localhost.

I'd need to see the sendmail.mc file.

You can probably fix this by installing a sendmail.cf default file.

rpm -e sendmail....

rpm ivh it back in.

This will get you a default sendmail.cf

Then try again the mail.

You set smartrelay with the DS directive?

The relay server must explicity accept mail from this machine.

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
Ivan Ferreira
Honored Contributor

Re: Sendmail not sending to Relay

That is exactly what I told you in your previous post. If you disable the sendmail service, it will refuse the connection and your relay won't work.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: Sendmail not sending to Relay

It is possible to not have the sendmail daemon running and relay mail that is generated locally. Thats why I think the sendmail.cf file is not stock.

I may be wrong. Sendmail has been giving me a headache lately.

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 not sending to Relay

Unfortunately, out-of-the-box [RHEL] sendmail config doesn't allow to send email if sendmail if down.
As far as I remember, if you remove /etc/mail/submit.cf, you'll be able to send email even when sendmail is down.
Ivan Ferreira
Honored Contributor

Re: Sendmail not sending to Relay

You are right Vitaly. If you move/remove /etc/mail/submit.cf, you are able to send mail with sendmail service down. I just tested.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Vipulinux
Respected Contributor

Re: Sendmail not sending to Relay

Hi

If you just want to relay mail. Use the defaulkt config that comes with RHEL And add smarthost entry in the sendmail.cf file
where smarthost will be the name of the mail server you want to forward mails to.

Cheers

Steven E. Protter
Exalted Contributor

Re: Sendmail not sending to Relay

Shalom,

Vitaly is right, the DS directive needs to be configured, then the mail should relay.

Going to a default sendmail.cf and then modifying the DS directive should permit mail to relay with sendmail not running.

You could also always configure cron to run a sendmail -v -q

This would run the queue regularly and push mail off the server, if DS was set up correctly to a server that permits relay.

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