Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

dbmail3: auto-replies not working

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


h.reindl at thelounge

Feb 4, 2012, 7:12 AM

Post #1 of 22 (1679 views)
Permalink
dbmail3: auto-replies not working

hm - autoreply does not like to work :-(
attached the whole debug-og of the lmtp-session

"fetching reply body" appears often in the normal maillog
_____________________________________________________________

Feb 4 16:05:58 dbmail-test postfix/cleanup[7673]: 59812BC:
message-id=<20120204150558.59812BC [at] dbmail-test>
Feb 4 16:05:58 dbmail-test postfix/qmgr[7603]: 59812BC: from=<root [at] esx1>, size=454, nrcpt=1 (queue
active)
Feb 4 16:05:58 dbmail-test dbmail/lmtpd[7095]: [0x1958280] Error:[message] execute_auto_ran(+2384): error fetching
reply body
Feb 4 16:05:58 dbmail-test postfix/lmtp[7676]: 59812BC: to=<replytest [at] thelounge>,
relay=127.0.0.1[127.0.0.1]:24, delay=0.26, delays=0.05/0.03/0/0.18, dsn=2.0.0, status=sent (215 Recipient
<replytest [at] thelounge> OK)
Feb 4 16:05:58 dbmail-test postfix/qmgr[7603]: 59812BC: removed
_____________________________________________________________

mysql> truncate table dbmail_replycache;
Query OK, 0 rows affected (0.06 sec)


mysql> select user_idnr from dbmail_users where userid='replytest [at] thelounge';
+-----------+
| user_idnr |
+-----------+
| 639 |
+-----------+
1 row in set (0.00 sec)

mysql> select * from dbmail_auto_replies where user_idnr='639';
+-----------+---------------------+---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| user_idnr | start_date | stop_date | reply_body





|
+-----------+---------------------+---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 639 | 2010-01-01 00:00:00 | 2015-12-31 23:59:00 | Auto-Reply Test
Umlaute:

Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext
Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext
Blindtext Blindtext Blindtext Blindtext Blindtext

Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext
Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext
Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext
Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext Blindtext |
+-----------+---------------------+---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

--

Mit besten Gren, Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmhlgasse 17
CTO / software-development / cms-solutions
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/

http://www.thelounge.net/signature.asc.what.htm
Attachments: debuglog.txt (72.7 KB)
  signature.asc (0.26 KB)


paul at nfg

Feb 10, 2012, 4:12 AM

Post #2 of 22 (1649 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/04/2012 04:12 PM, Reindl Harald wrote:
> Feb 4 16:05:58 dbmail-test postfix/cleanup[7673]: 59812BC:
> message-id=<20120204150558.59812BC [at] dbmail-test>
> Feb 4 16:05:58 dbmail-test postfix/qmgr[7603]: 59812BC: from=<root [at] esx1>, size=454, nrcpt=1 (queue
> active)
> Feb 4 16:05:58 dbmail-test dbmail/lmtpd[7095]: [0x1958280] Error:[message] execute_auto_ran(+2384): error fetching
> reply body


Harry,

I've been testing this and it looks like PostgreSQL was broken (using
CURRENT_TIMESTAMP in a prepared statement apparently fails). But I'm
unable to reproduce this in MySQL.




--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 10, 2012, 4:24 AM

Post #3 of 22 (1654 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

Am 10.02.2012 13:12, schrieb Paul J Stevens:
> On 02/04/2012 04:12 PM, Reindl Harald wrote:
>> Feb 4 16:05:58 dbmail-test postfix/cleanup[7673]: 59812BC:
>> message-id=<20120204150558.59812BC [at] dbmail-test>
>> Feb 4 16:05:58 dbmail-test postfix/qmgr[7603]: 59812BC: from=<root [at] esx1>, size=454, nrcpt=1 (queue
>> active)
>> Feb 4 16:05:58 dbmail-test dbmail/lmtpd[7095]: [0x1958280] Error:[message] execute_auto_ran(+2384): error fetching
>> reply body
>
>
> Harry,
>
> I've been testing this and it looks like PostgreSQL was broken (using
> CURRENT_TIMESTAMP in a prepared statement apparently fails). But I'm
> unable to reproduce this in MySQL.

