Sendmail 配置文件(一)
创始人
2024-07-20 14:41:14
0

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工作环境

 

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...
《非诚勿扰》红人闫凤娇被曝厕所... 【51CTO.com 综合消息360安全专家提醒说,“闫凤娇”、“非诚勿扰”已经被黑客盯上成为了“木...
2012年第四季度互联网状况报... [[71653]]  北京时间4月25日消息,据国外媒体报道,全球知名的云平台公司Akamai Te...