In a specific case, when I send an e-mail message through thunderbird, the message arrives without the DKIM key and identified as spam at the source:
X-Virus-Scanned: amavisd-new at mailserver.example.com
X-Spam-Flag: YES
X-Spam-Score: 5.591
X-Spam-Level: *****
X-Spam-Status: Yes, score=5.591 tagged_above=1 required=4.5 tests=[ALL_TRUSTED=-1, DC_GIF_UNO_LARGO=1.323, HTML_IMAGE_ONLY_04=0.342, HTML_MESSAGE=0.001, MPART_ALT_DIFF=0.724, SB_GIF_AND_NO_URIS=2.199, TO_NO_BRKTS_HTML_IMG=2, TVD_SPACE_RATIO=0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
In the logs, it looks like this:
Sep 10 17:02:15 mailserver amavis[10085]: (10085-20) Passed SPAMMY {RelayedTaggedInternal}, ORIGINATING LOCAL [179.179.39.20]:51328 [179.179.39.20] <username@mydomain.com> -> <username@destinationdomain.com>, Queue-ID: 651981536, Message-ID: <fd322332-55e8-9e14-9e3f-271cf3e48f60@mydomain.com>, mail_id: WnptjhExD5Me, Hits: 5.591, size: 21343, queued_as: A77831540, 487 ms
If I send through webmail, which is on the same network as the server, and other networks, the message arrives with the DKIM key and without the spam tag in the source.
In the logs, it looks like this:
Sep 10 14:37:33 mailserver amavis[10085]: (10085-03) Passed CLEAN {RelayedInternal}, ORIGINATING/MYNETS LOCAL [10.99.0.10]:40774 <username@mydomain.com> -> <username@destinationdomain.com>, Queue-ID: 18EEA1251, Message-ID: <bb247980929a434354bf70020c457575@mydomain.com>, mail_id: YsTVvEBEP7SG, Hits: -0.999, size: 1212, queued_as: A31801540, dkim_new=default:mydomain.com, 516 ms
Sep 10 14:37:33 mailserver postfix/smtp[13458]: 18EEA1251: to=<username@destinationdomain.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.62, delays=0.09/0.01/0.01/0.51, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as A31801540)
What could be causing this?