Re: [exim] Help with MySQL user stats

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Mark Elkins
Datum:  
To: exim-users
Betreff: Re: [exim] Help with MySQL user stats
On Mon, 2005-10-31 at 14:11 +0000, Terry wrote:
> Mark Elkins wrote:
> > Because I'm not aware of any simple way to do real-time logging of
> > e-mail stats inside exim - I've put together a few hacks...
> >
> > For example - to 'log' the number and size of emails - in routers
> > I have....
> >
> > mysql_user:


blah blah

> >
> > ps - What exim could do with is a general purpose "condition" which

can
> > be used to run a MySQL request at any time.... call it "dbrequest"

and
> > allow it to be used in all sections..??? This would be ideal then

for
> > stats gathering..


> Have you seen exilog
> http://duncanthrax.net/exilog/exilog.txt


Not the solution - I want to take small bits of info and populate my
custom database with it...

In Transports, Under "mysql_delivery:"
I also have...
  driver = appendfile
  directory = /var/spool/mail/$domain/$local_part/
  maildir_format = true
  directory_mode = 0755
  create_directory = true
  user = smmsp
  group = smmsp
  mode = 0660
  quota = 20M
# quota = ${lookup mysql {select quota from admin \
#    where user='${local_part}@${domain}' and status>1}} \
quota_is_inclusive=false


message_suffix = ${lookup mysql {insert into maillog set
mfrom='${quote_mysql:$sender_address}', mto='${quote_mysql:$local_part}@
${domain}',\
    mvia='${quote_mysql:$sender_host_address}', msize=${message_size},
mdelivered=current_timestamp, mailid='$message_id',
mspam='$spam_score_int',\
    mreturn='${quote_mysql:$return_path}' }{}{}}



Again - this is a hack (using "message_suffix"). If exim had a
"dbrequest" function, then Duncan's Exim Logger could collect data real
time.
-- 
  .  .     ___. .__      Posix Systems - Sth Africa.  e.164 VOIP ready
 /| /|       / /__       mje@???  -  Mark J Elkins, Cisco CCIE
/ |/ |ARK \_/ /__ LKINS  Tel: +27 12 807 0590  Cell: +27 82 601 0496