ouch - how do we come here closer to a solution?
can i help you with any additional information?
what mysql-version are you testing (here: mysql-5.5.20)

would it possibly help to try creating a VMware-Appliance
where this can be reproduced (not so easy but possilbe)
and even my rpmbuild-environment which short instructions
how to rebuild/update from HEAD?

it does definitive not work on both of my workstations and
on two test-machines (one of them clone of producition server)
_____________

this error message i get everytime a new message is delivered

Feb 10 12:30:02 srv-rhsoft dbmail/lmtpd[17385]: [0x1357280] Error:[message] execute_auto_ran(+2385): error fetching
reply body
_____________

so this is really a showstopper because there are many people which
would kill me if i break autoreplies with a update, so currently
i can update the "small server" tomorrow night because there are
no replies and no backend communicated to users

but on the main-server no way :-(
Attachments: signature.asc (0.26 KB)


paul at nfg

Feb 10, 2012, 4:50 AM

Post #4 of 22 (1646 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/10/2012 01:24 PM, Reindl Harald wrote:

> so this is really a showstopper because there are many people which
> would kill me if i break autoreplies with a update, so currently
> i can update the "small server" tomorrow night because there are
> no replies and no backend communicated to users

I've done a small update where we now use NOW() instead of
CURRENT_TIMESTAMP

The CURRENT_TIMESTAMP was causing problems with preparedstatements in
PostgreSQL, so maybe something similar is going on in MySQL.

You could increase the logging on MySQL and check the error log.

Another small change that came along with this one: start_date and
stop_date now must be specified. Or rather, they were already required
but the query suggested they could be NULL which they couldn't.




--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 10, 2012, 6:55 AM

Post #5 of 22 (1651 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

problem exists also with
dbmail-3.0.0-6.fc15.20120210.rh.b745a81d39b75d9f335779cc8af3a906b4eb01e1.x86_64

another debug-log attached, here the debug-output of the reply-query, rest as
attachment (lines 665-669 are interesting)

BTW - why is the host-name messed up in the log?

Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_prepare(+400): [0xbed4b0]
[.SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = ? AND ? BETWEEN start_date AND stop_date]
Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_set_u64(+420): [0xcf8a00]
1:[15]
Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_set_str(+408): [0xcf8a00]
2:[NOW()]
Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_con_close(+274): [0xbed4b0]
connection to pool
Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Error:[message] execute_auto_ran(+2385): error
fetching reply body

+-----------+---------------------+---------------------+---------------------------------------+
| user_idnr | start_date | stop_date | reply_body |
+-----------+---------------------+---------------------+---------------------------------------+
| 15 | 2011-06-15 00:00:00 | 2020-06-15 23:59:00 | Autoreply-Test
testserver.rhsoft.net |
+-----------+---------------------+---------------------+---------------------------------------+
1 row in set (0.00 sec)

+---------------------------------+
| userid |
+---------------------------------+
| replytest [at] testserver |
+---------------------------------+
1 row in set (0.00 sec)

+------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+-------+
| user_idnr | bigint(20) unsigned | NO | MUL | 0 | |
| start_date | datetime | NO | | NULL | |
| stop_date | datetime | NO | | NULL | |
| reply_body | mediumtext | YES | | NULL | |
+------------+---------------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

Am 10.02.2012 13:50, schrieb Paul J Stevens:
> On 02/10/2012 01:24 PM, Reindl Harald wrote:
>
>> so this is really a showstopper because there are many people which
>> would kill me if i break autoreplies with a update, so currently
>> i can update the "small server" tomorrow night because there are
>> no replies and no backend communicated to users
>
> I've done a small update where we now use NOW() instead of
> CURRENT_TIMESTAMP
>
> The CURRENT_TIMESTAMP was causing problems with preparedstatements in
> PostgreSQL, so maybe something similar is going on in MySQL.
>
> You could increase the logging on MySQL and check the error log.
>
> Another small change that came along with this one: start_date and
> stop_date now must be specified. Or rather, they were already required
> but the query suggested they could be NULL which they couldn't.

--

Mit besten Gren, Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmhlgasse 17
CTO / software-development / cms-solutions
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/

http://www.thelounge.net/signature.asc.what.htm
Attachments: debuglog.txt (119 KB)
  signature.asc (0.26 KB)


paul at nfg

Feb 10, 2012, 7:10 AM

Post #6 of 22 (1650 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/10/2012 03:55 PM, Reindl Harald wrote:
> problem exists also with
> dbmail-3.0.0-6.fc15.20120210.rh.b745a81d39b75d9f335779cc8af3a906b4eb01e1.x86_64
>
> another debug-log attached, here the debug-output of the reply-query, rest as
> attachment (lines 665-669 are interesting)
>
> BTW - why is the host-name messed up in the log?

Good question. What locale are you on?

>
> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_prepare(+400): [0xbed4b0]
> [.SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = ? AND ? BETWEEN start_date AND stop_date]
> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_set_u64(+420): [0xcf8a00]
> 1:[15]
> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_set_str(+408): [0xcf8a00]
> 2:[NOW()]
> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_con_close(+274): [0xbed4b0]
> connection to pool
> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Error:[message] execute_auto_ran(+2385): error
> fetching reply body

This just doesn't tell us anything. Please try the mysql logs.



--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 10, 2012, 7:39 AM

Post #7 of 22 (1655 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

Am 10.02.2012 16:10, schrieb Paul J Stevens:
> On 02/10/2012 03:55 PM, Reindl Harald wrote:
>> problem exists also with
>> dbmail-3.0.0-6.fc15.20120210.rh.b745a81d39b75d9f335779cc8af3a906b4eb01e1.x86_64
>>
>> BTW - why is the host-name messed up in the log?
>
> Good question. What locale are you on?

[root [at] testserve:~]$ locale
LANG=de_DE.UTF-8

but this is not the problem, hostname is truncated and the special chars are
something added while truncate, the following line of a cat in terminal shows
the truncate without special char

Feb 10 16:35:45 testserver.rhsof dbmail-imapd[20497]: [0x69b280] Info:[clientbase] ci_write(+312): [0x7fc286e2c010]
S > [10/10:+ idling

>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_prepare(+400): [0xbed4b0]
>> [.SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = ? AND ? BETWEEN start_date AND stop_date]
>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_set_u64(+420): [0xcf8a00]
>> 1:[15]
>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_set_str(+408): [0xcf8a00]
>> 2:[NOW()]
>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_con_close(+274): [0xbed4b0]
>> connection to pool
>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Error:[message] execute_auto_ran(+2385): error
>> fetching reply body
>
> This just doesn't tell us anything. Please try the mysql logs

godness - i will activate mysql-query-log ASAP
currently missing up with thousand other things

where can i buy a day with 48 hours to get 4 hours sleep
and one to make my living room clean? :-)
Attachments: signature.asc (0.26 KB)


paul at nfg

Feb 10, 2012, 8:22 AM

Post #8 of 22 (1648 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/10/2012 04:39 PM, Reindl Harald wrote:

> but this is not the problem, hostname is truncated and the special chars are
> something added while truncate, the following line of a cat in terminal shows
> the truncate without special char

Heh, a stack-overflow.

fixed it.

--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 10, 2012, 9:03 AM

Post #9 of 22 (1649 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

Am 10.02.2012 17:22, schrieb Paul J Stevens:
> On 02/10/2012 04:39 PM, Reindl Harald wrote:
>
>> but this is not the problem, hostname is truncated and the special chars are
>> something added while truncate, the following line of a cat in terminal shows
>> the truncate without special char
>
> Heh, a stack-overflow.
> fixed it.

overflow fixed but still truncate :-)

