Mail gateway server with amavis on CentOS 8

Matus UHLAR - fantomas uhlar at fantomas.sk
Mon Dec 28 13:01:24 CET 2020


>On 17/12/2020 12:31 μ.μ., Nikolaos Milas wrote:
>>I have been using a mail gateway with 
>>postfix/amavis/clamav/spamassassin for many years on CentOS 6.
>>
>>I am now struggling to build a new system on CentOS 8 with the same 
>>components (and the same configuration) to replace the original one, 
>>but it is quite different from the original, so I will appreciate 
>>your guidance.

On 28.12.20 13:35, Nikolaos Milas wrote:
>Following my above post, I would like to send an update and ask on 
>bayes database migration.
>
>I have managed to answer most of my own questions and now I have a 
>working setup.
>
>During the migration I have migrated the bayes db from the older 
>(CentOS 6) setup to the new (CentOS 8) server as follows:
>
>On original Server:
>
>   # su amavis
>   sh-4.1$ sa-learn --dbpath '/var/amavis/var/.spamassassin' --backup >
>   bayes-mailgw3.db
>
>On new server (after scp transfer and chown to amavis:amavis):
>
>   # su amavis
>   sh-4.4$ pwd
>   /var/spool/amavisd
>   sh-4.4$ sa-learn --dbpath /var/spool/amavisd/var/.spamassassin/ --clear
>   sh-4.4$ sa-learn --dbpath /var/spool/amavisd/var/.spamassassin/
>   --restore bayes-mailgw3.db
>   sh-4.4$ ls -la var/.spamassassin/
>   total 8620
>   drwx------. 2 amavis amavis    4096 Dec 21 15:23 .
>   drwx------. 4 amavis amavis    4096 Dec 16 16:53 ..
>   -rw-------. 1 amavis amavis  659456 Dec 21 15:23 bayes_seen
>   -rw-------. 1 amavis amavis 9490432 Dec 21 15:23 bayes_toks
>
>I would expect this db to be working fine and I anticipated similar 
>filtering results on both servers, but sending a test email to both 
>servers, produces different results (note: I have restarted amavisd 
>after db migration):
>
>On original server:
>
>   score=12.436 tag=-999 tag2=3.4 kill=5.2 tests=[ARCHIVE_PASSWORD=5,
>   BAYES_999=2.7, BAYES_99=3.7, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1,
>   NO_FM_NAME_IP_HOSTN=0.934, URIBL_BLOCKED=0.001] autolearn=disabled
>
>On new server:
>
>   score=3.204 tagged_above=-999 required=3.4
>   tests=[ARCHIVE_PASSWORD=5, BAYES_00=-1.9, HTML_MESSAGE=0.001,
>   MIME_HTML_ONLY=0.1, NO_FM_NAME_IP_HOSTN=0.001, SPF_NONE=0.001,
>   URIBL_BLOCKED=0.001] autolearn=disabled
>
>All configs have been migrated unchanged from the original to the new 
>server.
>
>Please advise on what I may be doing wrong in setting up the migrated db!
>
>Why do the two servers produce so different results in terms of BAYES 
>filtering (BAYES_999=2.7, BAYES_99=3.7 vs BAYES_00=-1.9)?

score 2.7 for BAYES_999 is manually tuned. the original is 0.2

are you sure that /var/spool/amavisd/var/.spamassassin/ is correct path?
try "locate bayes_seen" to find out.

-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Spam is for losers who can't get business any other way.


More information about the amavis-users mailing list