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

How do you truncate the Greylist SQLite database on a mail server?

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by eugenevdm, Mar 17, 2012.

  1. eugenevdm

    eugenevdm Silver Pleskian

    30
    68%
    Joined:
    Nov 11, 2003
    Messages:
    611
    Likes Received:
    0
    Our mail server's performance has deteriorated very heavily in the last two weeks. I've turned off every single bit of spam protection except Greylisting and it's still slow. Upon delving in the greylisting folder I notice the greylisting data is 2.5GB big.

    root@cm:/var/lib/plesk/mail/greylist# ls -lah
    total 2.5G
    drwxr-xr-x 2 root root 4.0K 2012-03-17 16:40 .
    drwxr-xr-x 5 root root 4.0K 2009-12-03 07:36 ..
    -rw-r--r-- 1 root root 2.5G 2012-03-17 16:40 data.db
    -rw-r--r-- 1 root root 76K 2012-03-16 13:53 settings.db

    Could this be a problem? How do you truncate it? I don't mind starting from scratch because it's would be better than multiple phone calls from some of the 12 000 mail users on the server.
     
  2. burnleyvic

    burnleyvic Regular Pleskian

    17
    85%
    Joined:
    Nov 9, 2011
    Messages:
    174
    Likes Received:
    1
    cp -p /var/lib/plesk/mail/greylist/data.db /var/lib/plesk/mail/greylist/data.db.backup
    sqlite3 /var/lib/plesk/mail/greylist/data.db
    sqlite> delete from data;

    Check 'man sqlite3'
     
  3. eugenevdm

    eugenevdm Silver Pleskian

    30
    68%
    Joined:
    Nov 11, 2003
    Messages:
    611
    Likes Received:
    0
    Thanks a lot. I like the "-p". Incidentally our mail server is still performing poorly. I guess there are just too many e-mail accounts on it and Plesk / Postfix is the wrong platform for high volumes.
     
Loading...