Sendmail 配置文件(一)
Sendmail 配置文件如下:
/etc/mail/sendmail.mc
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl # make -C /etc/mail
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl (將sendmail-cf/m4/cf.m4包含進(jìn)來(lái))
VERSIONID(`setup for Red Hat Linux')dnl (定義版本信息)
OSTYPE(`linux')dnl (選擇包含操作系統(tǒng)指定屬性的文件)
dnl #
dnl # default logging level is 9, you might want to set it higher to
dnl # debug the configuration
dnl #
dnl define(`confLOG_LEVEL', `9')dnl
dnl #
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
dnl define(`SMART_HOST',`smtp.your.provider')
dnl #
define(`confDEF_USER_ID',``8:12'')dnl (指定使用的用戶ID為8,組ID為12)
dnl define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl (設(shè)置等待連接的最大時(shí)間為1分鐘)
define(`confTRY_NULL_MX_LIST',true)dnl (若MX記錄指向本機(jī),則sendmail直接連接到遠(yuǎn)程主機(jī))
define(`confDONT_PROBE_INTERFACES',true)dnl (sendmial不會(huì)自動(dòng)將服務(wù)器的網(wǎng)絡(luò)接口視為有效地址)
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl(設(shè)置procmail的存放路徑)
define(`ALIAS_FILE', `/etc/aliases')dnl (設(shè)置郵件別名存放路徑)
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl (設(shè)置處理信息的最大限制為2M)
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl (設(shè)置用戶數(shù)據(jù)庫(kù)文件路徑)
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl (設(shè)置限制某些郵件命令的標(biāo)志)
define(`confAUTH_OPTIONS', `A')dnl 僅在授權(quán)成功時(shí)。將AUTH參數(shù)加到郵件的消息頭中
#p#
dnl #
dnl # The following allows relaying if the user authenticates, and disallows
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
dnl #
dnl define(`confAUTH_OPTIONS', `A p')dnl
dnl #
dnl # PLAIN is the preferred plaintext authentication method and used by
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
dnl # use LOGIN. Other mechanisms should be used if the connection is not
dnl # guaranteed secure.
dnl # Please remember that saslauthd needs to be running for AUTH.
dnl #
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl # cd /usr/share/ssl/certs; make sendmail.pem
dnl # Complete usage:
dnl # make -C /usr/share/ssl/certs usage
dnl #
dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')
dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')
dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
dnl #
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
dnl # slapd, which requires the file to be readble by group ldap
dnl #
dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl
dnl #
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
一口氣看完sendmail的配置文件,那就不簡(jiǎn)單了,我會(huì)在后面文章給大家介紹下半部分。
【編輯推薦】
- 用sendmailanalyzer來(lái)監(jiān)控自己的Sendmail服務(wù)器
- Solaris 10下可以用Sendmail發(fā)送郵件
- 怎樣用Sendmail發(fā)送HTML格式的郵件
- Sendmail的安全篇之限制權(quán)限、文件修改
- Sendmail的安全篇之未授權(quán)人非法濫用
- Sendmail簡(jiǎn)單介紹
- 圖文并茂 講解Sendmail工作環(huán)境