Sendmail和匹配的收件人列表已知,非本地,地址

我后面的function类似于后缀的relay_recipients,但我需要在sendmail中完成。 我有一个已知的良好的收件人地址列表,这台服务器上的这台机器作为面向networking的前端(邮件从外面进来,它在外部盒子上被预先处理,并且最终传递到内部盒子。邮件服务器)我不能做呼叫转移或LDAP查询“。

这可能是sendmail的一个* .db文件的一个特性,但是我的记忆或理解 – 或者两者兼而有之 – 目前正在让我失望。

注意:这是一个mailwatch / mailscanner框,所以邮件在本地排队,过滤,然后交付。

您可以使用FEAUTURE(virtusertable)来获得相当于postfix relay_recipients_maps

sendmail.mc

LOCAL_CONFIG dnl virtusertable works by default only for local email domains dnl $={VirtHost} lists non local domains served by virtusertable C{VirtHost}example.net divert(0) dnl _VIRTUSER_STOP_ONE_LEVEL_RECURSION_ is described in m4/proto.m4 file define(`_VIRTUSER_STOP_ONE_LEVEL_RECURSION_')dnl FEATURE(`virtusertable') 

virtusertable文件(需要makemap编译):

 # list of valid emails in example.net [email protected] %0 [email protected] %0 # default entry for example.net @example.net ERROR:5.1.1:550 User unknown 

https://groups.google.com/forum/#!topic/comp.mail.sendmail/owHMoZIAkDg消息:来自2006的comp.mail.sendmail线程。

顺便说一句,你可以使用标准的sendmail映射(散列,btree,..)FEATURE(ldap_routing),而不是LDAP查找。

我最终诉诸使用(FEATURE( access_db', hash -T -o /etc/mail/access.db')):

 To:[email protected] RELAY To:[email protected] RELAY .... robintur.it DENY 

行为是根据需要的。