postfix端口修改linux下发送email的smtp端口unbuntu
2016-08-24 09:49
344 查看
有的时候SMTP的默认25端口不能用会导致无法使用邮箱功能,解决办法就是添加多端口。
1、修改postfix的配置文件
vim /etc/postfix/master.cf
在已有第一行:
smtp inet n - n - - smtpd
之后添加:
smtp2 inet n - n - - smtpd
2、修改/etc/services文件,增加smtp2监听端口,本文以2525端口为例
vim /etc/services
找到:
smtp 25/tcp mail
其后添加:
smtp2 2525/tcp mail2
smtp2 2525/udp mail2
3、重启postfix
service postfix restart
4、查看防火墙是否对端口2525有限制,修改防火墙策略
-A INPUT -p tcp -m multiport --dports 2525,25 -j ACCEPT
重启防火墙
1、修改postfix的配置文件
vim /etc/postfix/master.cf
在已有第一行:
smtp inet n - n - - smtpd
之后添加:
smtp2 inet n - n - - smtpd
2、修改/etc/services文件,增加smtp2监听端口,本文以2525端口为例
vim /etc/services
找到:
smtp 25/tcp mail
其后添加:
smtp2 2525/tcp mail2
smtp2 2525/udp mail2
3、重启postfix
service postfix restart
4、查看防火墙是否对端口2525有限制,修改防火墙策略
-A INPUT -p tcp -m multiport --dports 2525,25 -j ACCEPT
重启防火墙
相关文章推荐
- LightOJ 1138Trailing Zeroes (III)(二分)
- LightOJ 1282 Leading and Trailing
- LightOJ 1138 Trailing Zeroes (III)
- 219. Contains Duplicate II
- 为什么wait()和notify()需要搭配synchonized关键字使用
- Invalid bean definition with name 'mailSender' defined in class path resource [office.mail.xml
- 6.MyBaits的分页和缓存查询
- LIGHToj 1282 - Leading and Trailing 【对数+快速幂取模】
- 异步爬虫: async/await 与 aiohttp的使用,以及例子
- DefaultMessageListenerContainer
- lsd:constraintSearchThreadLoop线程
- Training图像篇之一:Loading Large Bitmaps Efficiently
- 详解Paint的setPathEffect(PathEffect effect)
- 暑假练习赛 007 E - Pairs
- 【LightOJ 1138 Trailing Zeroes (III)】
- 【Light-oj】-1138 - Trailing Zeroes (III)(二分,数学)
- 【Lightoj 1282 Leading and Trailing】
- 【Light-oj】-1282 - Leading and Trailing(数论,快速幂,log,好)
- Light-oj 1282 - Leading and Trailing
- Lightoj 1282 (Leading and Trailing)