1846058 Members
2050 Online
110253 Solutions
New Discussion

Re: sendmail

 
Werner Rips
Advisor

sendmail

I want to use mailx to send mails in a LAN from one Workstation to another.

Is there anybody who can tell me
how to configure sendmail?
3 REPLIES 3
Steven Sim Kok Leong
Honored Contributor

Re: sendmail

Hi,

http://www.sendmail.org provides you with all the information you need including the configuration guide.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Dave Kelly_1
Respected Contributor

Re: sendmail

The usual method for sending messages using mailx is:

echo Hello | mailx -s "Subject" user@domain.com

mailx will read from stdin so you can also do:

cat file | mailx -s "Subject" user@domain.com

By default, sendmail will work right from the start provided that you have the daemon running on the receiving machine. You should check /etc/rc.config.d/mailservs to see if SENDMAIL_SERVER=1.

If you are using DNS, check /etc/nsswitch.conf for the following:

hosts: dns [NOTFOUND=continue UNAVAIL=continue] files

You should then check that /etc/resolv.conf contains the correct name server information and that you can resolve the addresses of your other workstations through nslookup.

If you are NOT using DNS, make sure that /etc/nsswitch.conf contains the line:

hosts: files

You should then make sure that your workstations are listed in /etc/hosts and that nslookup can resolve their names.

If you are NOT using DNS, you are also likely to need to make a change to the sendmail.cf file.

Find the line beginning with Dj$w
This may be commented out so uncomment it and either add a domain so the line is

Dj$w.domain.com

OR

end the Dj$w line with a (.) so the line is

Dj$w.

You should then make sure that you have an alias in /etc/hosts your workstation name. Depending upon which Dj$w option you went for, the line should be either:

xxx.xxx.xxx.xxx host host.domain.com

OR

xxx.xxx.xxx.xxx host host.

(obviously xxx.xxx.xxx.xxx is the IP address)
Dave Kelly_1
Respected Contributor

Re: sendmail

Oops ! I forgot to say that you should stop and restart sendmail.

/sbin/init.d/sendmail stop

and

/sbin/init.d/sendmail start