配置postfix转发局域网邮件以及邮件黑洞

配置postfix允许自由转发内网的邮件,就改一个地方即可,添加允许发送的内网网段:

1vi /etc/postfix/main.cf  
2...
3mynetworks = 127.0.0.0/8, 172.16.0.0/16  
4...

配置黑洞,所有邮件都接受,然后drop丢掉

1relayhost =  
2relay_transport = relay  
3relay_domains = static:ALL  
4smtpd_end_of_data_restrictions = check_client_access static:discard  

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

测试邮件发送的命令:

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

注意:CentOSUbuntu默认居然都没有mail这条命令的话

1yum install mailx  
2apt-get install bsd-mailx  

Ext4分区的缩小
两台不同系统上Jenkins的联动
comments powered by Disqus