• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Fix for Spam Assassin disabled in mailboxes.

P

philb@

Guest
Ok, after fighting with a migration where a lot of mailboxes had SA disabled by default, I did some digging into the cause.

WARNING, YOU WILL BE DIRECTLY MANIPULATING DATA IN MYSQL IF YOU FOLLOW THIS PROCEDURE. IF YOU BREAK YOUR SERVER, IT'S YOUR PROBLEM, NOT MINE. MAKE A BACKUP FIRST.

There is a table in psa named sa_conf. it was missing the mail names for the accounts that were locked.

To view it, you can do this:

mysql -u admin -p

You will have to answer the password prompt with your Plesk admin password.

then

use psa;

next, you can view the table in question with

select * from sa_conf;

If the mailboxes that are locked away from SA are also missing from this list, that is the problem. Paste the following mysql command and run it and it will put all mailboxes that are defined on your machine into the table IF THEY ARE MISSING.

insert into sa_conf (mailname) select concat(mail.mail_name,'@',domains.name) from mail left join domains on domains.id = mail.dom_id where concat(mail.mail_name,'@',domains.name) not in (select mailname from sa_conf);

This command takes all of the mailbox names in the master mailbox table and joins it to the information in the domains table with an @ in the middle to form a full mailbox name.

Then, it inserts them into the sa_conf table only if they are not already there. If you run the command twice, it will insert no rows. You should be able to run this command at any time to insert the Spam Assassin control information into Plesk.

Once you have done this, run this command to see if your sa_conf information is now correct:

select * from sa_conf;

You should now see the missing mailboxes in the list.

You are done!
 
psa_conf doesn't even exist after upgrade to 8.1.0 ???

Hi,

I'm getting errors in my backupscript about sa_conf so I thought I'd give your solution a try... however, the table doesn't even exist ?

Table 'psa.sa_conf' doesn't exist

Spamassassin has always been enabled, I just recently upgraded from Plesk 7.5.4 to 8.1.0...

Any idea how I can fix this? Any sql statement to recreate the table?

Thanks in advance,



Sven
 
Back
Top