Mark Martinec schrieb:
>> Yes, both the PostgreSQL and MySQL are commonly in use.
>>
>> For lookups the SQLite should be fine too, but probably
>> not for R/W tables because of lock contentions, unless
>> you have a very light mail traffic.
> 
> P.S.:
> in a recent post by Uwe (topic: amavisd-new web frontend):
> 
> | Now, with a native amavisd-new implementation, IBM DB2 works fine.

Well, native in the meaning of without any web/user interface but not 
out of the box.

There is a difference between running amavis with sql config and sql 
config and storage together.

To get amavis running with DB2 config backend you need to change the 
database schema regarding the autoincrement columns. DB2 does not 
support this in that way.

To have sql storage backend with DB2 is more complex:

For penpals you need to change the 'sel_penpal' and 'sel_penpals_msgid'. 
DB2's join syntax is a bit different.

For using partition_tag I had to change msgs.quar_loc from char(12) to 
char(16).

I my setup I am using the build-in sample of

   $sql_partition_tag =
       sub { my($msginfo)=...@_; iso8601_week($msginfo->rx_time) };

Normaly quar_loc is the same as mail_id, isn't it? Since I enabled 
partition_tag as described above, the value of quar_loc is the value of 
mail_id extended by "[<patrtition_tag>]"

E.g.:

$ db2 "select partition_tag, mail_id, quar_loc from amavis.msgs where 
mail_id='h3EiKuwC0h2h'"

PARTITION_TAG MAIL_ID      QUAR_LOC
------------- ------------ ----------------
            28 h3EiKuwC0h2h h3EiKuwC0h2h[28]

   1 record(s) selected.


I have sometimes trouble with sql quarantine. Most of the mails are 
quarantined successfuly and some are rejected with a temporary error. On 
a later delivery try, a frommer rejected mail will be quarantined 
successfuly.
The data type for the column mail_text ist CLOB(32k) with a default 
chunk size of 16k. It may be a waste of storage, but actually I'm 
investigating the quarantine errors.

Investigatin the quarantine problem:
There is a (strange) behaviour of DB2 with LOB's as desribed in 
ftp://ftp.software.ibm.com/software/dw/dm/db2/0301liu/0301liu.pdf

Extract from page 20:
"When DB2 tries to execute the statement, the iConvFunction function 
that converts the input data from SQL_C_CHAR to SQL_BLOB fails with 
'CLI0110E Invalid output or indicator buffer specified. SQLSTATE=22002'.
According to the standard ODBC implementation, if the input is an odd 
number in length, [...] the SQL_C_CHAR to SQL_BLOB conversion will fail. 
This is the correct behavior. "

I can confirm, most of my quarantine problems have an odd message size - 
but not every time.

But all of that does not deter me from using DB2 as backend for amavis.

Have Fun!
Uwe

------------------------------------------------------------------------------
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
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