OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Closing policy connections to smtp causes smtps in CLOSE_WAIT

From: Robert Felber (r.felberek-muc.de)
Date: Sun Apr 02 2006 - 12:47:09 CDT


Hello,

I'm trying now since 4 days to solve an annoying issue.

smtpd opens a connection to a policy server.
Communication is done, attributes shared, actions done.

Now smtp leaves the connection open, the policy server is fine
with that.

Now if either the user, or the policy server decides to close
a idle connction, we have smtps in CLOSE_WAIT state.

The smtps are hanging in a flock.

On BSD it seems, that the connection will be closed and reopened
as soon if a new policy request is requested, on linux 2.6 it
seems to hang.

I've tried shutdown(2) (with argument 2) as well as close()

How can I ensure that an idle connection may not only be closed
by postfix.

Postfix version is 2.2.4 (FreeBSD 5) and 2.1.3 (Linux 2.6)

--
    Robert Felber (PGP: 896CF30B)
    Munich, Germany