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
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
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*)
; 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) {
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
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
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
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
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
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
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
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 ++
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
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 +++
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
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!
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
>&
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
_
Dont just search. Find.
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.
-
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
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
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
> 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
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
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
> 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
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]
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.
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
29 matches
Mail list logo