postfix-users June 2011 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: email tracking from postfix log file

Re: email tracking from postfix log file

From: postfix <postfix_at_nospam>
Date: Wed Jun 01 2011 - 09:29:55 GMT
To: postfix-users@postfix.org

As perl contains the most complete regular expression implementation,
you may as well go into the perl tutorial for regular expressions:

http://perldoc.perl.org/index-tutorials.html

suomi

On 2011-06-01 10:31, kshitij mali wrote:
> Thank u ralf
> Can u please give me link for learn regular experssion
> all alway get complex reqirement to track the postfix log more oftenly
> which will help
> me .
> for example 1. how many email got dilver from one intenal user for
> certain domain in last 5 hrs
> 2. how many email got deliver from one user to
> external domains for last 3 week
> etc
> Regards,
> Kshitij
>
> On Wed, Jun 1, 2011 at 1:27 PM, Ralf Hildebrandt
> <Ralf.Hildebrandt@charite.de <mailto:Ralf.Hildebrandt@charite.de>> wrote:
>
> * kshitij mali <foreplayboy@gmail.com <mailto:foreplayboy@gmail.com>>:
> > I want to list email send to the domain gmail.com
> <http://gmail.com/> how to achive it
> >
> >
> > cat /var/log/maillog | grep -i cleanup | egrep 'to=<*@gmail.com
> <http://gmail.com/>'
> >
> > where * = all user of gmail.com <http://gmail.com/> domain i think
> >
> > is the above reular expression is correct ?
>
> No.
>
> egrep 'postfix/cleanup.*to=<.*@gmail.com <http://gmail.com/>>'
> /var/log/maillog
>
> --
> Ralf Hildebrandt
> Geschäftsbereich IT | Abteilung Netzwerk
> Charité - Universitätsmedizin Berlin
> Campus Benjamin Franklin
> Hindenburgdamm 30 | D-12203 Berlin
> Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
> ralf.hildebrandt@charite.de <mailto:ralf.hildebrandt@charite.de> |
> http://www.charite.de <http://www.charite.de/>
>
>