Paul J Stevens wrote:
Let's see....
Oct 13 01:17:49 ded3 dbmail/smtp[8472]:
authsql.c,auth_check_user_ext: checking user [EMAIL PROTECTED] to
!/usr/bin/procmail /etc/procmail_users/dstilts.procmailrc
Oct 13 01:17:49 ded3 dbmail/smtp[8472]:
authsql.c,auth_check_user_ext: checking user [!/usr/bin/procmail
/etc/procmail_users/dstilts.procmailrc] in alias table
Oct 13 01:17:49 ded3 dbmail/smtp[8472]:
authsql.c,auth_check_user_ext: checks [1]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [SELECT deliver_to FROM dbmail_aliases WHERE lower(alias) =
lower('!/usr/bin/procmail /etc/procmail_users/dstilts.procmailrc')]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]:
authsql.c,auth_check_user_ext: adding [!/usr/bin/procmail
/etc/procmail_users/dstilts.procmailrc] to deliver_to address
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dsn.c, dsnuser_resolve: user
[EMAIL PROTECTED] found total of [1] aliases
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [BEGIN]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [SELECT user_idnr FROM dbmail_users WHERE
userid='[EMAIL PROTECTED]@__']
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: misc.c,create_unique_id:
created: 701816680e98e05978e5c6bf568afa51
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [SELECT mailbox_idnr FROM dbmail_mailboxes WHERE name='INBOX'
AND owner_idnr='1']
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: db.c, db_find_create_mailbox:
mailbox [INBOX] found
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [INSERT INTO dbmail_physmessage (messagesize, internal_date)
VALUES ('0', CURRENT_TIMESTAMP)]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [INSERT INTO dbmail_messages(mailbox_idnr, physmessage_id,
unique_id,recent_flag, status) VALUES ('5', '47117',
'701816680e98e05978e5c6bf568afa51', '1', '5')]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [SELECT physmessage_id FROM dbmail_messages WHERE message_idnr
= '76345']
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [INSERT INTO dbmail_messageblks(is_header,
messageblk,blocksize, physmessage_id)VALUES ('1','Received: from
[192.168.1.62] (adsl-67-117-138-190.dsl.snfc21.pacbell.net
[67.117.138.190])^I^I\n^Iby imap.allmopars.com (Postfix) with ESMTP
id 87386289986^I^I\n^Ifor <[EMAIL PROTECTED]>; Wed, 13 Oct 2004
01:17:48 -0700 (PDT)\nMessage-ID:
<[EMAIL PROTECTED]>\nDate: Wed, 13 Oct 2004 01:18:13
-0700\nFrom: Dan <[EMAIL PROTECTED]>\nUser-Agent: Mozilla
Thunderbird 0.8 (Windows/20040913)\nX-Accept-Language: en-us, en\nTo:
[EMAIL PROTECTED]: test\nX-Spam-Checker-Version:
SpamAssassin 2.63 (2004-01-11) on ded3.netdojo.com\nX-Spam-Level:
\nX-Spam-Status: No, hits=0.0 required=5.0 tests=none
autolearn=no\n^Iversion=2.63\nMIME-Version: 1.0\nContent-Type:
text/plain; charset=ISO-8859-1;
format=flowed\nContent-Transfer-Encoding: 7bit\n', '743', '47117')]
Here the message is inserted correctly.
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: store_message_temp():
allocating [524288] bytes of memory for readblock
Oct 13 01:17:49 ded3 dbmail/smtp[8472]:
pipe.c,store_message_in_blocks: inserting message: line 1 line 2
line 3 Let's see if this works...
Still clean.
[snip]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: forward.c,forward: delivering
to [1] external addresses
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: forward.c,forward: opening
pipe to command /usr/bin/procmail /etc/procmail_users/dstilts.procmailrc
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: forward.c,forward: call to
popen() successfully opened pipe [6]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: forward.c,forward: appending
mbox style from header to pipe returnpath : [EMAIL PROTECTED]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: forward.c,forward: sending
message id number [76345] to forward pipe
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: forward.c,forward: ferror
reports 0, feof reports 0 on pipe 6
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: forward.c,forward: sending
lines from message 76345 on pipe 6
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: db.c,db_send_message_lines:
request for [-2] lines
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [SELECT physmessage_id FROM dbmail_messages WHERE message_idnr
= '76345']
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: db.c,db_send_message_lines:
executing query [SELECT messageblk FROM dbmail_messageblks WHERE
physmessage_id='47117' ORDER BY messageblk_idnr ASC]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: dbmysql.c,db_query: executing
query [SELECT messageblk FROM dbmail_messageblks WHERE
physmessage_id='47117' ORDER BY messageblk_idnr ASC]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: db.c,db_send_message_lines:
sending [-2] lines from message [76345]
Oct 13 01:17:49 ded3 dbmail/smtp[8472]: db.c,db_send_message_lines:
getting nextblock [1] Oct 13 01:17:49 ded3 dbmail/smtp[8472]:
db.c,db_send_message_lines: getting nextblock [2] Oct 13 01:17:49
ded3 dbmail/smtp[8472]: forward.c,forward: closing pipes
[snip]
Here things go wrong. Apparently gmime is fed a message with CRLF
lineendings. This is caused by the forwarding. This makes me think
that perhaps gmime should convert *all* messages CRLF->LF before
parsing and insertion.
I'll setup a test for this and start fixing it.
Thanks Paul! Let me know if you would like me to test at some point.
-Dan