however, does not bother me really but good to scream to find the overflow

the damaged HTML-messages from my last mail while forwarding and replies are
my current childs we must get fixed somehow :-(

if (! configured) {
- memset(hostname,'\0',16);
- gethostname(hostname,16);
+ memset(hostname,'\0',sizeof(hostname));
+ gethostname(hostname,15);
configured=1;
}

Feb 10 17:59:02 testserver.rhso dbmail-timsieved[27089]: [0xeaf280] Info:[server] server_set_sighandler(+571):
signal handler placed
Feb 10 17:59:02 testserver.rhso dbmail-timsieved[27089]: [0xeaf280] Debug:[server] dm_bind_and_listen(+323):
creating plain socket [12] on [0.0.0.0:2000]
Feb 10 17:59:02 testserver.rhso dbmail-timsieved[27089]: [0xeaf280] Debug:[server] server_run(+676): Adding event
for plain socket [12] [1/1]
Feb 10 17:59:02 testserver.rhso dbmail-timsieved[27089]: [0xeaf280] Debug:[server] server_run(+698): dispatching
event loop...
Attachments: signature.asc (0.26 KB)


h.reindl at thelounge

Feb 10, 2012, 10:25 AM

Post #10 of 22 (1648 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

Am 10.02.2012 16:10, schrieb Paul J Stevens:
> On 02/10/2012 03:55 PM, Reindl Harald wrote:
>> problem exists also with
>> dbmail-3.0.0-6.fc15.20120210.rh.b745a81d39b75d9f335779cc8af3a906b4eb01e1.x86_64
>>
>> another debug-log attached, here the debug-output of the reply-query, rest as
>> attachment (lines 665-669 are interesting)
>>
>> BTW - why is the host-name messed up in the log?
>
> Good question. What locale are you on?
>
>>
>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_prepare(+400): [0xbed4b0]
>> [.SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = ? AND ? BETWEEN start_date AND stop_date]
>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_set_u64(+420): [0xcf8a00]
>> 1:[15]
>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_stmt_set_str(+408): [0xcf8a00]
>> 2:[NOW()]
>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Database:[db] db_con_close(+274): [0xbed4b0]
>> connection to pool
>> Feb 10 15:42:47 testserver.rhsof dbmail-lmtpd[20530]: [0xbc2280] Error:[message] execute_auto_ran(+2385): error
>> fetching reply body
>
> This just doesn't tell us anything. Please try the mysql logs

i fear they also do not show any interesting
but try the query manually is interesting
how do i get these idiotic warnings mysql speaks about?

why do i get "could not fetch reply_body" for every single lmtp-delivery
independent if the user has a reply defined?

mysql> SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 15;
+---------------------------------------+
| reply_body |
+---------------------------------------+
| Autoreply-Test

mysql> SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 15 AND 'NOW()' BETWEEN start_date AND stop_date;
Empty set, 2 warnings (0.00 sec)

mysql> SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 15 AND 'NOW()' BETWEEN date(start_date) AND
date(stop_date);
Empty set, 2 warnings (0.00 sec)
_______________________

13 Query INSERT INTO dbmail_keywords (message_idnr, keyword) SELECT 70916,keyword from dbmail_keywords WHERE
message_idnr=70915
13 Query COMMIT
13 Query START TRANSACTION
13 Query UPDATE dbmail_users SET curmail_size = curmail_size + 809 WHERE user_idnr = 15
13 Query COMMIT
13 Prepare SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = ? AND ? BETWEEN start_date AND stop_date
13 Execute SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 15 AND 'NOW()' BETWEEN start_date AND
stop_date
13 Close stmt
13 Query START TRANSACTION
13 Query DELETE FROM dbmail_messages WHERE message_idnr = 70915
13 Query COMMIT
Attachments: signature.asc (0.26 KB)


paul at nfg

Feb 13, 2012, 12:09 AM

Post #11 of 22 (1618 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/10/2012 07:25 PM, Reindl Harald wrote:

> how do i get these idiotic warnings mysql speaks about?


http://dev.mysql.com/doc/refman/5.0/en/show-warnings.html

> why do i get "could not fetch reply_body" for every single lmtp-delivery
> independent if the user has a reply defined?
>
> mysql> SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 15;
> +---------------------------------------+
> | reply_body |
> +---------------------------------------+
> | Autoreply-Test
>
> mysql> SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 15 AND 'NOW()' BETWEEN start_date AND stop_date;
> Empty set, 2 warnings (0.00 sec)

So what are the values for start_date and stop_date?

--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 13, 2012, 4:30 AM

Post #12 of 22 (1621 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

Am 13.02.2012 09:09, schrieb Paul J Stevens:
> On 02/10/2012 07:25 PM, Reindl Harald wrote:
>
>> how do i get these idiotic warnings mysql speaks about?
> http://dev.mysql.com/doc/refman/5.0/en/show-warnings.html

thanks, even after 10 years in business each day learning new things!

>> why do i get "could not fetch reply_body" for every single lmtp-delivery
>> independent if the user has a reply defined?
> So what are the values for start_date and stop_date?

i think i have catched the bug :-)
remove the quotes around 'NOW'

