Hi,
This does not look like an amavis-new problem. This is definitely a
dbmail error. It should not fail on this query. Can you perhaps get a
hold of the message sent from amavis? (with all the amavis headers) I
guess we'd all like to take a look at the complete message, to see where
things go wrong.
Thanks,
Ilja
David Young wrote:
Kenneth, to be honest, I'm not sure if the problem is with postfix, or
amavis-new, or dbmail. I just know the problem happens when I use a
content-filter. The problem is a serious one since it is not something
that's easy to detect. Basically, the mail gets lost, permanently with no
notification back to the sender. Postfix never reports an error and dbmail
simply drops it due to SQL error. I only notice it because I am subscribed
to the mailing list with 2 separate accounts. One to my regular account and
one to my test dbmail account that I'm setting up. I first noticed the
problem when I got email on my regular account and didn't get the mail on my
test account. This is what I am seeing in maillog.
----
dbmail/smtp[28531]: dbpgsql.c, db_query: Error executing query [INSERT INTO
messageblks(messageblk,blocksize, physmessage_id) VALUES ('Received: from
localhost (localhost.localdomain [127.0.0.1]) ^Iby trinity.the.matrix
(Postfix) with ESMTP id 7B950C98C ^Ifor <[EMAIL PROTECTED]>; Thu, 4 Mar
2004 16:27:38 -0800 (PST) Received: from trinity.the.matrix ([127.0.0.1])
by localhost (trinity.the.matrix [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 23501-04 for <[EMAIL PROTECTED]>; Thu, 4 Mar 2004
16:27:30 -0800 (PST) Received: from twister.fastxs.net (twister.fastxs.net
[213.214.98.20]) ^Iby trinity.the.matrix (Postfix) with ESMTP id 232F9C97E
^Ifor <[EMAIL PROTECTED]>; Thu, 4 Mar 2004 16:27:28 -0800 (PST)
Received: from twister.fastxs.net (localhost [127.0.0.1]) ^Iby
twister.fastxs.net (Postfix) with ESMTP ^Iid B55FB7B96C; Fri, 5 Mar 2004
01:27:11 +0100 (CET) Received: from mail.cspi.qc.ca (unknown
[205.151.162.4]) ^Iby twister.fastxs.net (Postfix) with ESMTP id AA3177B4
dbmail/smtp[28531]: db.c,db_insert_message_block_physmessage: dbquery failed
dbmail/smtp[28531]: db.c,db_insert_message_block: error inserting
messageblks for physmessage [8662]
dbmail/smtp[28531]: store_message_temp(): error inserting msgblock [header]
dbmail/smtp[28531]: insert_messages(): failed to store temporary message.
dbmail/smtp[28531]: main(): freeing memory blocks
dbmail/smtp[28531]: main(): they're all free. we're done.
----
This is the debug message from PostgreSQL:
----
postgres[28532]: [16-1] ERROR: parser: unterminated quoted string at or
near "'Received: from localhost (localhost.localdomain [127.0.0.1])
<snip>
postgres[28532]: [16-51] X-Virus-Scanned: by amavisd-new at statsjunkie.com
postgres[28532]: [16-52] X-Spam-Status: No, hits=0.1 tagged_above=-999.0
required=5.5
postgres[28532]: [16-53] tests=RCVD_IN_SORBS
postgres[28532]: [16-54] X-Spam-Level:
postgres[28532]: [16-55] " at character 71
----
The INSERT command from dbmail looks like this:
INSERT INTO messageblks(messageblk,blocksize, physmessage_id)
The first value is the messageblk, the second blocksize, the 3rd
physmessage_id. Notice how in the message log above [16-55], the INSERT
message terminates without a closing quote ' and is also missing the 2nd and
3rd field (blocksize, physmessage_id).
The reason I think it's amavis-new is because the message always terminates
after the "X-Spam-Level:" in all the errors I get. Amavis-new rewrites the
header after it runs Spamassassin. And then reinjects the message into a
second postfix pipe.
I could be wrong about my assessment of amavis-new. The error could be in
dbmail since it's dbpgsql.c that generates the messages. Either way, when I
don't use a content-filter and pass the message directly to dbmail right
after I receive it, the problem goes away. Hope that helps.
Losing mail without any notification is a serious problem to me. Postfix
returns an OK that it's delivered the mail to dbmail with no problems.
dbmail is unable to save the message and does not return an error back to
the sender. Most of these mails go on unnoticed unless you check the
maillog. For those of you who are using amavis-new and are not having
problems, try doing a search of your maillog for "Error executing query".
If you see those errors, then most likely, those messages were dropped and
lost. It doesn't happen everytime and I can't really tell what causes it to
occur. But I know it happens, and quite often (about 5% of my mail).
David
----- Original Message -----
From: "Kenneth Oncinian" <[EMAIL PROTECTED]>
To: <dbmail@dbmail.org>
Sent: Wednesday, March 10, 2004 4:47 PM
Subject: Re: [Dbmail] DBMail and anti-virus/anti-spam
Hi David,
"Chopped off"?
Can you please describe more in detail this bug with amavisd-new that
you are referring to? Maybe I am overseeing this because
I am also using amavisd-new for content-filtering and i do not notice
any problem whatsoever (or at least none that i am aware off).
regards,
Kenneth Oncinian
David Young wrote:
As far as content filters, there seems to be a bug with amavis-new. For
some reason, mail often get chopped off when fed back into postfix for
delivery. I've posted about this a few weeks back. Anyone else have
problems with amavis-new?
David
----- Original Message -----
From: "Shih Ming-Wei" <[EMAIL PROTECTED]>
To: <dbmail@dbmail.org>
Sent: Wednesday, March 10, 2004 3:01 AM
Subject: RE: [Dbmail] DBMail and anti-virus/anti-spam
Hi,
We are using postfix -> content filtering (rav AV/AS) ->
postfix -> dbmail, you can replace RAV with any other
content filters of your choice
Ming-Wei
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Jesse Norell
Sent: Tuesday, March 09, 2004 18:10
To: dbmail@dbmail.org
Subject: RE: [Dbmail] DBMail and anti-virus/anti-spam
Hello,
is it possible to use anti-virus/spam checking (like amavisd-new) with
DBMail ?
Yes, we use postfix -> amavisd-new+clamav -> dbmail and it works
beautifully (plus spamassassin in amavisd-new).
Of course without any need for other MTAs.
"Of course" not. Neither dbmail nor amavisd-new are MTA's, so you
need something to pick up your mail from the network (ie. a MTA).
--
Jesse Norell
[EMAIL PROTECTED] is not my email address;
change "administrator" to my first name.
--
_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail
_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail
_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail
_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail