From: Kev <savage-garden@hanikamail.com>
To: linux-admin@vger.kernel.org
Subject: Re[4]: Scrip Help
Date: Thu, 05 Jan 2006 10:27:47 +0600 [thread overview]
Message-ID: <20060105102714.95FA.SAVAGE-GARDEN@hanikamail.com> (raw)
In-Reply-To: <20060105031854.GB28860@mindspring.com>
On Wed, 4 Jan 2006 21:18:54 -0600
Tim Walberg <twalberg@mindspring.com> wrote:
> On 01/05/2006 08:31 +0600, Kev wrote:
> >>
> >> On Wed, 4 Jan 2006 07:25:25 -0800 (PST)
> >> "Scott Taylor" <scott@dctchambers.com> wrote:
> >>
> >> >
> >> > Kev said:
> >> > > im seting up a scrip pipe for postfix + spamassassin as a filter in
> >> > > postfix.
> >> > >
> >> > > this really works how ever i have a prb with the FWD depending on the
> >> > > recipent, can any one help me with this line
> >> > >
> >> > > if $EGREP -q -i "To: *kav@domain.net*" < /var/tempfs/out.$$
> >> > >
> >> > > how can i tell egrep to check for any format of To: in the email heder.
> >> >
> >> > You did. Perhaps something else in your query is blocking you, or maybe
> >> > you just want grep, it doesn't look like you are using "Extended Regex"
> >> > here.
> >> >
> >> > 'man grep' might be some more help to you.
> >>
> >> yeah i got it to work with the way i have put there, but the prb is that
> >> email addred comes as many formats like
> >>
> >> To: "Kev" <kev@domain.net>
> >> To: Kev <kev@domain.net>
> >> To: <kev@domain.net>
> >> To: <kev@domain.net> "Kev"
> >>
> >> etc etc.... so my above way dont work :(
>
> Something like:
>
> $EGREP -q -i '^To:.*<kav@domain.net>'
>
> should do the job - note the couple of differences:
>
> ^ to match only at beginning of line
> .* to match any number of any character other than newline
> between To: and the e-mail address enclosed in brackets
>
> One subtle (?) bug in your original is that it says, roughly, "match
> the literal string "To:" followed by zero or more space characters
> followed by the literal string "kav@domain.ne" followed by zero or
> more 't' characters. In other words, "To:kav@domain.ne" would match,
> as would "To: kav@domain.nettttttttttttttttt"...
>
Thanks a lot, i will test this and let u know....
next prev parent reply other threads:[~2006-01-05 4:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-04 9:09 Scrip Help Kev
2006-01-04 15:25 ` Scott Taylor
2006-01-05 2:31 ` Re[2]: " Kev
2006-01-05 3:18 ` Tim Walberg
2006-01-05 4:27 ` Kev [this message]
2006-01-05 9:20 ` Re[4]: " Kev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060105102714.95FA.SAVAGE-GARDEN@hanikamail.com \
--to=savage-garden@hanikamail.com \
--cc=linux-admin@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).