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包含进来)
VERSIONID(`setup for Red Hat Linux')dnl (定义版本信息)
OSTYPE(`linux')dnl (选择包含操作系统指定属性的文件)
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 (设置等待连接的最大时间为1分钟)
define(`confTRY_NULL_MX_LIST',true)dnl (若MX记录指向本机,则sendmail直接连接到远程主机)
define(`confDONT_PROBE_INTERFACES',true)dnl (sendmial不会自动将服务器的网络接口视为有效地址)
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl(设置procmail的存放路径)
define(`ALIAS_FILE', `/etc/aliases')dnl (设置邮件别名存放路径)
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl (设置处理信息的最大限制为2M)
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl (设置用户数据库文件路径)
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl (设置限制某些邮件命令的标志)
define(`confAUTH_OPTIONS', `A')dnl 仅在授权成功时。将AUTH参数加到邮件的消息头中
#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的配置文件,那就不简单了,我会在后面文章给大家介绍下半部分。
【编辑推荐】
- 用sendmailanalyzer来监控自己的Sendmail服务器
- Solaris 10下可以用Sendmail发送邮件
- 怎样用Sendmail发送HTML格式的邮件
- Sendmail的安全篇之限制权限、文件修改
- Sendmail的安全篇之未授权人非法滥用
- Sendmail简单介绍
- 图文并茂 讲解Sendmail工作环境