mysql> SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 15 AND 'NOW()' BETWEEN start_date AND stop_date;
Empty set, 2 warnings (0.00 sec)

mysql> SHOW WARNINGS;
+---------+------+--------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------------------------------------+
| Warning | 1292 | Incorrect datetime value: 'NOW()' for column 'start_date' at row 1 |
| Warning | 1292 | Incorrect datetime value: 'NOW()' for column 'stop_date' at row 1 |
+---------+------+--------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 15 AND NOW() BETWEEN start_date AND stop_date;
+---------------------------------------+
| reply_body |
+---------------------------------------+
| Autoreply-Test
testserver.rhsoft.net |
+---------------------------------------+
1 row in set (0.00 sec)
Attachments: signature.asc (0.26 KB)


paul at nfg

Feb 13, 2012, 4:46 AM

Post #13 of 22 (1615 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/13/2012 01:30 PM, Reindl Harald wrote:
> Incorrect datetime value: 'NOW()'

Fixed in GIT now.


--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 13, 2012, 5:05 AM

Post #14 of 22 (1609 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

Am 13.02.2012 13:46, schrieb Paul J Stevens:
> On 02/13/2012 01:30 PM, Reindl Harald wrote:
>> Incorrect datetime value: 'NOW()'
>
> Fixed in GIT now.

