查看: 550|回复: 4

如何在防火墙上设置Sendmail

 关闭 [复制链接]

签到天数: 2090 天

连续签到: 2 天

[LV.Master]伴坛终老IIII

发表于 2009-5-2 16:06 | 显示全部楼层 |阅读模式
如何在防火墙上设置Sendmail
环境:
  公司注册了正式域名company.com,防火墙运行Linux且用专线接入ISP,是通往Internet的唯一通道,用来处理公司内部出去的邮件和发往公司内部用户@company.com的所有邮件。在内部局域网上(仅一个网段,没有子网)有一台供内部用户收发邮件的Linux邮件服务器,两台机器均运行Sendmail 8.9.3
  
  Sendmail 8.9.3的新特性
  Sendmail 8.9.3包含几个新的特性,如果配置不当,你的Sendmail可能不能正常工作。这些特性主要是帮助过滤掉垃圾邮件和阻止你的站点被用来作为第三方的mail relay主机(什么是third-party mail relay? 附文章),你能根据你的站点所要求的政策配置这些参数。
  
  1.Mail relay
  
  在Sendmail 8.9.3中Relaying默认被拒绝了,这个特性可能使得运行Sendmail的Linux邮件服务器不允许你向它发送邮件,有几种方法来解决。
  
  a. Default
  
  默认情况下,你能简单地创建文件/etc/mail/relay-domains,它包含你希望接受relay的系统的域名,例如company.com 。如果不能做反向DNS查找,你应该清楚指明IP范围,如要允许内部网段上所有用户向其发送邮件,设为192.168.11 ,注意:你无法设置这里为company.com而允许你公司出差在外的旅行用户(拨当地ISP)来发送邮件。因为你拨到当地ISP后得到的动态IP地址属于当地ISP,反向DNS解析后的域名为ISP的域名,甚至有的不能够做反向DNS。解决办法是设置发送邮件服务器为当地ISP的服务器优点: 如果你仅仅需要relay mail from a few system,这可能是最简单的解决办法,它阻止你的服务器扮演作为relayer,但允许邮件通过。
  缺点:你不能不保持文件不断更新,如果你是ISP,你必须不断保持这个文件被更新,更新后还要重新启动Sendmail ( killall -HUP sendmail )
  
  b. promiscuous_relay
  
  这个特性允许你relay来自任何地方的邮件。(不被建议的)
  
  优点: 你不必担心邮件被拒绝
  
  缺点: 任何人能用你的系统作为mail relay,这个参数的使用取消了8.9.3中新增的反relay 特性。
  
  c. relay_entire_domain
  
  这个特性允许来自在类W中设置的所有域的邮件被允许relay.默认地,这将是*.company.com
  
  优点: 你不会担心来自你的域中的所有邮件被拒绝,你的域以外的系统不能被relay mail除非在/etc/mail/relay-domains文件中被指定或/etc/mail/access中被指定。如果你仅仅想relay你自己的域中的主机,可以用这个参数来代替/etc/mail/relay-domains. 注意: 你需要设置反向DNS,当内部LAN上的主机连接到SMTP服务器上来时能被反向解析到本地域内。如192.168.11.12被解析到sh12.asiansources.com .
  
  缺点:你可能不想允许你公司的其它组织relay mail。
  
  d. relay_hosts_only
  
  这允许你基于个别的主机名relay mail.不是域名。
  
  优点: 细调relay许可权限,基于全称主机名,不是全称域名。
  
  缺点:需要你指定或者在文件/etc/mail/relay-domains或者在access 数据库中的系统主机名。如果用
  
  /etc/mail/relay-domains,文件将是
  company.com
  mailgate.company.com
  othername.com
  mailgate.othername.com
  
  2. Mail blocking
  a. accept_unresolvable_domains
  
  默认地,如果发送者的域名(指发送者邮件地址后面的域名)不能被DNS解析 ,邮件被拒绝的。
  
  如:
  MAILFrom: wkeys@nonexistent 501 < wkeys@nonexistent>…Sender domain must exist
  
  用参数accept_unresolvable_domains 跨越这个并接受来自任何域或IP地址的邮件。
  
  b. access_db
  
  这个特性使得sendmail寻找数据库文件(默认是/etc/mail/access.db),决定是否接受或拒绝mail或者你甚至能设定一个客户化的错误信息,这个特性也能用来控制relay许可。
  
  优点:真的允许你细调将接收从谁来的邮件,如我不想接受来自不能被解析的域的邮件,但对个别域有例外。
  
  c. accept_unqualified_senders
  
  默认地,如果发送者的域不是全称域名,sendmail将拒绝这个连接。如mail from:553 …. Domain name required用这个特性跨越默认的情况以致连接将能被接受。
  
  优点:我建议总是用全称域名地址,然而在内部邮件网关上,你可能不能控制其他本地系统如何发送给你邮件,这将允许你接受带非全称发送者地址的邮件。
  
  缺点:你丢失了一些跟踪邮件来自哪里的能力,不要在防火墙上用它。
  
  d. blacklist_recipients
  
  这允许你阻止不想接受的邮件帐号发来的邮件。需要在/etc/mail/access中设置。
  
  e. relay_based_on_MX
  
  如果一台主机有MX记录指向你的站点,这个特性使得能从他们接受邮件。
  
  优点:如果他们有MX记录指向你你就不需要加任何主机到access database.
  
  缺点:这将允许第三方的mail relay,且不需要你的许可。
  
  3.third-party mail relay
  
  附另外一篇文章(文章荟萃)----sendmail 8.9.3 mail relay规则简介
  
  公司防火墙上sendmail配置举例
  divert(-1)
  include(`/usr/lib/sendmail-cf/m4/cf.m4&#39;)
  dnl let&#39;s define our OS type. This one is mandatory.
  OSTYPE(`linux&#39;)dnl
  define(`confDEF_USER_ID&#39;,``8:12&#39;&#39;)
  define(`ALIAS_FILE&#39;,`/etc/mail/aliases&#39;)dnl
  define(`confPRIVACY_FLAGS&#39;, `authwarnings,needmailhelo,noexpn,novrfy&#39;)dnl
  define(`confTO_QUEUERETURN&#39;, `4d&#39;)dnl
  define(`confTO_QUEUEWARN&#39;, `4h&#39;)dnl
  define(`PROCMAIL_MAILER_PATH&#39;,`/usr/bin/procmail&#39;)dnl
  undefine(`UUCP_RELAY&#39;)dnl
  undefine(`BITNET_RELAY&#39;) dnl
  FEATURE(`redirect&#39;)dnl
  FEATURE(`always_add_domain&#39;)dnl
  FEATURE(`use_cw_file&#39;)dnl
  FEATURE(`local_procmail&#39;)dnl
  FEATURE(`nouucp&#39;)dnl
  FEATURE(`mailertable&#39;, `hash -o /etc/mail/mailertable&#39;)dnl
  FEATURE(`virtusertable&#39;, `hash -o /etc/mail/virtusertable&#39;)dnl
  FEATURE(`domaintable&#39;,`hash -o /etc/mail/domaintable&#39;)
  FEATURE(`access_db&#39;, `hash -o /etc/mail/access&#39;)dnl
  FEATURE(`blacklist_recipients&#39;)dnl
  MAILER(procmail)dnl
  MAILER(smtp)dnl
  
  use_cw_file
  默认为/etc/sendmail.cw文件,指明了属于本地域处理的域名,发到这个域下的邮件为本地邮件。不要在防火墙上设置company.com到sendmai.cw中,在内部网段上的邮件服务器上设置它。更新该文件不需要重启sendmail
  
  * How do I make all my addresses appear to be from a single host?
  
  Using the V8 configuration macros, use:
  
  MASQUERADE_AS(my.dom.ain)
  
  This will cause all addresses to be sent out as being from the indicated domain.
  If you&#39;re using version 8.7 sendmail, and you want to hide this information in the envelope
  as well as the headers, use:
  
  FEATURE(masquerade_envelope)
  
  If you also want to masquerade the recipients, use
  
  FEATURE(allmasquerade)
  
  Mailertable
  用这个特性可跨越DNS和DNS MX记录而relay mail。也可跨越Smart_host(DSxxxx)项.
  
  如 company.com relay:[192.168.11.1]
  
  从防火墙上接收的发往company.com的邮件relay到192.168.11.1
  
  Include a \"mailer table\" which can be used to override
  routing for particular domains. The argument of the
  FEATURE may be the key definition. If none is specified,
  the definition used is:
  
  hash -o /etc/mailertable
  
  Keys in this database are fully qualified domain names
  or partial domains preceded by a dot -- for example,
  \"vangogh.CS.Berkeley.EDU\" or \".CS.Berkeley.EDU\".
  Values must be of the form:
  mailer:domain
  where \"mailer\" is the internal mailer name, and \"domain\"
  is where to send the message. These maps are not
  reflected into the message header. As a special case,
  the forms:
  local:user
  will forward to the indicated user using the local mailer,
  local:
  will forward to the original user in the e-mail address
  using the local mailer, and
  error:code message
  will give an error message with the indicated code and
  message.
  Domaintable
  
  域替换操作。
  
  如果容易打错,发往company.com的邮件误写为compayn.com则加入一行
  compayn.com company.com
  Access.db
  数据库记录包含两部分:the key and the action:
  the key能是用户名,域名,或IP地址。
  The action能是ok, relay,reject discard, or and RFC821 message
  如:
  cyber
PCOS系统下载站:http://zhuangji.wang

该用户从未签到

发表于 2009-5-3 09:16 | 显示全部楼层
[s:131] 今天知识真多啊!一个一个收藏
PCOS系统下载站:http://zhuangji.wang

签到天数: 14 天

连续签到: 0 天

[LV.3]偶尔看看II

发表于 2009-5-8 01:32 | 显示全部楼层
消化不良了 等下 先收了!!!!!!!!!!!!
PCOS系统下载站:http://zhuangji.wang

签到天数: 2090 天

连续签到: 2 天

[LV.Master]伴坛终老IIII

 楼主| 发表于 2009-5-2 16:06 | 显示全部楼层

如何在防火墙上设置Sendmail

如何在防火墙上设置Sendmail
环境:
  公司注册了正式域名company.com,防火墙运行Linux且用专线接入ISP,是通往Internet的唯一通道,用来处理公司内部出去的邮件和发往公司内部用户@company.com的所有邮件。在内部局域网上(仅一个网段,没有子网)有一台供内部用户收发邮件的Linux邮件服务器,两台机器均运行Sendmail 8.9.3
  
  Sendmail 8.9.3的新特性
  Sendmail 8.9.3包含几个新的特性,如果配置不当,你的Sendmail可能不能正常工作。这些特性主要是帮助过滤掉垃圾邮件和阻止你的站点被用来作为第三方的mail relay主机(什么是third-party mail relay? 附文章),你能根据你的站点所要求的政策配置这些参数。
  
  1.Mail relay
  
  在Sendmail 8.9.3中Relaying默认被拒绝了,这个特性可能使得运行Sendmail的Linux邮件服务器不允许你向它发送邮件,有几种方法来解决。
  
  a. Default
  
  默认情况下,你能简单地创建文件/etc/mail/relay-domains,它包含你希望接受relay的系统的域名,例如company.com 。如果不能做反向DNS查找,你应该清楚指明IP范围,如要允许内部网段上所有用户向其发送邮件,设为192.168.11 ,注意:你无法设置这里为company.com而允许你公司出差在外的旅行用户(拨当地ISP)来发送邮件。因为你拨到当地ISP后得到的动态IP地址属于当地ISP,反向DNS解析后的域名为ISP的域名,甚至有的不能够做反向DNS。解决办法是设置发送邮件服务器为当地ISP的服务器优点: 如果你仅仅需要relay mail from a few system,这可能是最简单的解决办法,它阻止你的服务器扮演作为relayer,但允许邮件通过。
  缺点:你不能不保持文件不断更新,如果你是ISP,你必须不断保持这个文件被更新,更新后还要重新启动Sendmail ( killall -HUP sendmail )
  
  b. promiscuous_relay
  
  这个特性允许你relay来自任何地方的邮件。(不被建议的)
  
  优点: 你不必担心邮件被拒绝
  
  缺点: 任何人能用你的系统作为mail relay,这个参数的使用取消了8.9.3中新增的反relay 特性。
  
  c. relay_entire_domain
  
  这个特性允许来自在类W中设置的所有域的邮件被允许relay.默认地,这将是*.company.com
  
  优点: 你不会担心来自你的域中的所有邮件被拒绝,你的域以外的系统不能被relay mail除非在/etc/mail/relay-domains文件中被指定或/etc/mail/access中被指定。如果你仅仅想relay你自己的域中的主机,可以用这个参数来代替/etc/mail/relay-domains. 注意: 你需要设置反向DNS,当内部LAN上的主机连接到SMTP服务器上来时能被反向解析到本地域内。如192.168.11.12被解析到sh12.asiansources.com .
  
  缺点:你可能不想允许你公司的其它组织relay mail。
  
  d. relay_hosts_only
  
  这允许你基于个别的主机名relay mail.不是域名。
  
  优点: 细调relay许可权限,基于全称主机名,不是全称域名。
  
  缺点:需要你指定或者在文件/etc/mail/relay-domains或者在access 数据库中的系统主机名。如果用
  
  /etc/mail/relay-domains,文件将是
  company.com
  mailgate.company.com
  othername.com
  mailgate.othername.com
  
  2. Mail blocking
  a. accept_unresolvable_domains
  
  默认地,如果发送者的域名(指发送者邮件地址后面的域名)不能被DNS解析 ,邮件被拒绝的。
  
  如:
  MAILFrom: wkeys@nonexistent 501 < wkeys@nonexistent>…Sender domain must exist
  
  用参数accept_unresolvable_domains 跨越这个并接受来自任何域或IP地址的邮件。
  
  b. access_db
  
  这个特性使得sendmail寻找数据库文件(默认是/etc/mail/access.db),决定是否接受或拒绝mail或者你甚至能设定一个客户化的错误信息,这个特性也能用来控制relay许可。
  
  优点:真的允许你细调将接收从谁来的邮件,如我不想接受来自不能被解析的域的邮件,但对个别域有例外。
  
  c. accept_unqualified_senders
  
  默认地,如果发送者的域不是全称域名,sendmail将拒绝这个连接。如mail from:553 …. Domain name required用这个特性跨越默认的情况以致连接将能被接受。
  
  优点:我建议总是用全称域名地址,然而在内部邮件网关上,你可能不能控制其他本地系统如何发送给你邮件,这将允许你接受带非全称发送者地址的邮件。
  
  缺点:你丢失了一些跟踪邮件来自哪里的能力,不要在防火墙上用它。
  
  d. blacklist_recipients
  
  这允许你阻止不想接受的邮件帐号发来的邮件。需要在/etc/mail/access中设置。
  
  e. relay_based_on_MX
  
  如果一台主机有MX记录指向你的站点,这个特性使得能从他们接受邮件。
  
  优点:如果他们有MX记录指向你你就不需要加任何主机到access database.
  
  缺点:这将允许第三方的mail relay,且不需要你的许可。
  
  3.third-party mail relay
  
  附另外一篇文章(文章荟萃)----sendmail 8.9.3 mail relay规则简介
  
  公司防火墙上sendmail配置举例
  divert(-1)
  include(`/usr/lib/sendmail-cf/m4/cf.m4&#39;)
  dnl let&#39;s define our OS type. This one is mandatory.
  OSTYPE(`linux&#39;)dnl
  define(`confDEF_USER_ID&#39;,``8:12&#39;&#39;)
  define(`ALIAS_FILE&#39;,`/etc/mail/aliases&#39;)dnl
  define(`confPRIVACY_FLAGS&#39;, `authwarnings,needmailhelo,noexpn,novrfy&#39;)dnl
  define(`confTO_QUEUERETURN&#39;, `4d&#39;)dnl
  define(`confTO_QUEUEWARN&#39;, `4h&#39;)dnl
  define(`PROCMAIL_MAILER_PATH&#39;,`/usr/bin/procmail&#39;)dnl
  undefine(`UUCP_RELAY&#39;)dnl
  undefine(`BITNET_RELAY&#39;) dnl
  FEATURE(`redirect&#39;)dnl
  FEATURE(`always_add_domain&#39;)dnl
  FEATURE(`use_cw_file&#39;)dnl
  FEATURE(`local_procmail&#39;)dnl
  FEATURE(`nouucp&#39;)dnl
  FEATURE(`mailertable&#39;, `hash -o /etc/mail/mailertable&#39;)dnl
  FEATURE(`virtusertable&#39;, `hash -o /etc/mail/virtusertable&#39;)dnl
  FEATURE(`domaintable&#39;,`hash -o /etc/mail/domaintable&#39;)
  FEATURE(`access_db&#39;, `hash -o /etc/mail/access&#39;)dnl
  FEATURE(`blacklist_recipients&#39;)dnl
  MAILER(procmail)dnl
  MAILER(smtp)dnl
  
  use_cw_file
  默认为/etc/sendmail.cw文件,指明了属于本地域处理的域名,发到这个域下的邮件为本地邮件。不要在防火墙上设置company.com到sendmai.cw中,在内部网段上的邮件服务器上设置它。更新该文件不需要重启sendmail
  
  * How do I make all my addresses appear to be from a single host?
  
  Using the V8 configuration macros, use:
  
  MASQUERADE_AS(my.dom.ain)
  
  This will cause all addresses to be sent out as being from the indicated domain.
  If you&#39;re using version 8.7 sendmail, and you want to hide this information in the envelope
  as well as the headers, use:
  
  FEATURE(masquerade_envelope)
  
  If you also want to masquerade the recipients, use
  
  FEATURE(allmasquerade)
  
  Mailertable
  用这个特性可跨越DNS和DNS MX记录而relay mail。也可跨越Smart_host(DSxxxx)项.
  
  如 company.com relay:[192.168.11.1]
  
  从防火墙上接收的发往company.com的邮件relay到192.168.11.1
  
  Include a \"mailer table\" which can be used to override
  routing for particular domains. The argument of the
  FEATURE may be the key definition. If none is specified,
  the definition used is:
  
  hash -o /etc/mailertable
  
  Keys in this database are fully qualified domain names
  or partial domains preceded by a dot -- for example,
  \"vangogh.CS.Berkeley.EDU\" or \".CS.Berkeley.EDU\".
  Values must be of the form:
  mailer:domain
  where \"mailer\" is the internal mailer name, and \"domain\"
  is where to send the message. These maps are not
  reflected into the message header. As a special case,
  the forms:
  local:user
  will forward to the indicated user using the local mailer,
  local:
  will forward to the original user in the e-mail address
  using the local mailer, and
  error:code message
  will give an error message with the indicated code and
  message.
  Domaintable
  
  域替换操作。
  
  如果容易打错,发往company.com的邮件误写为compayn.com则加入一行
  compayn.com company.com
  Access.db
  数据库记录包含两部分:the key and the action:
  the key能是用户名,域名,或IP地址。
  The action能是ok, relay,reject discard, or and RFC821 message
  如:
  cyber
PCOS系统下载站:http://zhuangji.wang

签到天数: 2090 天

连续签到: 2 天

[LV.Master]伴坛终老IIII

 楼主| 发表于 2009-5-2 16:06 | 显示全部楼层

如何在防火墙上设置Sendmail

如何在防火墙上设置Sendmail
环境:
  公司注册了正式域名company.com,防火墙运行Linux且用专线接入ISP,是通往Internet的唯一通道,用来处理公司内部出去的邮件和发往公司内部用户@company.com的所有邮件。在内部局域网上(仅一个网段,没有子网)有一台供内部用户收发邮件的Linux邮件服务器,两台机器均运行Sendmail 8.9.3
  
  Sendmail 8.9.3的新特性
  Sendmail 8.9.3包含几个新的特性,如果配置不当,你的Sendmail可能不能正常工作。这些特性主要是帮助过滤掉垃圾邮件和阻止你的站点被用来作为第三方的mail relay主机(什么是third-party mail relay? 附文章),你能根据你的站点所要求的政策配置这些参数。
  
  1.Mail relay
  
  在Sendmail 8.9.3中Relaying默认被拒绝了,这个特性可能使得运行Sendmail的Linux邮件服务器不允许你向它发送邮件,有几种方法来解决。
  
  a. Default
  
  默认情况下,你能简单地创建文件/etc/mail/relay-domains,它包含你希望接受relay的系统的域名,例如company.com 。如果不能做反向DNS查找,你应该清楚指明IP范围,如要允许内部网段上所有用户向其发送邮件,设为192.168.11 ,注意:你无法设置这里为company.com而允许你公司出差在外的旅行用户(拨当地ISP)来发送邮件。因为你拨到当地ISP后得到的动态IP地址属于当地ISP,反向DNS解析后的域名为ISP的域名,甚至有的不能够做反向DNS。解决办法是设置发送邮件服务器为当地ISP的服务器优点: 如果你仅仅需要relay mail from a few system,这可能是最简单的解决办法,它阻止你的服务器扮演作为relayer,但允许邮件通过。
  缺点:你不能不保持文件不断更新,如果你是ISP,你必须不断保持这个文件被更新,更新后还要重新启动Sendmail ( killall -HUP sendmail )
  
  b. promiscuous_relay
  
  这个特性允许你relay来自任何地方的邮件。(不被建议的)
  
  优点: 你不必担心邮件被拒绝
  
  缺点: 任何人能用你的系统作为mail relay,这个参数的使用取消了8.9.3中新增的反relay 特性。
  
  c. relay_entire_domain
  
  这个特性允许来自在类W中设置的所有域的邮件被允许relay.默认地,这将是*.company.com
  
  优点: 你不会担心来自你的域中的所有邮件被拒绝,你的域以外的系统不能被relay mail除非在/etc/mail/relay-domains文件中被指定或/etc/mail/access中被指定。如果你仅仅想relay你自己的域中的主机,可以用这个参数来代替/etc/mail/relay-domains. 注意: 你需要设置反向DNS,当内部LAN上的主机连接到SMTP服务器上来时能被反向解析到本地域内。如192.168.11.12被解析到sh12.asiansources.com .
  
  缺点:你可能不想允许你公司的其它组织relay mail。
  
  d. relay_hosts_only
  
  这允许你基于个别的主机名relay mail.不是域名。
  
  优点: 细调relay许可权限,基于全称主机名,不是全称域名。
  
  缺点:需要你指定或者在文件/etc/mail/relay-domains或者在access 数据库中的系统主机名。如果用
  
  /etc/mail/relay-domains,文件将是
  company.com
  mailgate.company.com
  othername.com
  mailgate.othername.com
  
  2. Mail blocking
  a. accept_unresolvable_domains
  
  默认地,如果发送者的域名(指发送者邮件地址后面的域名)不能被DNS解析 ,邮件被拒绝的。
  
  如:
  MAILFrom: wkeys@nonexistent 501 < wkeys@nonexistent>…Sender domain must exist
  
  用参数accept_unresolvable_domains 跨越这个并接受来自任何域或IP地址的邮件。
  
  b. access_db
  
  这个特性使得sendmail寻找数据库文件(默认是/etc/mail/access.db),决定是否接受或拒绝mail或者你甚至能设定一个客户化的错误信息,这个特性也能用来控制relay许可。
  
  优点:真的允许你细调将接收从谁来的邮件,如我不想接受来自不能被解析的域的邮件,但对个别域有例外。
  
  c. accept_unqualified_senders
  
  默认地,如果发送者的域不是全称域名,sendmail将拒绝这个连接。如mail from:553 …. Domain name required用这个特性跨越默认的情况以致连接将能被接受。
  
  优点:我建议总是用全称域名地址,然而在内部邮件网关上,你可能不能控制其他本地系统如何发送给你邮件,这将允许你接受带非全称发送者地址的邮件。
  
  缺点:你丢失了一些跟踪邮件来自哪里的能力,不要在防火墙上用它。
  
  d. blacklist_recipients
  
  这允许你阻止不想接受的邮件帐号发来的邮件。需要在/etc/mail/access中设置。
  
  e. relay_based_on_MX
  
  如果一台主机有MX记录指向你的站点,这个特性使得能从他们接受邮件。
  
  优点:如果他们有MX记录指向你你就不需要加任何主机到access database.
  
  缺点:这将允许第三方的mail relay,且不需要你的许可。
  
  3.third-party mail relay
  
  附另外一篇文章(文章荟萃)----sendmail 8.9.3 mail relay规则简介
  
  公司防火墙上sendmail配置举例
  divert(-1)
  include(`/usr/lib/sendmail-cf/m4/cf.m4&#39;)
  dnl let&#39;s define our OS type. This one is mandatory.
  OSTYPE(`linux&#39;)dnl
  define(`confDEF_USER_ID&#39;,``8:12&#39;&#39;)
  define(`ALIAS_FILE&#39;,`/etc/mail/aliases&#39;)dnl
  define(`confPRIVACY_FLAGS&#39;, `authwarnings,needmailhelo,noexpn,novrfy&#39;)dnl
  define(`confTO_QUEUERETURN&#39;, `4d&#39;)dnl
  define(`confTO_QUEUEWARN&#39;, `4h&#39;)dnl
  define(`PROCMAIL_MAILER_PATH&#39;,`/usr/bin/procmail&#39;)dnl
  undefine(`UUCP_RELAY&#39;)dnl
  undefine(`BITNET_RELAY&#39;) dnl
  FEATURE(`redirect&#39;)dnl
  FEATURE(`always_add_domain&#39;)dnl
  FEATURE(`use_cw_file&#39;)dnl
  FEATURE(`local_procmail&#39;)dnl
  FEATURE(`nouucp&#39;)dnl
  FEATURE(`mailertable&#39;, `hash -o /etc/mail/mailertable&#39;)dnl
  FEATURE(`virtusertable&#39;, `hash -o /etc/mail/virtusertable&#39;)dnl
  FEATURE(`domaintable&#39;,`hash -o /etc/mail/domaintable&#39;)
  FEATURE(`access_db&#39;, `hash -o /etc/mail/access&#39;)dnl
  FEATURE(`blacklist_recipients&#39;)dnl
  MAILER(procmail)dnl
  MAILER(smtp)dnl
  
  use_cw_file
  默认为/etc/sendmail.cw文件,指明了属于本地域处理的域名,发到这个域下的邮件为本地邮件。不要在防火墙上设置company.com到sendmai.cw中,在内部网段上的邮件服务器上设置它。更新该文件不需要重启sendmail
  
  * How do I make all my addresses appear to be from a single host?
  
  Using the V8 configuration macros, use:
  
  MASQUERADE_AS(my.dom.ain)
  
  This will cause all addresses to be sent out as being from the indicated domain.
  If you&#39;re using version 8.7 sendmail, and you want to hide this information in the envelope
  as well as the headers, use:
  
  FEATURE(masquerade_envelope)
  
  If you also want to masquerade the recipients, use
  
  FEATURE(allmasquerade)
  
  Mailertable
  用这个特性可跨越DNS和DNS MX记录而relay mail。也可跨越Smart_host(DSxxxx)项.
  
  如 company.com relay:[192.168.11.1]
  
  从防火墙上接收的发往company.com的邮件relay到192.168.11.1
  
  Include a \"mailer table\" which can be used to override
  routing for particular domains. The argument of the
  FEATURE may be the key definition. If none is specified,
  the definition used is:
  
  hash -o /etc/mailertable
  
  Keys in this database are fully qualified domain names
  or partial domains preceded by a dot -- for example,
  \"vangogh.CS.Berkeley.EDU\" or \".CS.Berkeley.EDU\".
  Values must be of the form:
  mailer:domain
  where \"mailer\" is the internal mailer name, and \"domain\"
  is where to send the message. These maps are not
  reflected into the message header. As a special case,
  the forms:
  local:user
  will forward to the indicated user using the local mailer,
  local:
  will forward to the original user in the e-mail address
  using the local mailer, and
  error:code message
  will give an error message with the indicated code and
  message.
  Domaintable
  
  域替换操作。
  
  如果容易打错,发往company.com的邮件误写为compayn.com则加入一行
  compayn.com company.com
  Access.db
  数据库记录包含两部分:the key and the action:
  the key能是用户名,域名,或IP地址。
  The action能是ok, relay,reject discard, or and RFC821 message
  如:
  cyber
PCOS系统下载站:http://zhuangji.wang

本版积分规则