只有当收件人在hotmail.com EXIM中继

我目前正在使用中继服务(mailchannels和sendgrid)每个月发送大约20万条cPanel服务的消息,但是我只想路由有HOTMAIL收件人的消息(因为它们是我们中继的主要原因邮件……我们的邮件永远不会传递到邮箱使用我们的ips – GMAIL和所有其他提供商交付没有问题)。

这是我的configuration如下所示:

SECTION: AUTH sendgrid_login: driver = plaintext public_name = LOGIN client_send = : USER : PW 

 Section: PREROUTERS send_via_sendgrid: driver = manualroute domains = ! +local_domains transport = sendgrid_smtp route_list = "* smtp.sendgrid.net::587 byname" host_find_failed = defer no_more 

 Section: TRANSPORTSTART sendgrid_smtp: driver = smtp hosts = smtp.sendgrid.net hosts_require_auth = smtp.sendgrid.net hosts_require_tls = smtp.sendgrid.net 

我知道,我应该改变PREROUTERS部分,并在那里的一些条件,但不知道如何!

任何帮助将不胜感激。

谢谢!

domains条件控制“To”地址使用这个规则。 目前这是“不在本地域组中的地址”。 更改domains行匹配hotmail.com:

 send_via_sendgrid: driver = manualroute domains = hotmail.com transport = sendgrid_smtp route_list = "* smtp.sendgrid.net::587 byname" host_find_failed = defer no_more 

对于WHM / Cpanel,对于我来说最好的解决scheme是没有问题的Cpanel的设置exim,它是:

创build一个文件/ etc / staticroutes

 hotmail.com: IP_OF_SMARTHOST__OR__FQDN otherdestinationdomain: IP_OF_SMARTHOST__OR__FQDN ... 

转到Eximconfigurationpipe理器 – >高级编辑器 – >部分:POSTMAILCOUNT

  static_route: driver = manualroute transport = remote_smtp route_data = ${lookup{$domain}partial-lsearch{/etc/staticroutes}} 

惠特这个configuration,你可以使用多个智能主机和diferents路由,当Cpanel更新exim你可以丢失的变化。

Exim配置管理器