1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Fix for Spam Assassin disabled in mailboxes.

Discussion in 'Plesk for Linux - 8.x and Older' started by philb@, Oct 31, 2006.

  1. philb@

    philb@ Guest

    0
     
    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!
     
  2. interaxis

    interaxis Guest

    0
     
    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
     
Loading...