partly confirmed

but this did it not make it into dbmail3 :-(
https://github.com/pjstevns/dbmail/commit/f887d2e01c5a288fcd2f6ecb1639b6fb0dba2031

the physical user triggers the reply and makes the entry in replycache but
after 'truncate table dbmail_replycache' replytest2@.... does not

mysql> select * from dbmail_aliases where alias like '%reply%';
+------------+----------------------------------+---------------------------------+-------------+
| alias_idnr | alias | deliver_to | client_idnr |
+------------+----------------------------------+---------------------------------+-------------+
| 1055 | replytest [at] testserver | 15 | 524 |
| 1058 | replytest2 [at] testserver | replytest [at] testserver | 524 |
+------------+----------------------------------+---------------------------------+-------------+

BTW:
did you make a look if there are other places where function
calls maybe quoted by the sql-wrapper independent of the
reply-feature?
Attachments: signature.asc (0.26 KB)


paul at nfg

Feb 13, 2012, 5:41 AM

Post #15 of 22 (1614 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/13/2012 02:05 PM, Reindl Harald wrote:
>
>
> Am 13.02.2012 13:46, schrieb Paul J Stevens:
>> On 02/13/2012 01:30 PM, Reindl Harald wrote:
>>> Incorrect datetime value: 'NOW()'
>>
>> Fixed in GIT now.
>
> partly confirmed
>
> but this did it not make it into dbmail3 :-(
> https://github.com/pjstevns/dbmail/commit/f887d2e01c5a288fcd2f6ecb1639b6fb0dba2031

fixed now.

> did you make a look if there are other places where function
> calls maybe quoted by the sql-wrapper independent of the
> reply-feature?

I only checked for CURRENT_TIMESTAMP/NOW(), since the auto_reply
function was the last change in that respect.

Cursory inspection shows all other places are handled as direct string
insertion, rather than parameters on prepared statements.



--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 13, 2012, 6:00 AM

Post #16 of 22 (1626 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

Am 13.02.2012 14:41, schrieb Paul J Stevens:
> On 02/13/2012 02:05 PM, Reindl Harald wrote:
>> Am 13.02.2012 13:46, schrieb Paul J Stevens:
>>> On 02/13/2012 01:30 PM, Reindl Harald wrote:
>>>> Incorrect datetime value: 'NOW()'
>>>
>>> Fixed in GIT now.
>>
>> partly confirmed
>>
>> but this did it not make it into dbmail3 :-(
>> https://github.com/pjstevns/dbmail/commit/f887d2e01c5a288fcd2f6ecb1639b6fb0dba2031
>
> fixed now.
>
>> did you make a look if there are other places where function
>> calls maybe quoted by the sql-wrapper independent of the
>> reply-feature?
>
> I only checked for CURRENT_TIMESTAMP/NOW(), since the auto_reply
> function was the last change in that respect.
>
> Cursory inspection shows all other places are handled as direct string
> insertion, rather than parameters on prepared statements.

confirmed for both cases (physical accout and alias)
so we have only the problem with ".cssclass" while forwarding remaining
and a small log error below, if weg get this cleaned dbmail3 is perfect
from my point of view

i know i am pedantic but one small bug in this context :-)

if a user has no reply defined there is still the error message
"error fetching reply body" in maillog, below mysql-query-log
for each received message......

Feb 13 14:54:23 rh dbmail/lmtpd[29891]: [0x208d280] Error:[message] execute_auto_ran(+2385): error fetching reply body

mysql> SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 4 AND NOW() BETWEEN start_date AND stop_date;
Empty set (0.00 sec)

mysql> SELECT * FROM
dbmail_auto_replies;+-----------+---------------------+---------------------+-------------------------------------------------------------------------------------+
| user_idnr | start_date | stop_date | reply_body
|
+-----------+---------------------+---------------------+-------------------------------------------------------------------------------------+
| 8 | 2010-11-05 00:00:00 | 2010-11-06 23:59:00 | Test
|
| 9 | 2010-11-05 00:00:00 | 2010-11-06 23:59:00 | Test
|
| 14 | 2010-01-01 00:00:00 | 2020-12-31 23:59:00 | Auto-Reply Test dbmail
Ab Version 2.2.14 sollten Absender/Empfnger wieder passen |
+-----------+---------------------+---------------------+-------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)
__________________________________________________________________________________

59 Prepare SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = ? AND NOW() BETWEEN start_date AND
stop_date
59 Execute SELECT reply_body FROM dbmail_auto_replies WHERE user_idnr = 4 AND NOW() BETWEEN start_date AND
stop_date
59 Close stmt
59 Query START TRANSACTION
59 Query DELETE FROM dbmail_messages WHERE message_idnr = 8504
5 Query insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt,
InfoUnitID, SysLogTag) values (' [0x208d280] Error:[message] execute_auto_ran(+2385): error fetching reply body',
2, 'rh', 3, '20120213145423', '20120213145423', 1, 'dbmail/lmtpd[29891]:')
59 Query COMMIT
Attachments: signature.asc (0.26 KB)


