Sendmail 配置文件(二)
创始人
2024-07-20 14:40:24
0

Sendmail 配置文件如下:

  FEATURE(`no_default_msa',`dnl')dnl (允许MSA被DAMEMON_OPTION覆盖的默认设置)

  FEATURE(`smrsh',`/usr/sbin/smrsh')dnl (设置邮件发送器smrsh的存放路径)

  FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl (设置邮件发送器数据库的存放路径)

  FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl (设置虚拟邮件域数据库的存放路径)

  FEATURE(redirect)dnl (支持.redirect虚拟域)

  FEATURE(always_add_domain)dnl (增加主机名到所有本地发送的邮件)

  FEATURE(use_cw_file)dnl (装载/etc/mail/local-host-names文件中定义的主机名)

  FEATURE(use_ct_file)dnl (装载可信任用户名单)

  dnl #

  dnl # The following limits the number of processes sendmail can fork to accept

  dnl # incoming messages or process its message queues to 12.) sendmail refuses

  dnl # to accept connections once it has reached its quota of child processes.

  dnl #

  dnl define(`confMAX_DAEMON_CHILDREN', 12)dnl

  dnl #

  dnl # Limits the number of new connections per second. This caps the overhead

  dnl # incurred due to forking new sendmail processes. May be useful against

  dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address

  dnl # limit would be useful but is not available as an option at this writing.)

  dnl #

  dnl define(`confCONNECTION_RATE_THROTTLE', 3)dnl

  dnl #

  dnl # The -t option will retry delivery if e.g. the user runs over his quota.

  dnl #

  FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl (使用procmail作为本地邮件发送者)

  FEATURE(`access_db',`hash -T -o /etc/mail/access.db')dnl (从/etc/mail/access.db装载可以中继的域)

  FEATURE(`blacklist_recipients')dnl (根据访问数据库的值过滤外来邮件)

  EXPOSED_USER(`root')dnl (禁止伪装发送者地址中出现root用户)

  dnl #

  dnl # The following causes sendmail to only listen on the IPv4 loopback address

  dnl # 127.0.0.1 and not on any other network devices. Remove the loopback

  dnl # address restriction to accept email from the internet or intranet.

  dnl #

  DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl (指定sendmail作为MTA运行时的参数)

  dnl #

  dnl # The following causes sendmail to additionally listen to port 587 for

  dnl # mail from MUAs that authenticate. Roaming users who can't reach their

  dnl # preferred sendmail daemon due to port 25 being blocked or redirected find

  dnl # this useful.

  dnl #

  dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl

  dnl #

  dnl # The following causes sendmail to additionally listen to port 465, but

  dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed

  dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't

  dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS

  dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps

  dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.

  dnl #

  dnl # For this to work your OpenSSL certificates must be configured.

  dnl #

  dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl

  dnl #

  dnl # The following causes sendmail to additionally listen on the IPv6 loopback

  dnl # device. Remove the loopback address restriction listen to the network.

  dnl #

  dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl

  dnl #

  dnl # enable both ipv6 and ipv4 in sendmail:

  dnl #

  dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')

  dnl #

  dnl # We strongly recommend not accepting unresolvable domains if you want to

  dnl # protect yourself from spam. However, the laptop and users on computers

  dnl # that do not have 24x7 DNS do need this.

  dnl #

#p#

  FEATURE(`accept_unresolvable_domains')dnl 设置可以接受不能由NDS主机所发送的邮件

  dnl #

  dnl FEATURE(`relay_based_on_MX')dnl

  dnl #

  dnl # Also accept email sent to "localhost.localdomain" as local email.

  dnl #

  LOCAL_DOMAIN(`localhost.localdomain')dnl 设置本地域

  dnl #

  dnl # The following example makes mail from this host and any additional

  dnl # specified domains appear to be sent from mydomain.com

  dnl #

  dnl MASQUERADE_AS(`mydomain.com')dnl

  dnl #

  dnl # masquerade not just the headers, but the envelope as well

  dnl #

  dnl FEATURE(masquerade_envelope)dnl

  dnl #

  dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well

  dnl #

  dnl FEATURE(masquerade_entire_domain)dnl

  dnl #

  dnl MASQUERADE_DOMAIN(localhost)dnl

  dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl

  dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl

  dnl MASQUERADE_DOMAIN(mydomain.lan)dnl

  MAILER(smtp)dnl (指定sendmail所有SMTP发送者,包括smtp,esmtp,smtp8,和replay)

  MAILER(procmail)dnl (指定使用procmail作为本地邮件的发送者)

看了上面的sendmail配置文件,怎么样,对你有帮助吧,快点跟朋友分享吧!

【编辑推荐】

  • Sendmail 配置文件(一)
  • 用sendmailanalyzer来监控自己的Sendmail服务器
  • Solaris 10下可以用Sendmail发送邮件
  • Sendmail的安全篇之未授权人非法滥用
  • Sendmail简单介绍
  • 图文并茂 讲解Sendmail工作环境
  • Linux 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...