[exim] Re: how to enable both spamassassin and rspamd to run…

Góra strony
Delete this message
Reply to this message
Autor: Sławomir Dworaczek
Data:  
Dla: exim-users
Temat: [exim] Re: how to enable both spamassassin and rspamd to run together
Heloo

Unfortunately it doesn't work, in the rspamd interface I can't see the 
scanned emails, if you set spamd_address - 127.0.0.1 11333 variant=rspamd 
then rspamd works


My settings

spamd_address = $acl_m_spamengine

acl_check_content:

  # scan the message with rspamd
  warn spam = nobody:true


  # use greylisting available in rspamd v1.3+
  defer message    = Please try again later
 set acl_m_spamengine = 127.0.0.1 11333 variant=rspamd
        condition  = ${if eq{$spam_action}{soft reject}}

  deny  message    = Message discarded as high-probability spam
 set acl_m_spamengine = 127.0.0.1 11333 variant=rspamd
        condition  = ${if eq{$spam_action}{reject}}

  # Remove foreign headers
  warn
 set acl_m_spamengine = 127.0.0.1 11333 variant=rspamd
 remove_header = x-spam-bar : x-spam-score : x-spam-report : x-spam-status

  # add spam-score and spam-report header when "add header" action is 
recommended by rspamd
  warn
    set acl_m_spamengine = 127.0.0.1 11333 variant=rspamd
    condition  = ${if eq{$spam_action}{add header}}
    add_header = X-Spam-Score: $spam_score ($spam_bar)
    add_header = X-Spam-Report: $spam_report

  # add x-spam-status header if message is not ham
  # do not match when $spam_action is empty (e.g. when rspamd is not 
running)
  warn
    set acl_m_spamengine = 127.0.0.1 11333 variant=rspamd
    ! condition  = ${if match{$spam_action}{^no action\$|^greylist\$|^\$}}
    add_header = X-Spam-Status: Yes

  # add x-spam-bar header if score is positive
  warn
    set acl_m_spamengine = 127.0.0.1 11333 variant=rspamd
    condition = ${if >{$spam_score_int}{0}}
    add_header = X-Spam-Bar: $spam_bar

  accept
----- Original Message ----- 
From: "James via Exim-users" <exim-users@???>
To: <exim-users@???>
Sent: Wednesday, September 6, 2023 3:36 PM
Subject: [exim] Re: how to enable both spamassassin and rspamd to run 
together


> On 05/09/2023 17:04, Sławomir Dworaczek via Exim-users wrote:
>
>> Is it possible to run spamassassin and rspamd at the same time
>
> Yes. (Although I don't use rspamd this should work.) See:
>
> https://www.exim.org/exim-html-current/doc/html/spec_html/ch-content_scanning_at_acl_time.html
>
> "The spamd_address variable is expanded before use if it starts with a
> dollar sign."
>
> So I set:
>
> spamd_address = $acl_m_spamengine
>
> In the acl which I split into sub acls but the flow is:
>
> # set the spam engine
> set acl_m_spamengine = 127.0.0.1:783
> # invoke the spam engine
> spam = ...
> # save the result
> set acl_m_sa_score = $spam_score_int ...
> # set another spam engine
> set acl_m_spamengine = 127.0.0.1:9783
> # invoke the spam engine
> spam = ...
> # save the result
> set acl_m_jspamd_score = $spam_score_int ...
> # process results do decide if deny or accept
>
>
>
>
>
> --
> ## subscription configuration (requires account):
> ##
> https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
> ## unsubscribe (doesn't require an account):
> ## exim-users-unsubscribe@???
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>



--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/