Re: Parsing qmail-qread data

2007-09-02 Thread Ron Bergin
On Aug 31, 6:05 pm, [EMAIL PROTECTED] (Chris E. Rempola) wrote: > I'm trying to parse qmail-qread data, but don't know how to find the > number of occurrences after a particular string. Here is the data: > > +++ Beginning of data

Re: Parsing qmail-qread data

2007-09-02 Thread Chas Owens
On 9/2/07, Chas Owens <[EMAIL PROTECTED]> wrote: > On 9/2/07, Chris E. Rempola <[EMAIL PROTECTED]> wrote: > > Thanks for all your help thus far. If I wanted to view the numbers to > > the right of the pound sign(#) also, how would I go about doing that? > > Is creating another value to the key the

Re: Parsing qmail-qread data

2007-09-02 Thread Chas Owens
On 9/2/07, Chris E. Rempola <[EMAIL PROTECTED]> wrote: > Thanks for all your help thus far. If I wanted to view the numbers to > the right of the pound sign(#) also, how would I go about doing that? > Is creating another value to the key the right idea? snip >if ( /#.*\d+\s+\d+\s+(\S*)

Re: Parsing qmail-qread data

2007-09-02 Thread Chris E. Rempola
; as part of the data. This is what I have so far: +++ SCRIPT ++ #!/usr/bin/perl $MAILTO='[EMAIL PROTECTED]'; $output = `/var/qmail/bin/qmail-qstat`; ($a, $b, $c, $num) = split(" ", $output); if ($num > 600) {

Re: Parsing qmail-qread data

2007-09-02 Thread Ron Bergin
On Aug 31, 6:05 pm, [EMAIL PROTECTED] (Chris E. Rempola) wrote: > I'm trying to parse qmail-qread data, but don't know how to find the > number of occurrences after a particular string. Here is the data: > > +++ Beginning of data

Re: Parsing qmail-qread data

2007-09-02 Thread John W. Krahn
Chris E. Rempola wrote: John W. Krahn wrote: my ( $key, %data ); while ( <> ) { if ( /#.*\s(\S+)/ ) { $key = $1; } elsif ( /\sremote\s/ ) { $data{ $key }++; } } for my $key ( keys %data ) { print "'$key' sent $data{$key} emails.\n"; } John

Re: Parsing qmail-qread data

2007-09-02 Thread Rob Dixon
Chris E. Rempola wrote: I'm trying to parse qmail-qread data, but don't know how to find the number of occurrences after a particular string. Here is the data: +++ Beginning of data + 28 Aug 2007 17:00:47 GMT #8807850 41428 <[EM

Re: Parsing qmail-qread data

2007-09-01 Thread Chas Owens
gt; > to match 337545. So we need to take a different approach. Try > > /#\d+\s+\d+\s+(\S*)/ instead. > > Thanks for the explanation Chas. The regex pattern you provided worked! > Thank you.. snip Please note that this is just a bandaid. There are undoubtedly other valid in

Re: Parsing qmail-qread data

2007-09-01 Thread Chris E. Rempola
Chas Owens wrote: The pattern /#.*\s(\S+)/ matches a literal # followed by anything up to a space and captures all contiguous non-space characters: "31 Aug 2007 04:00:22 GMT " prematch "#" matches # "8810118 337545 <[EMAIL PROTECTED]>" matches .* " " matches \s "bouncing" matches \S+ Even

Re: Parsing qmail-qread data

2007-09-01 Thread Chas Owens
On 9/1/07, Chris E. Rempola <[EMAIL PROTECTED]> wrote: snip > Can you explain the regex syntax of /#.*\s(\S+)/ > > How does that match the email address? The reason why I ask is because > I have one occurrence with the ouput of: > > OUTPUT + > 'bouncing' sent 402 emails. > /OUTPU

Re: Parsing qmail-qread data

2007-09-01 Thread Chris E. Rempola
John W. Krahn wrote: my ( $key, %data ); while ( <> ) { if ( /#.*\s(\S+)/ ) { $key = $1; } elsif ( /\sremote\s/ ) { $data{ $key }++; } } for my $key ( keys %data ) { print "'$key' sent $data{$key} emails.\n"; } John - Thanks so much! Exactl

Re: Parsing qmail-qread data

2007-08-31 Thread John W. Krahn
Ken Foskey wrote: On Fri, 2007-08-31 at 18:05 -0700, Chris E. Rempola wrote: I'm trying to parse qmail-qread data, but don't know how to find the number of occurrences after a particular string. Here is the data: +++ Beginning of data ++

Re: Parsing qmail-qread data

2007-08-31 Thread John W. Krahn
Chris E. Rempola wrote: I'm trying to parse qmail-qread data, but don't know how to find the number of occurrences after a particular string. Here is the data: +++ Beginning of data + 28 Aug 2007 17:00:47 GMT #8807850 41428 <[EM

Re: Parsing qmail-qread data

2007-08-31 Thread Ken Foskey
On Fri, 2007-08-31 at 18:05 -0700, Chris E. Rempola wrote: > I'm trying to parse qmail-qread data, but don't know how to find the > number of occurrences after a particular string. Here is the data: > > +++ Beginning of data +++

Parsing qmail-qread data

2007-08-31 Thread Chris E. Rempola
I'm trying to parse qmail-qread data, but don't know how to find the number of occurrences after a particular string. Here is the data: +++ Beginning of data + 28 Aug 2007 17:00:47 GMT #8807850 41428 <[EMAIL PROTECTED]> done

FW: RE: Qmail and PERL

2006-04-11 Thread Henry Chen
My hosting server runs Mail::Mailer::qmail. I'm ok with perl but new to the whole unix interface. Just wondering how I can get qmail setup and to get qmail to run incoming emails through a script and forward them to different addresses. And thank you very much on the reply!

RE: Qmail and PERL

2006-04-11 Thread Dhanashri Bhate
Hello, Search on CPAN shows these.. see what modules are relevant to you! http://search.cpan.org/search?query=Qmail&mode=all Dhanashri >>>-Original Message- >>>From: Henry Chen [mailto:[EMAIL PROTECTED] >>>Sent: Tuesday, April 11, 2006 2:19 PM >&

Qmail and PERL

2006-04-11 Thread Henry Chen
How do I use Qmail in a perl script that will allow me to redirect mail to addresses? I can't seem to find anything on google about this topic. Any suggestions would definitely help. Thank You _ Don’t just search. Find.

Re: Processing Qmail Smtp session Log

2004-08-20 Thread Gunnar Hjalmarsson
BadApple wrote: Hi Group , You posted the same problem to comp.lang.perl.misc. Doing so is called multi-posting, and is considered rude: http://www.uwasa.fi/~ts/http/crospost.html I just posted a reply to comp.lang.perl.misc, and I'd suggest that possible follow-ups are posted only there. -

Processing Qmail Smtp session Log

2004-08-20 Thread BadApple
Hi Group , I am trying to process a Qmail Smtp session Log file ( multilog ). The section of the Log file is give below : @40004123d44320c51f3c tcpserver: ok 9198 mailgateway.foo.com:10.10.0.1:25 :20.132.29.1::60433 @40004123d44320c52edc qmail-smtpd 9198: connection from 200.12.239.1

Processing Qmail Smtp Session Log

2004-08-20 Thread Bad Apple
Hi Group , I am trying to process a Qmail Smtp session Log file ( multilog ). The section of the Log file is give below : @40004123d44320c51f3c tcpserver: ok 9198 mailgateway.foo.com:10.10.0.1:25 :20.132.29.1::60433 @40004123d44320c52edc qmail-smtpd 9198: connection from 200.12.239.1

Re: perl and qmail aliases

2003-12-09 Thread Andrew Gaffney
Dan Muey wrote: I wrote a Perl script that runs a query against a MySQL db to get a list of customer email addresses. This script then takes a full email for input and rewrites the 'To' header and sends it with qmail-inject for each email address from the db. I have an alias set up

RE: perl and qmail aliases

2003-12-09 Thread Dan Muey
> I wrote a Perl script that runs a query against a MySQL db to > get a list of customer email > addresses. This script then takes a full email for input and > rewrites the 'To' header and > sends it with qmail-inject for each email address from the > db. I have

perl and qmail aliases

2003-12-08 Thread Andrew Gaffney
I wrote a Perl script that runs a query against a MySQL db to get a list of customer email addresses. This script then takes a full email for input and rewrites the 'To' header and sends it with qmail-inject for each email address from the db. I have an alias set up in qmail that pipe

.qmail exit codes and perl

2003-03-21 Thread Dan Muey
Hello, I'm trying to use exit codes form a perl script in a .qmail file. Here's what I have :: man qmail-control ... command's exit codes are interpreted as follows: 0 means that the delivery was successful; 99 means that the deliv- ery was successful, but t

RE: qmail with perl

2003-03-10 Thread Dan Muey
> Hi > > I know how to use sendmail with perl, but not sure about > qmail. How much does the piping syntax of qmail differ to sendmail? man qmail-inject That shows you how the command line would go then you just put it in :: open (MAIL,"|/var/qmail/bin/qmail-inject -f $from&q

qmail with perl

2003-03-08 Thread dan
Hi I know how to use sendmail with perl, but not sure about qmail. How much does the piping syntax of qmail differ to sendmail? Thanks in advance. Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: qmail

2003-01-31 Thread wiggins
On Thu, 30 Jan 2003 22:35:12 -0600, "Ron Geringer" <[EMAIL PROTECTED]> wrote: > Is anyone familiar with qmail enough to help me set up a script in perl > using qmail to redirect form information to a hardcoded email address.

qmail

2003-01-30 Thread Ron Geringer
Is anyone familiar with qmail enough to help me set up a script in perl using qmail to redirect form information to a hardcoded email address. About the only thing I need would be the line specifically regarding the qmail command. thanks Ron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For