paul at nfg

Feb 13, 2012, 6:20 AM

Post #17 of 22 (1619 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/13/2012 03:00 PM, Reindl Harald wrote:

> so we have only the problem with ".cssclass" while forwarding remaining
> and a small log error below, if weg get this cleaned dbmail3 is perfect
> from my point of view

Please check your sendmail option in dbmail.conf. The code for
forwarding messages is identical between dbmail2 and dbmail3, afaict.

> i know i am pedantic but one small bug in this context :-)
>
> if a user has no reply defined there is still the error message
> "error fetching reply body" in maillog, below mysql-query-log
> for each received message......

Fixed as well.



--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 13, 2012, 7:19 AM

Post #18 of 22 (1621 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

Hi

thank you, replies are now working as expected
forwarding is definitly broken!

Am 13.02.2012 15:20, schrieb Paul J Stevens:
> On 02/13/2012 03:00 PM, Reindl Harald wrote:
>
>> so we have only the problem with ".cssclass" while forwarding remaining
>> and a small log error below, if weg get this cleaned dbmail3 is perfect
>> from my point of view
>
> Please check your sendmail option in dbmail.conf. The code for
> forwarding messages is identical between dbmail2 and dbmail3, afaict.

sendmail = /usr/sbin/sendmail
/usr/sbin/sendmail -> /etc/alternatives/mta
/etc/alternatives/mta -> /usr/sbin/sendmail.postfix

