A NOTE has been added to this issue. 
====================================================================== 
http://www.dbmail.org/mantis/view.php?id=816 
====================================================================== 
Reported By:                namailsj
Assigned To:                
====================================================================== 
Project:                    DBMail
Issue ID:                   816
Category:                   Database layer
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
target:                      
====================================================================== 
Date Submitted:             07-Nov-09 03:23 CET
Last Modified:              09-Nov-09 18:05 CET
====================================================================== 
Summary:                    DEF_QUERYSIZE is currently 1024, causing sieve
generated autoresponders to fail
Description: 

This issue somehow seems to be related to a previously closed bug -
0000390

If a slightly large message is used for auto-responder using sieve, it
fails with MySQL error while performing SELECT QUERY, because the end of
the query gets truncated.

See the query that fails in lines 5091 - 5095 in db.c in dbmail-2.2.12:

   5091         snprintf(query, DEF_QUERYSIZE,
   5092                         "SELECT lastseen FROM %sreplycache "
   5093                         "WHERE to_addr = '%s' AND from_addr = '%s'
"
   5094                         "AND handle = '%s' AND lastseen > (%s)",
   5095                         DBPFX, escaped_to, escaped_from,
escaped_handle, tmp->str);

increasing the value of DEF_QUERYSIZE to 4096 seems to be a work around,
but would like have something in dbmail.conf to control the size of an
auto-responder instead of modifying DEF_QUERYSIZE in the code.
====================================================================== 

---------------------------------------------------------------------- 
 (0002941) paul (administrator) - 09-Nov-09 15:54
 http://www.dbmail.org/mantis/view.php?id=816#c2941 
---------------------------------------------------------------------- 
I would like to see the actual query being generated here. 

Sounds like the whole reply message is inserted where escaped_handle
should be used. Someone else reported something like that, and if true, it
would definitely imply a bug - though not in the code you mention.

The handle *should* be a md5 hash of the reply-subject and message
combined. 
So show me some logs please, and if possible the sieve script as well. 

---------------------------------------------------------------------- 
 (0002942) namailsj (reporter) - 09-Nov-09 18:05
 http://www.dbmail.org/mantis/view.php?id=816#c2942 
---------------------------------------------------------------------- 
Here is the error message from the logs

Nov  9 08:48:42 testbox dbmail/lmtpd[25734]: Error:[sql]
dbmysql.c,db_query(+290): [You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax
to use near '' at line 1] [SELECT lastseen FROM dbmail_replycache WHERE
to_addr = 'testmess...@test.com' AND from_addr =
'xxxxxxxxxxxxx...@xxxxxxxxxxx.com' AND handle =
'Question:xxxxxxxxxxxxx...@xxxxxxxxxxx.com:Dear Valued Customer,\n\nAdded
useless characters to test the message
length\n01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101


Here is the my test sieve script:

[r...@testbox dbmail-2.2.12]# dbmail-sievecmd -c -u
xxxx...@xxxxxx.xxxxxxxx.com
require "vacation"; if not header :contains "Precedence" ["bulk","list"]
{vacation :from "xxxxxxxxxxxxx...@xxxxxxxxxxx.com" :subject "Question"
"Dear Valued Customer,

Added useless characters to test the message length
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101

Thank you.

"; }

Also, yet another "Minor" issue, let me know if you would like me to file
it under another bug: if a sieve message has a "/" (slash) character in the
first few words of the auto-responder body then that gets included in the 
"X-DBMail-Vacation:" header, some remote email servers then bounce that
message saying invalid message or mime-type.

Let me know if I could provide you with any other information or testing
to further troubleshoot these issue.

Thanks. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
07-Nov-09 03:23  namailsj       New Issue                                    
09-Nov-09 15:54  paul           Note Added: 0002941                          
09-Nov-09 18:05  namailsj       Note Added: 0002942                          
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to