Tuesday, January 12, 2016

Solaris 11.2 – Sendmail “OutBound - ONLY” configuration

Starting with version 8.12, sendmail includes an additional configuration file, /etc/mail/submit.cf. This file, submit.cf, is used to run sendmail in mail-submission program mode instead of daemon mode. Mail-submission program mode, unlike daemon mode, does not require root privilege, so this new paradigm provides better security.
See the following list of functions for submit.cf:
         sendmail uses submit.cf to run in mail-submission program (MSP) mode, which submits email messages and can be started by programs (such as mailx), as well as by users. Refer to the descriptions of the -Ac option and the -Am option in the sendmail(1M) man page.
         submit.cf is used in the following operating modes:
o   -bm, which is the default operating mode
o   -bs, which uses standard input to run SMTP
o   -bt, which is the test mode that is used to resolve addresses
         sendmail, when using submit.cf, does not run as an SMTP daemon.
         sendmail, when using submit.cf, uses /var/spool/clientmqueue, the client-only mail queue, which holds messages that were not delivered to the sendmail daemon. Messages in the client-only queue are delivered by the client "daemon," which is really acting as a client queue runner.
         By default, sendmail uses submit.cf periodically to run the MSP queue (otherwise known as the client-only queue), /var/spool/clientmqueue.
/usr/lib/sendmail -Ac -q15m
Note the following:
         Starting with the Solaris 9 release, submit.cf is provided automatically.
         submit.cf does not require any planning or preliminary procedures prior to the installation of the Solaris 9 release or a more recent release.
         Unless you specify a configuration file, sendmail automatically uses submit.cf as required. Basically, sendmail knows which tasks are appropriate for submit.cf and which tasks are appropriate for sendmail.cf.
         submit.cf is not to be modified.
Functions That Distinguish sendmail.cf From submit.cf
The sendmail.cf configuration file is for the daemon mode. When using this file, sendmail is acting as a mail transfer agent (MTA), which is started by root.
/usr/lib/sendmail -L sm-mta -bd -q1h
See the following list of other distinguishing functions for sendmail.cf:
         By default, sendmail.cf accepts SMTP connections on ports 25 and 587.
         By default, sendmail.cf runs the main queue, /var/spool/mqueue.
I've central e-mail server. Other servers does not need to operate as a mail server. How do I configure Sendmail as submission-only e-mail server (mail client) under CentOS / Fedora / RHEL / Debian Linux / UNIX like operating systems? Sendmail or any MTA can work in two different modes. It can accept incoming SMTP e-mail requests and send mail from the local machine / workstation or server (cluster node). This is called outbound MTA and it always runes in a queue-only mode.
Step # 1: Disable Sendmail Daemon
# svcadm disable Sendmail
Step #2: Configure Mail Submission
You need to tell sendmail about a central MTA which will accept mail on port # 25 for all your domains. For e.g. mail.solariscat.com act as a central MTA. Edit /etc/mail/submit.cf, enter:
# vi /etc/mail/submit.cf
Find the line beginning with D{MTAHost}, and update it to read as follows:
D{MTAHost}mail.solariscat.com
Save and close the file. mail.solariscat.com is the hostname of the server to which this machine should forward it's all outgoing mail. Please note that mail.solariscat.com must be configured to accept mail from your other workstations or server. Once done reload Sendmail-client service.

No comments:

Post a Comment