something acts different

i tested a HTML-message with dbmail-2.2 few minutes ago
with a forwarder in "dbmail_aliases" and it workes fine

.test1 {color:red;}
.test2 {color:blue;}
.test3 {color:green;}


sadly this is currently broken with identical configuration
and dbmail-3.0, exatcly same multipart-message code, same
sending script of my dbmail/postfix-backend

...test1 {color:red;}
...test2 {color:blue;}
...test3 {color:green;}

see communication below from 2009
________________________________________________________________________

-------- Original-Nachricht --------
Betreff: Re: [Dbmail] dbmail-forward seems to damage multimime-messages
Datum: Wed, 07 Oct 2009 15:27:56 +0200
Von: Paul J Stevens <paul [at] nfg>
Antwort an: DBMail mailinglist <dbmail [at] dbmail>
Organisation: NFG Net Facilities Group BV
An: DBMail mailinglist <dbmail [at] dbmail>

Reindl Harald wrote:
> I can not believe that i'am the only person with this problem and i speak about e real big
> problem - In near future we have to migrate 10.000 addresses to a new server which will be
> linux/dbmail instead osx/eims and all html-mails with css get destroyed

I've fixed this in my git tree.

for 2.3:
http://git.dbmail.eu/cgit/cgit.cgi/paul/dbmail/patch/?id=295a2e3a3e76a3e81768d43e0e5a5e031db8c0b5

for 2.2:
http://git.dbmail.eu/cgit/cgit.cgi/paul/dbmail/patch/?id=2897e657c5fd1378cea5f2339e335acf4c6070e9
________________________________________________________________________


>> i know i am pedantic but one small bug in this context :-)
>>
>> if a user has no reply defined there is still the error message
>> "error fetching reply body" in maillog, below mysql-query-log
>> for each received message......
>
> Fixed as well.

confirmed, thanks!
Attachments: signature.asc (0.26 KB)


paul at nfg

Feb 13, 2012, 7:50 AM

Post #19 of 22 (1622 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/13/2012 04:19 PM, Reindl Harald wrote:
> Hi
>
> thank you, replies are now working as expected
> forwarding is definitly broken!
>
> Am 13.02.2012 15:20, schrieb Paul J Stevens:
>> On 02/13/2012 03:00 PM, Reindl Harald wrote:
>>
>>> so we have only the problem with ".cssclass" while forwarding remaining
>>> and a small log error below, if weg get this cleaned dbmail3 is perfect
>>> from my point of view
>>
>> Please check your sendmail option in dbmail.conf. The code for
>> forwarding messages is identical between dbmail2 and dbmail3, afaict.
>
> sendmail = /usr/sbin/sendmail
> /usr/sbin/sendmail -> /etc/alternatives/mta
> /etc/alternatives/mta -> /usr/sbin/sendmail.postfix
>
> something acts different

Obviously, but it's not DBMail. Just been testing here on Ubuntu and
forwarding is *not* broken.

Check the logs and grep for 'send_mail'

Info:[message] send_mail(+2132): opening pipe to [/usr/sbin/sendmail -i
-f paul [at] nfg paul [at] nfg]

The message is fed as-is to the sendmail command. The -i switch is added
to make sure sendmail doesn't do dot-stuffing.




--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 13, 2012, 7:56 AM

Post #20 of 22 (1615 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

