1838135 Members
3255 Online
110124 Solutions
New Discussion

sendmail

 
SOLVED
Go to solution
Paul Thomson_2
Super Advisor

sendmail

Hi

IF I wanted to send up sendmail on a server to send mails to one of internal mail servers.

Does the name specified in /etc/hosts for the host define the domain that the mails are sent by for example
1.1.1.1 test_hp test_hp.test.com

What exactly would I need to amend in /etc/mail/ ?

I do npot wish to use DNS, so woiuld I just need files in the nsswitch.conf file ?

Thanks
Paul
Argh ye land lovers !
5 REPLIES 5
T G Manikandan
Honored Contributor
Solution

Re: sendmail

if you are not using DNS then your nsswitch.conf file should be like

hosts : files

Then you should have in the /etc/mail/sendmail.cf

search for DS

append "test_hp.test.com" to DS in the file

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Make sure that you can do a nslookup of the relay host
RAC_1
Honored Contributor

Re: sendmail

Set Smart Relay setting in /etc/mail/sendmail.cf

DS macor to be set to mail relay.
There is no substitute to HARDWORK
shajitht_1
Occasional Contributor

Re: sendmail

Guru

these r the steps to configure sendmail for relaying its mails through a smtp server .

1) ensure that SMTP port is open in the mails server .

this can be done by telnet mail server on smtp port.

telnet mailserverip 25

2)edit /etc/hosts and put you mails server name and ip.

3) if u don't want to use DNS copy nsswitch.files nsswitch.conf

cp /etc/nsswitch.files /etc/nsswitch.conf

4) edit /etc/mail/sendmail.cf

find for DS (smartrelay )

put the name of you mail server there .

for eg.
DStest_hp test_hp.test.com

5) restart sendmail deamons using

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

now ur m/c is ready to relay mails through mails server .

regards
Jose Mosquera
Honored Contributor

Re: sendmail

Hi,

Your real mail server is named "Relay Server", so, you need define in /etc/mail/sendmail.cf the DS variable with a reachable Realy Serner name, in your case:
DStest_hp.test.com

After define this you need restart sendmail service:
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Also ensure that your resolution path defined in /etc/nsswitch.conf is appropriate.

You can test sendmail service by a simple command:

#echo "Test"|sendmail -v your_mailbox@your_domain

Any unsatisfied delivery will be queued in /var/spool/mqueue dir, you can show any queued delivery by:
#mailq -v


Rgds
Paul Thomson_2
Super Advisor

Re: sendmail

Thanks for posts, this has solved the issue.
Argh ye land lovers !