Whitelist/Backlist not work with Exim + Rspamd

mean

Verified User
Joined
Feb 14, 2007
Messages
103
Hello support team.

Now whitelist/backlist not work with exim + rspamd
I add whitelist/backlist on the USER LEVEL > SpamAssassin Setup


this config is correct right?
/etc/rspamd/users.d/USERNAME.conf and /etc/virtual/DOMAIN.co.th/filter

/etc/rspamd/users.d/USERNAME.conf
Code:
USERNAME_prefs {
        id = "USERNAME_prefs";
        priority = medium;
        rcpt = "[email protected]"

        rcpt = "@abc.co.th"
        apply {
                actions {
                        greylist = null;
                        "add header" = 5.0;
                }
        }
}
USERNAME_blacklist {
        priority = high;
        rcpt = "[email protected]"
        rcpt = "@abc.co.th"
        from = "/^.*@bogatyrtrans\\.kz$/"
        from = "/^.*@fis\\.am$/"
        from = "/^.*@kosmothess\\.gr$/"
        from = "/^.*@mail\\.com$/"
        from = "/^.*@slot0\\.maryislanders\\.com$/"
        from = "/^.*@than-th\\.co$/"
        from = "/^.*@vardziacave\\.com$/"
        from = "[email protected]"
        apply {
                actions {
                        reject = -999;
                        greylist = null;
                        "add header" = null;
                }
        }
}
USERNAME_whitelist {
        priority = 4;
        rcpt = "[email protected]"
        rcpt = "@abc.co.th"
        from = "/.*@besttechcorp\\.co\\.th/"
        from = "/.*@cnsanmu\\.com/"
        from = "/.*@harn\\.co\\.th/"
        from = "/.*@kasikornbank\\.com/"
        from = "/.*@onet\\.co\\.th/"
        from = "/.*@pattonth\\.com/"
        from = "/.*@qintersupply\\.com/"
        from = "/.*@rohlig\\.com/"
        from = "/.*@rollerthailand\\.com/"
        from = "/.*@sanyosmi\\.com/"
        from = "/.*@than\\.co\\.th/"
        from = "/.*@worldcool\\.co\\.th/"
        from = "/^air\\.krit@gmail\\.com$/"
        from = "/^anan@sanyosmi\\.com$/"
        from = "/^eanairsupply@gmail\\.com$/"
        from = "/^jirawan\\.o@thaniyagroup\\.com$/"
        from = "/^narisara@sanyosmi\\.com$/"
        from = "/^purchase@than\\.co\\.th$/"
        from = "/^suthisaj@pattonth\\.com$/"
        want_spam = yes;
}

/etc/virtual/DOMAIN.co.th/filter
Code:
# Exim Filter

# created by DirectAdmin, version 1.61.5
# Do not modify this file as any changes will be
# overwritten when the user makes a change.
# (data is only written to this file, not read)

if
        $sender_address matches ".*@besttechcorp\\\\.co\\\\.th\\$"
        or $sender_address matches ".*@cnsanmu\\\\.com\\$"
        or $sender_address matches ".*@harn\\\\.co\\\\.th\\$"
        or $sender_address matches ".*@kasikornbank\\\\.com\\$"
        or $sender_address matches ".*@onet\\\\.co\\\\.th\\$"
        or $sender_address matches ".*@pattonth\\\\.com\\$"
        or $sender_address matches ".*@qintersupply\\\\.com\\$"
        or $sender_address matches ".*@rohlig\\\\.com\\$"
        or $sender_address matches ".*@rollerthailand\\\\.com\\$"
        or $sender_address matches ".*@sanyosmi\\\\.com\\$"
        or $sender_address matches ".*@than\\\\.co\\\\.th\\$"
        or $sender_address matches ".*@worldcool\\\\.co\\\\.th\\$"
        or $sender_address contains "[email protected]"
        or $sender_address contains "[email protected]"
        or $sender_address contains "[email protected]"
        or $sender_address contains "[email protected]"
        or $sender_address contains "[email protected]"
        or $sender_address contains "[email protected]"
        or $sender_address contains "[email protected]"
then
        finish
endif


if
    $h_X-Spam-Status: contains "Yes,"
then
    if
        $local_part is "USERNAME"
    then

        save /home/USERNAME/Maildir/.INBOX.spam/new/ 660
    else
        if "${if exists{/home/USERNAME/imap/${domain}/${local_part}}{yes}{no}}" is "yes"
        then
            save /home/USERNAME/imap/$domain/$local_part/Maildir/.INBOX.spam/new/ 660
        else
            save /home/USERNAME/Maildir/.INBOX.spam/new/ 660
        endif

    endif
    finish
endif

if error_message then finish endif

if
        $header_from: contains "[email protected]"
        or $header_from: contains "[email protected]"
        or $header_from: contains "[email protected]"
        or $header_from: contains "[email protected]"
then
        seen finish
endif

#end filter

/usr/local/directadmin/data/templates/filter_base
Code:
# Exim Filter

# created by |NAME|, version |VERSION|
# Do not modify this file as any changes will be
# overwritten when the user makes a change.
# (data is only written to this file, not read)

|FROM_WHITELIST|

|*if BLOCKLEVEL|
if
        $h_X-Spam-Level: contains "|BLOCKLEVEL|"
then
        seen finish
endif
|*endif|

|SPAMFILTERS|

if error_message then finish endif

|WORDFILTERS|

|ADULTFILTERS|

#end filter


Package Installed.
  • DirectAdmin 1.61.5 Running
  • Exim 4.94 Running
  • dovecot 2.3.14 (cee3cbc0d) Running
  • Rspamd daemon version 2.7
  • Rspamd web interface 0.2.4
custombuild options.conf
  • spamd=rspamd
  • #Mail Settings
  • exim=yes
  • eximconf=yes
  • eximconf_release=4.5
  • blockcracking=yes
  • easy_spam_fighter=yes
  • sa_update=daily
  • dovecot=yes
  • dovecot_conf=yes
  • pigeonhole=no
Thank you so much.
 

Attachments

  • 2021-04-10_170812.jpg
    2021-04-10_170812.jpg
    220.7 KB · Views: 49
Last edited:
Back
Top