Bug Tracker item #2881599, was opened at 2009-10-19 10:40
Message generated for change (Settings changed) made by sbajic
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=2881599&group_id=250683

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: daemon
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nicolas Haller (gaasmann)
>Assigned to: Stevan Bajic (sbajic)
Summary: failure with Dpsam and Postgresql

Initial Comment:
HI,

I have a problem with DSPAM 3.8.0 and I don't know if it's resolved in 3.9.0 (I 
don't see any clue in ChangeLog).
I have a process chain to analyse spam:
Internet----SMTP/25----Postfix----LMTP/4242----DSPAM----SMTP/10024----amavisd-new----SMTP/10025----Postfix----transport/deliver

Dspam works with a PgSQL DB. When Pg fails(connection refused, DB can't answer 
to a request, ...) Dspam reject all future email. It send an error "530 5.2.0 
Message is empty. Aborting." in the LMTP transaction. I must restart DSPAM 
daemon to accept new mail correctly.

If you need more infos, tell me.

Thanks

----------------------------------------------------------------------

>Comment By: Stevan Bajic (sbajic)
Date: 2009-10-19 14:35

Message:
Hallo Nicolas

@Reconnecting: You wrote that if you restart DSPAM then everything works
again. So this means that somehow DSPAM can not connect to PostgreSQL and
if we would RECONNECT the stalled PostgreSQL connections then everything
should work again. Right?


Regarding this here:
> I know only a little about profiles but I have only one DB server. In
> fact, I prefer DSPAM forward message on failure instead of rejecting
it.
>
The errors "Delivery failed completely" you are seeing in your log are in
fact errors where DSPAM is failing to deliver the message via SMTP or LMTP.
I don't know how we can forward a message when DSPAM has trouble delivering
a message via LMTP or SMTP. So your request to FORWARD a message in case of
PostgreSQL connection errors are okay but DSPAM can not forward a message
when the target refuses to accept a message. Do you understand what I
mean?

The errors about failed delivery are related to your dspam.conf entries
starting with "Delivery". Assuming you would have the following in your
dspam.conf:
DeliveryHost        192.168.0.10
DeliveryPort        10026
DeliveryProto       SMTP

Then the SMTPD listening on 192.168.0.10 at port 10026 is the one that has
an issue. Not DSPAM. And since that service refuses to accept messages,
DSPAM can not deliver. Let alone forward.


Kind Regards from Switzerland

Stevan Bajic

----------------------------------------------------------------------

Comment By: Nicolas Haller (gaasmann)
Date: 2009-10-19 12:16

Message:
Hi Stevan,

I don't understand what you mean about autoconnection. Dspam is configured
as a daemon with a pool of Pg connection (PgSQLConnectionCache    20). The
PgSQL is on a different host and they are using TCP/IP.
The database can fail on different manner:
    - Server is down, connection are refused
    - The server is here but it can't execute a query. (62346: server
closed the connection unexpectedly. This probably means the server
terminated abnormally before or while processing the request.)

I know only a little about profiles but I have only one DB server. In
fact, I prefer DSPAM forward message on failure instead of rejecting it.

Thanks for this quick answer.

I don't have debug output but DSPAM said this on failure:
ct 19 09:50:20 enigma dspam[62346]: Received error in response to HELO:
Oct 19 09:50:20 enigma dspam[62346]: Delivery failed completely
Oct 19 09:50:21 enigma dspam[62346]: Got error -5 in response to DATA: 250
2.1.5 Recipient <n...@noc.nerim.net> OK^M
Oct 19 09:50:21 enigma dspam[62346]: Delivery failed completely
Oct 19 09:50:21 enigma dspam[62346]: Got error -5 in response to RCPT TO:
250 2.1.0 Sender <na...@enigma.nerim.net> OK^M
Oct 19 09:50:21 enigma dspam[62346]: Delivery failed completely
Oct 19 09:50:21 enigma dspam[62346]: Got error -5 in response to MAIL
FROM:
Oct 19 09:50:21 enigma dspam[62346]: Delivery failed completely
Oct 19 09:51:11 enigma dspam[62346]: Got error -5 in response to RCPT TO:
250 2.1.0 Sender <brutall...@advanceup.com> OK^M
Oct 19 09:51:11 enigma dspam[62346]: Delivery failed completely
Oct 19 09:51:11 enigma dspam[62346]: Got error -5 in response to message
data: 354 End data with <CR><LF>.<CR><LF>^M
Oct 19 09:51:11 enigma dspam[62346]: Delivery failed completely



----------------------------------------------------------------------

Comment By: Stevan Bajic (sbajic)
Date: 2009-10-19 11:39

Message:
Hallo Nicolas

As far as I know, PostgreSQL does not offer an autoconnect feature as
MySQL does. So the only way to to fix that issue in the PostgreSQL driver
would be to shut down all (or just the ones not being able to connect) the
connections from DSPAM to PostgreSQL and reopen them.

Is it possible for you to post some more debugging information or error
logs indicating where the error inside DSPAM is happening?

How is your setup? Does PostgreSQL run on the same system as DSPAM? How do
you connect to PostgreSQL? Using TCP/IP or do you use sockets?

Do you know if your PostgreSQL instance has gone away while DSPAM was
running?

Have you tried to use connection profiles with DSPAM?


Kind Regards from Switzerland

Stevan Bajic

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=2881599&group_id=250683

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Dspam-devel mailing list
Dspam-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to