Monday, November 5, 2007

Getting Sendmail To Work In Solaris 10


So far, it's been my experience that Solaris 10's implementation of sendmail, while adequate, doesn't seem to be suited to anything in particular out-of-the-box.

Some folks I know don't care for the whole "Submission Daemon" concept and take the short-route of copying over and just not running any daemons. This works, but you still have to make some edits and you end up with user and permissions errors without end.

In actuality, it's very simple to set sendmail up to act like it used to (assuming your shop is like most and - if the machine's not a mail server - your security department won't allow you to run it in listening daemon mode on port 25).

You can still use the submission daemon (which doesn't listen on port 25 and alert your security team) and have things set up in no time by doing the following:

1. Edit /etc/default/sendmail (note that it may not exist!). Include the following values:


2. Of course, sendmail is already running, just not sending mail anywhere no matter how many times you try, so you can shut it down with the /etc/init.d/sendmail script:

/etc/init.d/sendmail stop

Note that this basically just runs Solaris' svcadm commands for you and browsing it is a good introduction to how this method of service control works.

3. Now edit /etc/sendmail/ and change the line that reads:


to read:

D{MTAHost}[] <--- or whatever your mail relay/server is.

4. Start sendmail back up (which enables it for future reboots by default) and you can send mail again :)

/etc/init.d/sendmail start

A quick "ps -ef|grep "[m]ail" should show you the one sendmail process running with the "-Ac" (submission daemon) and 15 minute queue-scan setting! Enjoy :)

, Mike