Sendmail 配置文件(一)

运维 系统运维
sendmail是最重要的邮件传输代理程序。也是在Unix环境下使用最广泛的实现邮件发送/接受的邮件传输代理程序。本文就带大家看看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包含进来)

  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的配置文件,那就不简单了,我会在后面文章给大家介绍下半部分。

【编辑推荐】

  1. 用sendmailanalyzer来监控自己的Sendmail服务器
  2. Solaris 10下可以用Sendmail发送邮件
  3. 怎样用Sendmail发送HTML格式的邮件
  4. Sendmail的安全篇之限制权限、文件修改
  5. Sendmail的安全篇之未授权人非法滥用
  6. Sendmail简单介绍
  7. 图文并茂 讲解Sendmail工作环境

 

责任编辑:赵鹏 来源: 网络转载
相关推荐

2011-01-21 15:27:10

Sendmail

2011-01-19 10:48:38

sendmail配置

2010-06-03 13:44:35

Sendmail配置

2011-01-19 14:00:21

2011-01-13 16:27:26

Linux配置文件

2010-12-28 16:35:32

Outlook 配置文

2010-12-27 14:59:31

Outlook 配置文

2011-01-21 09:32:57

LinuxSendmail

2011-01-21 15:40:56

Sendmail

2011-03-28 09:07:26

Nagios配置文件

2011-03-28 15:52:16

Nagios配置文件

2011-04-01 16:30:49

Nagios

2009-07-09 15:55:18

WebWork配置文件

2011-03-03 09:14:38

PureFTPd

2009-06-17 14:10:30

Spring配置文件

2009-09-22 10:23:15

Hibernate配置

2010-08-05 14:36:07

NFS服务

2011-02-25 16:39:34

proftpd配置文件

2010-05-05 16:14:09

Unix管理

2011-03-25 17:13:37

Nagios配置文件
点赞
收藏

51CTO技术栈公众号