Friday, January 11, 2008

Configuring sendmail for Solaris

In Solaris 10, here is how I will set the mail to work:

1) Get the name of SMTP server (suppose it is

2) Log on to the Solaris 10 server where mail setup is needed.

3) Goto /etc/mail directory

4) Edit file "" and add/edit the line containing "DS" in Local info section:

5) Edit file "" and add/edit the line containing "Dj" in Local info section:

6) Done! Now send a test mail to verify if it is working.


Once the file is edited for adding the SMTP server's entry, try to send a mail from unix command prompt in verbose mode like shown below:

# cat some_test_file_name mailx -v -s "TEST MAIL" Connecting to via relay...
220 Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Fri, 11 Jan 2008 09:4 0:13 -0600
>>> EHLO Hello []
250-SIZE 15728640
250 OK
>>> MAIL From: SIZE=1178
250 2.1.0 OK
>>> RCPT To:
>>> DATA
250 2.1.5
354 Start mail input; end with .
>>> .
250 2.6.0 <> Queued mail for delivery Sent ( <> Queued mail for delivery)
Closing connection to
>>> QUIT
221 2.0.0 Service closing transmission channel


In the above output, try to look for the bold entries. If you are able to see the "Sent" and "Closing connection for ........" lines, it means that your server is able to talk to mail server of your company.

Happy mailing! :-)


Muthu said...

Hi Vikas, was trying setup sendmail but its not working i have few doubts about sendmail can i ask you about it.

Unix Geek said...

@Muthu: I am no expert on Sendmail as it is a very vast topic. But let me know what is your question. I will try to answer if I know :)