• postfix 邮箱服务器


    Postfix 限制 QQ 邮箱发送到 我的 test.com 域下邮箱。

    1、编辑 main.cf  添加限制:

    smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access

    编辑 ~/etc/postfix/main.cf 
    smtpd_sender_restrictions =
            permit_mynetworks,
            reject_sender_login_mismatch,
            reject_authenticated_sender_login_mismatch,
            reject_unauthenticated_sender_login_mismatch
    
    添加以下access示例;
    smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access

    2、编辑  创建  /etc/postfix/sender_access 文件 (限制 策略)

    限制示例 :
    qq.com REJECT
    # 拒绝 qq 邮箱的发送所有邮件。 mail.qq.com REJECT example.com REJECT
    0.0.0.0/0 REJECT /increase your sales by / REJECT /in compliance (with|of) strict/ REJECT /lowest rates.*!/ REJECT /[:alpha:]<!--.*-->[:alpha:]/ REJECT /name ?="?.*.(bat|scr|com|dll|exe|hta|pif|vbs)"?/ REJECT
    # 其他 钓鱼邮件策略。

     3、重启  postfix , postmap  加载sender_access 定义 策略:

    postmap 会加载生产一个  sender_access.db 文件;

    每次变更sender_access 文件都需要重新加载生成、限制策略才会生效。

    postmap hash:/etc/postfix/sender_access
    
    # /etc/init.d/postfix restart

     使用 QQ 邮箱发送给 test.com域下邮件 提示退回。

  • 相关阅读:
    .NET 4.0 中的契约式编程
    DELL安装Windows Server 2019
    Mysql 5.7.34免安装版本
    MQTT
    WPF属性
    WPF数据绑定
    git系列之(五)git stash 命令
    Vue.js
    git 对比两个分支差异
    TPL 之二 TransformBlock
  • 原文地址:https://www.cnblogs.com/sharesdk/p/10222181.html
Copyright © 2020-2023  润新知