Hi Chris,
On Son 26.07.2009 13:03, Chris Lewis wrote:
Aleksandar Lazic wrote:
I have solved this issus with this steps:
1.) add in plugins/connection_time in hook_pre_connection
$self->qp->connection->notes('sessionid',gettimeofday());
Your sessionids won't be unique across multiple MAIL FROM->DATA
transactions during the same connection. In other words, if the SMTP
client makes a connection, and sends multiple separate emails during
the same connection, it will have the same sessionid.
Are you sure you want that? If not, you want to do it at hook_mail
time with a transaction note.
Well I want to know how much and to whom one ip address sends mail.
In my analyser I create a array for this purpose.
.
.
push (@{$related->{$uniq_key}->{'TO'}},$1.'@'.$2);
.
.
Of course if there is a better way for the correleation I'am open for
suggestion ;-)
gettimeofday isn't guaranteed to be unique either. It may return
microsecond resolution, but, it isn't really.
Well, afaik at the Connection time there are not too much information
which I can use for a uniq id.
the lines looks now like this:
###
Jul 27 23:08:20 do qpsmtpd[24940]: 1248728896 Connection from \
dsl-189-243-8-86-dyn.prod-infinitum.com.mx [189.243.8.86]
###
I'am with you, it is not perfekt but i works for know ;-)
My target is to have a 'hash' with:
Remote-IP
From
Rcpt(s)
Deliverd|Denyed
Session-time
Maybe I will need a 'collector' plugin which writes all data at the end
of the session.
Maybe I should clone the logging/syslog?
I'am not sure, due the fact that I haven't use sendmail for long time,
but sendmail had al this information in one line I think ;-)
BR
Aleks