> On 2024-09-10 19:10 Danjel Jungersen via Postfix-users:
> Den 09.09.2024 kl. 15.14 skrev Wietse Venema via Postfix-users:
>> Danjel Jungersen via Postfix-users:
>>> On 09-09-2024 13:46, chandan via Postfix-users wrote:
>>>> On 2024-09-09 10:53, Danjel Jungersen via Postfix-users wrote:
>>>>> Hey!
>>>>> 
>>>>> I have set up clamav, and I think it works....
>>>>> But when a mail is recieved, it is first scanned by rspamd and then 
>>>>> clamav. Thats all fine.
>>>>> But when clamav is done, rspamd scans it again.
>>>> you are using amavis as content filter with clamav
>>>> 
>>>> you are probably using rspamd with clamav module as a milter
>>>> 
>>>> so clamav scans your mail twice.
>>>> 
>>>> what is the problem?
>>> The problem is that rspamd scan the mail twice. (according to the 
>>> webinterface).
>>> 
>>> And the second scan has a higher score, and could therefore be rejected.
>>> But at that time the mail "comes" from me, so I'm rejecting myself and I 
>>> think this will cause problems.
>>> Or maybe I'm wrong?
>> If yoiu weant help, provide the information that I asked for before.
>> Then someone can tell you what change is needed.
>> 
> I tried the solution where rspamd should handle it, but have now reverted to 
> the original setup.
> 
> After I reverted I'm back to my original problem...
> Rspamd scans the mail again after clamav has done its job.
> 
In master.cf you have configured:

127.0.0.1:10025 inet n   -       n       -       -       smtpd 
   -o content_filter= 
   ...

Emails are not scanned after amavis reinjection because content_filter
is unset, but milters are still available. Try to add

  -o smtpd_milters=
  -o non_smtpd_milters=

In general there is no need to run both amavis (spamassassin) and rspamd.
Rspamd is chosen for speed and capabilities (complex configuration) and
amavis for easy setup (slow scanning).

Moreover content_filter passes emails to amavis after they are queued.
In case amavis comes to the conclusion an email is spam, it would have
to send a bounce. This will harm your mailserver's ip reputation due to
backscatter whereas milters can reject spam emails early at smtp stage.

Best regards,
Gerald
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to