zoukankan      html  css  js  c++  java
  • 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域下邮件 提示退回。

  • 相关阅读:
    hdu1403(后缀数组模板)
    输入外挂模板
    hdu2896(ac自动机)
    hdu2222(ac自动机模板)
    codevs1169, 51nod1084(多线程dp)
    codevs3027(dp)
    codevs1068(dp)
    大数乘法模板
    Java锁--框架
    Java并发包--ConcurrentLinkedQueue
  • 原文地址:https://www.cnblogs.com/sharesdk/p/10222181.html
Copyright © 2011-2022 走看看