Mulriple eFa servers one bayes database
Posted: 23 May 2024 19:49
Hello,
We have multiple eFa servers running as spam firewalls (for both incoming and outgoing emails). However we had some different spam scores based on the bayes database on each server. The next logical step was to use only 1 database, so this is what we did:
1. In one of our servers (the one with over 20m tokens) we created a new mysql user which was granted all privileges and access from the rest of the eFA databases.
2. Modified /etc/mail/mailscanner.cf and changed the following lines:
bayes_sql_dsn DBI:mysql:sa_bayes:main.sql.server
bayes_sql_username sa_remote
bayes_sql_password thenewpassword
bayes_sql_override_username postfix
3. Restarted mailscanner and spamassasin using:
service mailscanner restart
service spamassasin restart
Now, if I run a lint test, I can see that it connects to the main.sql.server. I've also manually tested the connection to ensure that the username/password are right and that it has access to the remote database.
If I run:
spamassassin -D -t < /var/spool/MailScanner/quarantine/20240523/nonspam/OneOfTheIds
Everything seems fine and we get a bayes spam probability.
So far, everything looks good....
But when I log into mailwatch, I can't see any BAYES probability in the spam report, it's not logged to the maillog table in MySQL and there's no way for us to know if it's actually being calculated or not.
Any help will be greatly appreciated.
We have multiple eFa servers running as spam firewalls (for both incoming and outgoing emails). However we had some different spam scores based on the bayes database on each server. The next logical step was to use only 1 database, so this is what we did:
1. In one of our servers (the one with over 20m tokens) we created a new mysql user which was granted all privileges and access from the rest of the eFA databases.
2. Modified /etc/mail/mailscanner.cf and changed the following lines:
bayes_sql_dsn DBI:mysql:sa_bayes:main.sql.server
bayes_sql_username sa_remote
bayes_sql_password thenewpassword
bayes_sql_override_username postfix
3. Restarted mailscanner and spamassasin using:
service mailscanner restart
service spamassasin restart
Now, if I run a lint test, I can see that it connects to the main.sql.server. I've also manually tested the connection to ensure that the username/password are right and that it has access to the remote database.
If I run:
spamassassin -D -t < /var/spool/MailScanner/quarantine/20240523/nonspam/OneOfTheIds
Everything seems fine and we get a bayes spam probability.
So far, everything looks good....
But when I log into mailwatch, I can't see any BAYES probability in the spam report, it's not logged to the maillog table in MySQL and there's no way for us to know if it's actually being calculated or not.
Any help will be greatly appreciated.