2019年11月

iRedMail - 删除灰名单模块 - iRedAPD - greylisting - 添加白名单

现象:用iRedMail建的邮局,收发腾讯系的邮件时,会慢。

尝试:

1.编辑 /opt/iredapd/settings.py 配置文件,将其中 plugins 默认启用的 greylisting 模块给删除,如
plugins = ['reject_null_sender', 'amavisd_wblist', 'throttle', 'reject_sender_login_mismatch']

2.将腾讯系的邮局域后缀添加到白名单中 python /opt/iredapd/tools/wblist_admin.py -add --whitelist @qq.org @vip.qq.com @foxmail.com

3.重启iRedAPD服务

参考:https://docs.iredmail.org/manage.iredapd.html

iRedMail - 禁用STARTTLS

问题:在国内的centos7机子安装 iRedMail ,没有ICP备案,不能通过域名访问到Web页面,无法通过文件验证来申请到免费的SSL证书。

尝试:

1.编辑 /etc/dovecot/dovecot.conf 文件内容,将原:

disable_plaintext_auth=yes
ssl=required

更改为:

disable_plaintext_auth=no
ssl=yes

2.编辑 /etc/postfix/main.cf 文件内容,

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
# smtpd_tls_auth_only=yes

3.之后重启dovecot和postfix服务,令新配置生效

参考:https://docs.iredmail.org/allow.insecure.pop3.imap.smtp.connections.html

cPanel - 禁用 Network Manager 服务

现象:在本地的虚拟机里通过iso安装的centos7系统,安装 cPanel/WHM 时,提示错误

cPanel does not support NetworkManager enabled systems. The installation cannot proceed.

cpanel-local-nm-service.png

尝试:

1.systemctl stop NetworkManager # 停止 NetworkManager 服务
2.systemctl disable NetworkManager # 禁用 NetworkManager 服务
3.systemctl enable network.service # 启用 network 服务
4.systemctl start network.service # 启动 network 服务

参考:https://documentation.cpanel.net/display/CKB/How+to+Disable+Network+Manager

nmap - ping测试IP段

需求:一个服务器,配置了四段IP,每段有61个IP。怎么快速测试,看能否ping通呢?

尝试:用 nmap -T5 -sP 192.168.3.2-62 试试。

或用 nmap -v -sn -n 192.168.3.2-62 -oG - | awk '/Status: Down/{print $2}' 来快速筛选ping不通的IP。

参考:

iredmail - 域邮件 - 密送地址设置

需求:将域里收到的邮件,抄送一份到指定的邮件地址。

尝试:

1.编辑 /etc/postfix/main.cf 配置文件内容,加上一行 recipient_bcc_maps = hash:/etc/postfix/recipient_bcc_maps

2.创建文件 /etc/postfix/recipient_bcc_maps ,内容如:@anqun.org all-in@anqun.org 即将发到@anqun.org域的所有邮件,抄送一份到 all-in@anqun.org

3.postmap /etc/postfix/recipient_bcc_maps 让新内容生效

4.重启postfix服务

参考: