1830898 Members
3069 Online
110017 Solutions
New Discussion

sendmail configuration

 
SOLVED
Go to solution
Sunil Sharma_1
Honored Contributor

sendmail configuration

Hi,

My server is runnign sendmail daemon.

I want to know wheather my server is configured for sending mail,receiving mail or both.

Where can i get this information ?

sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: sendmail configuration

The only thing the sendmail daemon does for you is accept mail.

Mail can be sent with the sendmail binary whether or not the daemon is running.

Its possible to manipulate your machine to send mail via port 25 even if the sendmail daemon is not running.

But take it from someone who learned sendmail the hard way, it handles inbound mail. The binaries and configuration handle outbound mail without any help from the daemon.

Configuration information:
http://www.sendmail.org
/etc/mail
/etc/mail/sendmail.cf

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
Con O'Kelly
Honored Contributor
Solution

Re: sendmail configuration

Hi Sunil

The sendmail daemon doesn't need to be running to send mail.
To check where mail is sent look at DS parameter in /etc/mail/sendmail.cf. This sets your mail relay ie where non local mail will be forwarded.
If DS is not set then sendmail utilises DNS and looks up the MX record for a domain. If an MX record doesn't exist for that domain then mail won't be sent.

You can check DNS MX records as follows:
# nslookup -type=MX "domain.com"

Also send a test mail and look in your mail log - normally /var/adm/syslog/mail.log (unless configured differently in /etc/syslog.conf).
This will show you any problems with mail.

Cheers
Con
Sunil Sharma_1
Honored Contributor

Re: sendmail configuration

Thanks Steven and Con,

Con: you explained nicely about sending mail from my HP box.

What change i have to do in configuration so that my server will receive mails from other servers ?

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Bharat Katkar
Honored Contributor

Re: sendmail configuration

Hi Sunil,
Find attached doc on sendmail configuration. Frankly i haven't worked on sendmail :)
Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Geoff Wild
Honored Contributor

Re: sendmail configuration

In order to receive emails from other servers, you can create a MX record for your domain for that server - or you have to specify the server:

mailx -s "test" yourid@yourserver.yourdomain.com

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: sendmail configuration

To receive mail:

vi /etc/rc.config.d/mailservs

SENDMAIL_SERVER=1

You may need to give a name to
SENDMAIL_SERVER_NAME=

/sbin/init.d/sendmail start

Now you have a daemon running to receive mail.

To actually get any mail, your network needs to be aware of this server. It needs to be in a DNS database or in the hosts file on all machines if the network.

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
Sanjay_6
Honored Contributor

Re: sendmail configuration

Hi,

If you have sendmail daemon running, your server can receive emails. To send mails, you don't need to have the sendmail daemon running.

Try the sendmail faq at http://www.sendmail.org/faq/

Hope this helps.

Regds
Sunil Sharma_1
Honored Contributor

Re: sendmail configuration

Thanks all for you reply.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***