Am 13.02.2012 16:50, schrieb Paul J Stevens:
> On 02/13/2012 04:19 PM, Reindl Harald wrote:
>> Hi
>>
>> thank you, replies are now working as expected
>> forwarding is definitly broken!
>>
>> Am 13.02.2012 15:20, schrieb Paul J Stevens:
>>> On 02/13/2012 03:00 PM, Reindl Harald wrote:
>>>
>>>> so we have only the problem with ".cssclass" while forwarding remaining
>>>> and a small log error below, if weg get this cleaned dbmail3 is perfect
>>>> from my point of view
>>>
>>> Please check your sendmail option in dbmail.conf. The code for
>>> forwarding messages is identical between dbmail2 and dbmail3, afaict.
>>
>> sendmail = /usr/sbin/sendmail
>> /usr/sbin/sendmail -> /etc/alternatives/mta
>> /etc/alternatives/mta -> /usr/sbin/sendmail.postfix
>>
>> something acts different
>
> Obviously, but it's not DBMail. Just been testing here on Ubuntu and
> forwarding is *not* broken.
>
> Check the logs and grep for 'send_mail'
>
> Info:[message] send_mail(+2132): opening pipe to [/usr/sbin/sendmail -i
> -f paul [at] nfg paul [at] nfg]
>
> The message is fed as-is to the sendmail command. The -i switch is added
> to make sure sendmail doesn't do dot-stuffing

but i am running the identical postfix-2.9 packages on both machines
these are from the internal repo and the whole machine is a clone

how can sendmail from postfix act different and do any change to the
message if the only different binary involved is dbmail?
Attachments: signature.asc (0.26 KB)


paul at nfg

Feb 13, 2012, 7:58 AM

Post #21 of 22 (1616 views)
Permalink
Re: dbmail3: auto-replies not working [In reply to]

On 02/13/2012 04:56 PM, Reindl Harald wrote:

> but i am running the identical postfix-2.9 packages on both machines
> these are from the internal repo and the whole machine is a clone
>
> how can sendmail from postfix act different and do any change to the
> message if the only different binary involved is dbmail?

Too weird. Show me logs! And please: redact them to only include the
relevant lines if you can.


--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Feb 13, 2012, 8:20 AM

Post #22 of 22 (1617 views)
Permalink
Re: dbmail3: forwarding problem [In reply to]

Am 13.02.2012 16:58, schrieb Paul J Stevens:
> On 02/13/2012 04:56 PM, Reindl Harald wrote:
>
>> but i am running the identical postfix-2.9 packages on both machines
>> these are from the internal repo and the whole machine is a clone
>>
>> how can sendmail from postfix act different and do any change to the
>> message if the only different binary involved is dbmail?
>
> Too weird. Show me logs! And please: redact them to only include the
> relevant lines if you can.

Logs attached, this problem seems to be much more weird as thought!
se at the bottom, additionally the HTML source of my testmail with
goes through "phpmailer" and is sent as multipart (PLAIN + HTML)

from my current point of view the DOT is added at receive-time from dbmail3

this is the definition of the alias
combination of local mailbox and external forwarder

+------------+-----------------------------------+----------------+-------------+
| alias_idnr | alias | deliver_to | client_idnr |
+------------+-----------------------------------+----------------+-------------+
| 1059 | forwardtest [at] testserver | 17 | 524 |
| 1060 | forwardtest [at] testserver | rhsoft [at] test | 524 |
+------------+-----------------------------------+----------------+-------------+

body of the forwarded message (incoming on another dbmail3-instance on the host):

...test1 {color:red;}
...test2 {color:blue;}
...test3 {color:green;}

____________________________

additional info info

this happens with exactly the same message delivered to dbmail3
so the additional DOT seems to be added here which would explain
why in the forwarder are THREE of them

* first dbmail-lmtp receives and adds a DOT
* mail is forwarded
* the other instances receives the mail per LMTP
* second dbmail-instance adds (my guess) another DOT

..test1 {color:red;}
..test2 {color:blue;}
..test3 {color:green;}
Attachments: debuglog.txt (6.05 KB)
  maillog.txt (1.64 KB)
  test.htm (1.82 KB)
  signature.asc (0.26 KB)

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.