测试包括
- 发送到内部邮件地址 (个人)
- 发送到外部邮件地址
- 发送到内部邮件地址 (邮件列表)
- 同时发送到内部、外部邮件地址
smarthost_cg:
debug_print = "R: smarthost_cg for $local_part@$domain"
driver = manualroute
domains = ! +local_domains : +cg_domains
transport = remote_smtp_smarthost_cg
route_list = * cg.com.cn byname
host_find_failed = defer
same_domain_copy_routing = yes
no_more
remote_smtp_smarthost_cg:
debug_print = "T: remote_smtp_smarthost_cg for $local_part@$domain"
driver = smtp
hosts_try_auth = ${if exists {CONFDIR/passwd.client}\
{${extract{1}{:}{cg.com.cn}}}\
{}\
}
tls_tempfail_tryclear = false
headers_rewrite = *@+local_domains wangxu@cg.com.cn frs : *@wangxu-doc.cn wangxu@cg.com.cn frs
return_path = ${if match_domain{$sender_address_domain}{+local_domains}{wangxu@cg.com.cn}{${if match_domain{$sender_address_domain}{wangxu-doc.cn}{wangxu@cg.com.cn}fail}}}