disable policyd-weight for single mailboxes

  • Hi,


    is it possible to disable policyd-weight for single mailboxes? One Customer wants all the SPAM, but I don't want to disable it for everyone.


    I googled for documentations, but only found the other way :(


    Regards
    Dom

  • @RodNoc


    This should be possible using postfix restriction classes.
    See http://www.postfix.org/RESTRICTION_CLASS_README.html


    Basically, you create two list of smtpd restrictions:


    main.cf


    Code
    1. smtpd_restriction_classes = restrictive, permissiverestrictive = check_policy_service inet:127.0.0.1permissive = permit

    Then, always in the main.cf file, you must remove the check_policy_service inet:127.0.0.1 statement from the smtpd_recipient_restrictions smtpd restriction list (which is added by the plugin) and replace the permit restriction always from the smtpd_recipient_restrictions smtpd restriction list by check_recipient_access regexp:/etc/postfix/recipient_access


    Then, you must create the /etc/postfix/recipient_access file with following content:

    Code
    1. /^[email protected]$/ permissive
    2. /^.*$/ restrictive

    Here, patterns are applied in the order as specified in the table, until a pattern is found that matches the input string.
    First pattern is for the mailboxes (recipient) for which policy-weight must not acts), the second, for any other recipient. See http://www.postfix.org/regexp_table.5.html


    Then, reload postfix: service postfix reload


    Be aware that those changes will be lost on any i-MSCP update/reconfiguration. Best would be to create a i-MSCP listener. I'll do it for you in few days if needed.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hi,


    thank you for your help. I try to keep imscp up to date, so a reconfiguration after every update would be stupid and can cause in mistakes. If there is a listener, this would help me.


    But perhaps an idea for the plugin-developer (Only an idea, I can't tell him what he has to do ;) ):
    Is it possible to configure in the panel, if a mailbox is "protected" by policyd-weight or not? So every customer can decide it for himself.

  • @RodNoc



    Is it possible to configure in the panel, if a mailbox is "protected" by policyd-weight or not? So every customer can decide it for himself.

    That could be done but hey, the policyd-weight server is only one tool for fighting against spammers. There are many other tools such as SpamAssassin plugin, postscreen and so on... We cannot disable all of them in the same way for a specific recipient. Even worse, some of them cannot be disabled at all...


    So, again, that could be done but...

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206