1831645 Members
1928 Online
110029 Solutions
New Discussion

Configuring sendmail

 
SOLVED
Go to solution
Edwin Ruiz_2
Super Advisor

Configuring sendmail

How can i configure my sendmail for send email to other domains?

thanks
7 REPLIES 7
Alexander Chuzhoy
Honored Contributor

Re: Configuring sendmail

it suppose to send out the email's by default (at list on REDHAT ) in case you have a working DNS server.
you can test it with simple command:

echo test |mail -s Test youremail@yourdomain.com
Alexander Chuzhoy
Honored Contributor

Re: Configuring sendmail

In case the destination domain doesnt receive mail of unknown domains and your domain is such case-you can configure your server to send all e-mails through a smart host.
edit the file /etc/mail/sendmail.mc -locate the line with SMART_HOST and change the definition after it to the full hostname mail server that is able to send out the e-mails with no problems.This server should be able to forward the e-mail from your sendmail.
after the change you should do this:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
and then
service sendmail restart
Edwin Ruiz_2
Super Advisor

Re: Configuring sendmail

i donnt have SMART_HOSTS on that file
Steven E. Protter
Exalted Contributor
Solution

Re: Configuring sendmail

By default if the server has DNS access, it will do it autmatically.

cat /etc/resolv.conf

Make sure you can ping them.

nslookup or dig yahoo.com

If you get an answer, sendmail will be able to dump mail on the public internet to most domains. aol requires a reverse DNS record to accept mail. I'm working on doing the same thing myself based on a sendmail macro.

If names resolve.

in one window:

tail -f /var/log/maillog

then in another window:

sendmail -v -d8 -d38 someone@yahoo.com
type some text

.


This will get you plenty of information on what if any configuration changes you need to make to get sendmail to properly deliver 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
Alexander Chuzhoy
Honored Contributor

Re: Configuring sendmail

You should have SMART_HOST (not SMART_HOSTS)
entry in /etc/mail/sendmail.mc file
Edwin Ruiz_2
Super Advisor

Re: Configuring sendmail

I get thar messages

[root@salcto-apl10 lib]# sendmail -v -d8 -d38 edruiz@taca.com
prueba
.
getmxrr: res_search(taca.com.) failed (errno=0, h_errno=4)
edruiz@taca.com... Connecting to taca.com. via esmtp...
edruiz@taca.com... Deferred: Connection timed out with taca.com.


messages on /var/log.maillog

Feb 25 11:37:34 salcto-apl10 sendmail[3314]: i1P5bU303314: from=root, size=7, class=0, nrcpts=1, msgid=<200402250537.i1P5bU303314@salcto-apl10.grupotaca.com>, relay=root@localhost
Feb 25 11:38:35 salcto-apl10 sendmail[3314]: i1P5bU303314: to=edruiz@taca.com, ctladdr=root (0/0), delay=00:01:05, xdelay=00:01:01, mailer=esmtp, pri=30007, relay=taca.com. [66.113.139.18], dsn=4.0.0, stat=Deferred: Connection timed out with taca.com.

Edwin Ruiz_2
Super Advisor

Re: Configuring sendmail

I do some changes in /etc/sendmail.cf

All is working fine

Thanks