Dear all,
I set up spam filtering with rspamd and exim.
But only internal emails are scanned. Emails fetched by fetchmail are not
scanned.
How do I  configure rspamd/exim to scan incoming mails from fetchmail?

My config so far:

acl_smtp_mail = acl_check_mail
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
acl_smtp_mime = acl_check_mime

spamd_address = 127.0.0.1 11333 variant=rspamd

acl_check_data:
accept hosts = +relay_from_hosts
warn spam =  _rspamd:true          ####Debian11 it is the rspamd user

remove_header=Subject
 # create a new subject
 add_header = Subject: ***SPAM (score: $spam_score)*** $rh_Subject:

defer message    = Please try again later
        condition  = ${if eq{$spam_action}{soft reject}}

  deny  message    = Message discarded as high-probability spam
        condition  = ${if eq{$spam_action}{reject}}

  # Remove foreign headers
  warn 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
    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
    ! condition  = ${if match{$spam_action}{^no action\$|^greylist\$|^\$}}
    add_header = X-Spam-Status: Yes

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

Greetings
Daniel




-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to