1

Topic: amavis and DKIM and spam

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.5
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Linux Ubuntu 22
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I found some problem with amavis and DKIM signing

Scenario 1:

1)user auth via 587 and send e-mail:

Oct 18 10:36:58 mail2 amavis[46786]: (46786-01) Passed CLEAN {RelayedInternal}, ORIGINATING LOCAL [46.xxx.xxx.110]:34786 [46.xxx.xxx.110] ESMTP/ESMTP <admin@mail-test.hicon.pl> -> <yyy@yyy.pl>, (ESMTPSA://[46.xxx.xxx.110]:34786), Queue-ID: 4S9S2d2D7Yz1xyf, Message-ID: <aae27aad-3013-46e8-84ba-c2c688120a02@domain.pl>, mail_id: QSP3zqdS6ZOm, b: 68PZ0YxpM, Hits: -0.998, size: 1807, queued_as: 4S9S2f0JJvz1xyk, Subject: "Re: asd", From: <admin@domain.pl>, User-Agent: Mozilla_Thunderbird, helo=[10.10.0.20], Tests: [ALL_TRUSTED=-1,HTML_MESSAGE=0.001,URIBL_BLOCKED=0.001], autolearn=ham autolearn_force=no, autolearnscore=0.001, dkim_new=dkim:domain.pl, 607 ms

Works fine e-mail was signed

2)user auth via 587 and send e-mail with examle ptencjail spam:
Oct 18 10:37:23 mail2 amavis[46787]: (46787-01) Passed SPAM {RelayedTaggedInternal}, ORIGINATING LOCAL [46.xxx.xxx.110]:34786 [46.248.174.110] ESMTP/ESMTP <admin@domain.pl> -> <yyy@yyy.pl>, (ESMTPSA://[46.xxx.xxx.110]:34786), Queue-ID: 4S9S366Vtnz1xyf, Message-ID: <c269ce2f-df6e-480c-a8e6-dd43d4e02df6@domain.pl>, mail_id: qhCqBdK7D-KL, b: 7-_X6WQNw, Hits: 14.002, size: 1807, queued_as: 4S9S373qKkz1xym, Subject: "Re: asd", From: <admin@domain.pl>, User-Agent: Mozilla_Thunderbird, helo=[10.10.0.20], Tests: [ALL_TRUSTED=-1,HTML_MESSAGE=0.001,SPAM_TEST_RULE=15,URIBL_BLOCKED=0.001], autolearn=no autolearn_force=no, autolearnscore=15.001, 500 ms

And this time e-mail was taged SPAM and not signed DKIM

Is any change to signed thats e-mail ? when e-mail is positivie false normal - it weel not be signed

Any idea ?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: amavis and DKIM and spam

mami64 wrote:

Is any change to signed thats e-mail ? when e-mail is positivie false normal - it weel not be signed

Seems your email contains the spam test characters because it triggers "SPAM_TEST_RULE=15".

3

Re: amavis and DKIM and spam

ZhangHuangbin wrote:
mami64 wrote:

Is any change to signed thats e-mail ? when e-mail is positivie false normal - it weel not be signed

Seems your email contains the spam test characters because it triggers "SPAM_TEST_RULE=15".

Sorry probably You didn't read to the end smile

I create rule "SPAM_TEST_RULE=15" for test
My question was:

"Why is the DKIM key not added when the sample message is marked as spam?" - I mean outgoing
That's why I created "SPAM_TEST_RULE=15" to check

In the case of falsepozitive, the message will be sent from the my server (outgoing meessage) but will not be signed with DKIM, which is not a correct solution:

1) message cannot be send and user inform the user when user try send
2) it should be marked as spam but with a signature DKIM

4

Re: amavis and DKIM and spam

If it's detected as spam, why waste system resource to sign DKIm signature?

5

Re: amavis and DKIM and spam

ZhangHuangbin wrote:

If it's detected as spam, why waste system resource to sign DKIm signature?

Like false pozitive ?
Or if there is spam, prevent sending at the client's smtp level
Because allowing spam to be sent (whether signed or not is weak)