Glenn,

> Thanks for your help, Mark.. so if I read this correctly, I have to
> change ins_rcp and ins_msg to be:

I mistakenly pasted your 'ins_msg' instead of your 'ins_rcp'
in my previous mail. That one that changed from 2.4.0-pre* to 2.4.0
is 'ins_rcp'.

> I have to change ins_rcp and ins_msg to be:
>    'ins_msg' =>
>      'INSERT INTO msgs (mail_id, secret_id, am_id, time_iso, sid,
> policy, client_addr, size, host) VALUES (?,?,?,?,?,?,?,?,?)',
>
>    'ins_rcp' =>
>      'INSERT INTO msgrcpt (mail_id, rid, ds, rs, bl, wl, bspam_level,
> smtp_resp) VALUES (?,?,?,?,?,?,?,?)',

The defaults are in file amavisd, search for: %sql_clause = (...
Seems like I forgot to update the amavisd.conf-default, which
is perhaps what is bothering you, so the 'ins_rcp' and 'ins_quar'
in amavisd.conf-default are wrong!

The correct setting is the actual default setting as specified
in file amavisd, and applies unless you modify %sql_clause explicitly
in your amavisd.conf. So the correct relevant entries are:

%sql_clause = (
  'sel_policy' => \$sql_select_policy,
  'sel_wblist' => \$sql_select_white_black_list,
  'sel_adr' =>
    'SELECT id FROM maddr WHERE email=?',
  'ins_adr' =>
    'INSERT INTO maddr (email, domain) VALUES (?,?)',
  'ins_msg' =>
    'INSERT INTO msgs (mail_id, secret_id, am_id, time_num, time_iso, sid,'.
    ' policy, client_addr, size, host) VALUES (?,?,?,?,?,?,?,?,?,?)',
  'upd_msg' =>
    'UPDATE msgs SET content=?, quar_type=?, quar_loc=?, dsn_sent=?,'.
    ' spam_level=?, message_id=?, from_addr=?, subject=? WHERE mail_id=?',
  'ins_rcp' =>
    'INSERT INTO msgrcpt (mail_id, rid,'.
    ' ds, rs, bl, wl, bspam_level, smtp_resp) VALUES (?,?,?,?,?,?,?,?)',
  'ins_quar' =>
    'INSERT INTO quarantine (mail_id, chunk_ind, mail_text)'.
    ' VALUES (?,?,?)',
  'sel_quar' =>
    'SELECT mail_text FROM quarantine WHERE mail_id=? ORDER BY chunk_ind',
);


> Got these done (Turns out the last two just took foreeeeever to run! :-)

Depends on indexes present and the number of entries.

> I also ran the maintenance clauses at the end of README.sql, and will
> script those so they happen regularly.)

Good. I'm quite happy with the new approach.

Interestingly, moving the same logging database from MySQL to PostgreSQL
reduced my weekly cleanup time from about 30 minutes to 30 seconds.
Don't know why.

  Mark


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to