配置postfix能自由转发内网的邮件: 就改一个地方即可

vi /etc/postfix/main.cf  
...
mynetworks = 127.0.0.0/8, 172.16.0.0/16  
...

配置个黑洞,所有邮件都受到,然后drop掉

relayhost =  
relay_transport = relay  
relay_domains = static:ALL  
smtpd_end_of_data_restrictions = check_client_access static:discard  

当然,也可以把这些邮件都给送到amavis去,训练找出垃圾邮件

测试邮件发送的命令:

echo "body of your email" | mail -s "This is a Subject os version" -r "abc@kindlefan.xin" test@abc.com  

注意:CentOS和Ubuntu居然都没有mail这条命令的话

yum install mailx  
apt-get install bsd-mailx  
comments powered by Disqus