OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
RE: maximum time in queue - now SQL log parser

From: Adam Clark (adam.clarkngv.vic.gov.au)
Date: Wed Apr 04 2007 - 22:25:24 CDT


More on this,

My question is regarding the order of log entries, do the cleanup and qmgr processes ALWAYS get logged in between smtpd session connect and disconnect?

And it this an appropriate place to identify uniqueness?

Mar 1 01:04:27 monet1 postfix/smtpd[14865]: connect from mxkxout01.national.com.au[203.57.241.225]
Mar 1 01:04:27 monet1 postfix/smtpd[14865]: 3313734002: client=mxkxout01.national.com.au[203.57.241.225]
Mar 1 01:04:27 monet1 postfix/cleanup[14894]: 3313734002: message-id=<OF35CA1B70.6D1DC78A-ONCA257290.004D4F5E-CA257290.004D4F5Enab.com.au>
Mar 1 01:04:27 monet1 postfix/nqmgr[21526]: 3313734002: from=<someemail.addr>, size=2452, nrcpt=1 (queue active)
Mar 1 01:04:27 monet1 postfix/smtpd[14865]: disconnect from mxkxout01.national.com.au[203.57.241.225]
Mar 1 01:04:27 monet1 postfix/smtp[15400]: 3313734002: to=<someemail.addr>, relay=localhost[127.0.0.1], delay=0, status=sent (250 Ok: queued as AAAA534003)

Is there any other status= lines appart from "sent" and "bounced" that this would have an email leave the queue?

Also, if the email has hit a cleanup and qmgr modules, is any way (appart from manual deletion) that a email can get removed from the queue silently (not logged).

Some background information:
I have two tables, Table 1 has the information from the cleanup and qmgr modules, table 2 has all the smtp attempts, the link between the tables are server and queue id. This has problems now.

To overcome my uniqueness problem:
I could have a start and end time for each queue id, start time defined from the cleanup message and end time defined by the last smtp message (sent or bounced), then I would be able to link all the appropriate smtp sessions later with a query.

Thoughts?

Adam

-----Original Message-----
From: owner-postfix-userspostfix.org [mailto:owner-postfix-userspostfix.org] On Behalf Of Magnus Bäck
Sent: Wednesday, 4 April 2007 3:32 PM
To: postfix-userspostfix.org
Subject: Re: maximum time in queue

On Wednesday, April 04, 2007 at 00:11 CEST,
     Adam Clark <adam.clarkngv.vic.gov.au> wrote:

> I am writing a parser to put postfix logs into SQL.
>
> I have:
> * a table which contains the details of the smtpd stuff
> * a table which lists what queue ids were attached to which smtpd
> session
> * a table which lists the stuff from cleanup and (n)qmgr
> * a table which lists every smtp session
>
> The only identifier along the whole path has been the queueid, untill
> I analyse a months worth of data.

Indeed, you cannot rely on the queue id being unique over time.

[...]

--
Magnus Bäck
magnusdsek.lth.se

Adam Clark
Network Administrator

National Gallery of Victoria
180 St Kilda Road Melbourne Vic 3004 Australia
Telephone: +61 3 8620 2369
Fax: +61 3 8620 2565
www.ngv.vic.gov.au

Keep informed of the latest NGV exhibitions, special events and programs at The Ian Potter Centre: NGV Australia and NGV International by subscribing to NGVRT, the NGV's free e-newsletter.

DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for postfix-userspostfix.org. If you are not the named addressee you should not disseminate, copy or alter this email. WARNING: Although National Gallery of Victoria has taken reasonable precautions to ensure no viruses are present in this email, the organisation cannot accept responsibility for any loss or damage arising from the use of this email or attachment.