Re: can I filter messages where I am a cc: recipient

2002-08-13 Thread Allie C Martin

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In [EMAIL PROTECTED]">mid:[EMAIL PROTECTED],
Januk Aggarwal [JA] wrote:'

 (?ims)^CC:.*[EMAIL PROTECTED]

 shouldn't work.

JA Just be slightly careful. Yours will match if Dwight's address appears
JA *anywhere* in the headers after the CC line. That includes the To: or
JA From: or any other header (however rare that might be.)

JA A more restricted regexp would look something like:

JA (?im-s)^CC:.*?(\n\s.*)*([EMAIL PROTECTED])

I see what you mean. :) It would catch all my messages since MDaemon
adds an X Header containing my e-mail address at the bottom of the
headers.

However, sometimes the CC list is in multiple lines and there are more
than one e-mail address per line. What do we do for that?

- --
Allie C Martin \  TB! v1.62/Beta1  Windows XP Pro
 List Moderator/   PGP Key - http://pub-key.ac-martin.com
'
-BEGIN PGP SIGNATURE-

iD8DBQE9WNtjV8nrYCsHF+IRAgRNAJ9j3o4NgrybazfC79q7L9tVRgw/qQCfVdu7
pl8aHpVmrtj+UrDfENoc1mY=
=G/nL
-END PGP SIGNATURE-


__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Re: can I filter messages where I am a cc: recipient

2002-08-13 Thread Dwight A Corrin

On Tuesday, August 13, 2002, 10:56:16 AM, Januk Aggarwal wrote:


 However, sometimes the CC list is in multiple lines and there are more
 than one e-mail address per line. What do we do for that?

 That's included in the regexp I sent:

JA (?im-s)^CC:.*?(\n\s.*)*([EMAIL PROTECTED])
^

yes, this seems to have done the trick. Allie's original filter
captured a couple of old messages where the last headers were

 X-Return-Path: [EMAIL PROTECTED]
 X-MDaemon-Deliver-To: [EMAIL PROTECTED]

I drug them back and changed to Januk's filter, and they stayed put. I
also drug back a message with a multi-line cc: list, and it still got
filtered.

-- 
Dwight A. Corrin
P O Box 47828
Wichita KS 67201-7828
316.263.9706  fax 316.263.6385
mailto:[EMAIL PROTECTED]
Using The Bat! 1.60i on Windows XP version 5,1



__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




auto reply with a few regular exp.

2002-08-13 Thread Ricardo M. Reyes

TBTECH people:

(this is long, please be patient :) )

I have TB configured to download only the headers if a mail is larger
than N kb. A few days ago I wrote a filter to intercept the notices
from TB when a large message arrives and reply to the original sender
of the message with a note explaining why I won't receive his message,
etc...

To extract the original sender's address from the message I used the
following regex:

,-
| %REGEXPTEXT=^From:(.+?)\n
`-

It worked ok with my tests, it worked ok with the first real big
message, but of course it failed horribly with the second :)

I received a 'large message notice' (from TB) with the following text:

,-
| Message-ID: 6053A4C42E34D3119F760004AC39C23C034EBCEF@SERVER_1
| From: =?iso-8859-1?Q?Vicerrectorado_de_Formaci=F3n?=
|  [EMAIL PROTECTED]
| To: AquinasNet, Educacion a distancia [EMAIL PROTECTED]
`-

see how the From: line has a EOL inside. My regex returned the
following:

,-
| =?iso-8859-1?Q?Vicerrectorado_de_Formaci=F3n?=
`-

without the email address, and my autoreply bounced back to me because
it wasn't correctly addressed.

So I have two questions for you, tbtech-regex-gurus :

1. How can I fix the regex to catch this message correctly?

2. Isn't it illegal to have an EOL inside the From: clause? (Although
TB seems to recognize this kind of messages without problems) I don't
have web access rigth now, but what I remember from the RFCs was that
the kludge goes from the From: to the end of the line, or not?

I include with this msg the TB notice and the filter.

-- 
Ricardo M. Reyes | [EMAIL PROTECTED]
 | (Mar del Plata - Argentina)
 | Usando The Bat! 1.60c
---BeginMessage---


 A message with the size exceeding 750 K bytes limit has arrived to your address - 
 the message has been automatically removed from the server.

 The message header follows

--

Return-Path: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 9637 invoked by uid 417); 10 Aug 2002 14:50:13 -
Received: from softdnserr (HELO nt1.ufasta.edu.ar) (200.63.66.3)
  by 192.168.0.30 with SMTP; 10 Aug 2002 14:50:13 -
Received: by SERVER_1 with Internet Mail Service (5.5.2653.19)
id QQ6CV56B; Sat, 10 Aug 2002 11:48:52 -0300
Message-ID: 6053A4C42E34D3119F760004AC39C23C034EBCEF@SERVER_1
From: =?iso-8859-1?Q?Vicerrectorado_de_Formaci=F3n?=
 [EMAIL PROTECTED]
To: AquinasNet, Educacion a distancia [EMAIL PROTECTED]
Subject: =?iso-8859-1?Q?Universidad_FASTA_-_AquinasNET_-_Cursos_capacit?=
=?iso-8859-1?Q?aci=F3n_a_distancia?=
Date: Sat, 10 Aug 2002 11:46:22 -0300
Importance: high
X-Priority: 1
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: multipart/mixed;
boundary=_=_NextPart_000_01C2407C.B1BE3430

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--_=_NextPart_000_01C2407C.B1BE3430
Content-Type: multipart/alternative;
boundary=_=_NextPart_001_01C2407C.B1BE3430


--_=_NextPart_001_01C2407C.B1BE3430
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable



 ?xml:namespace prefix =3D o ns =3D =
urn:schemas-microsoft-com:office:office
/

Id por todo el mundo y proclamad=20

la Buena Nueva a toda la creaci=F3n=20

(Mc 16,15)

=20

@quinasNET es una ventana abierta de la Universidad FASTA a trav=E9s de =
la
cual, el Vicerrectorado de Formaci=F3n ofrece realizar cursos de =

---End Message---

BeginFilter
Name: Mensajes muy grandes
Active: 1
Source: \\reyesric@hal9000\Inbox
Target: \\reyesric@hal9000\Inbox
CopyFolder: none
MainSet: 20Large message arrived to your address
Actions: faAutoReply
AddGroups: 
DelGroups: 
ForwardTemplate: 
ConfirmTemplate: 
ReplyTemplate: 

XMailer extractor macro

2002-08-13 Thread Ricardo M. Reyes

I saw this in then new website of macros:

%SETPATTREGEXP=(?im-s)^(X-Mailer|User-Agent):\s*(.*)$%-
%REGEXPBLINDMATCH=%Headers%-
%Subpatt=2

and I can't understand the reason for the first part:

(?im-s)

What does it look for? An 'i' and a caracther between 'm' and 's'?
What for?

-- 
Ricardo M. Reyes | [EMAIL PROTECTED]
 | (Mar del Plata - Argentina)
 | Usando The Bat! 1.60c


__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Re: auto reply with a few regular exp.

2002-08-13 Thread Mrten

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Om 22:13 op dinsdag 13 augustus 2002, Ricardo M. Reyes:

i can only answer question 2 for you:

 2. Isn't it illegal to have an EOL inside the From: clause? (Although TB
 seems to recognize this kind of messages without problems) I don't have
 web access rigth now, but what I remember from the RFCs was that the
 kludge goes from the From: to the end of the line, or not?

no. it is legal to wrap header-lines. consider the Received: header for a
common example.

from RFC 2822, ftp://ftp.isi.edu/in-notes/rfc2822.txt :


2.1.1. Line Length Limits

   There are two limits that this standard places on the number of
   characters in a line. Each line of characters MUST be no more than 998
   characters, and SHOULD be no more than 78 characters, excluding the
   CRLF.

[...]

2.2. Header Fields

   Header fields are lines composed of a field name, followed by a colon
   (:), followed by a field body, and terminated by CRLF. A field name
   MUST be composed of printable US-ASCII characters (i.e., characters
   that have values between 33 and 126, inclusive), except colon. A field
   body may be composed of any US-ASCII characters, except for CR and LF.
   However, a field body may contain CRLF when used in header folding
   and unfolding as described in section 2.2.3. All field bodies MUST
   conform to the syntax described in sections 3 and 4 of this standard.


etcetera. section 2.2.3 and 3.2.3. elaborate some more, but i won't bore
the list with more quotes :)

Mrten.

-BEGIN PGP SIGNATURE-
Version: 6.5.8ckt7

iQA/AwUBPVlgV0tQMadp+KslEQK30ACfbJm3SvMI5dqSD9PlM7GmuZm4toMAn3LM
LbyhcoGA0DvdsPy84G3ALpio
=IJXy
-END PGP SIGNATURE-


__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Re: XMailer extractor macro

2002-08-13 Thread Alexis Haeringer

Bonjour Ricardo,

Mardi, le 13 août 2002 à 16h51 [GMT -0300] (ce qui correspond à
21h51 ici où j'habite), Ricardo M. Reyes =[RMR] a écrit à [EMAIL PROTECTED] :

RMR (?im-s)

RMR What does it look for? An 'i' and a caracther between 'm' and 's'?
RMR What for?

from TB! help file
__Internal Option Setting__

The settings of PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
PCRE_EXTENDED can be changed from within the pattern by a sequence of
Perl option letters enclosed between (? and ). The option letters
are


i   PCRE_CASELESS   Letters in the pattern match both upper and
lower case letters. It is equivalent to Perl's /i option.
m   PCRE_MULTILINE  By default, PCRE treats the subject string as
consisting of a single line of characters (even if it actually
contains several newlines). The start of line metacharacter (^)
matches only at the start of the string, while the end of line
metacharacter ($) matches only at the end of the string, or before a
terminating newline (unless PCRE_DOLLAR_ENDONLY is set). This is the
same as Perl.When PCRE_MULTILINE it is set, the start of line and
end of line constructs match immediately following or immediately
before any newline in the subject string, respectively, as well as at
the very start and end. This is equivalent to Perl's /m option. If
there are no \n characters in a subject string, or no occurrences of
^ or $ in a pattern, setting PCRE_MULTILINE has no effect.
s   PCRE_DOTALL If this bit is set, a dot metacharater in the
pattern matches all characters, including newlines. Without it,
newlines are excluded. This option is equivalent to Perl's /s option.
A negative class such as [^a] always matches a newline character,
independent of the setting of this option.
x   PCRE_EXTENDED   If this bit is set, whitespace data characters
in the pattern are totally ignored except when escaped or inside a
character class, and characters between an unescaped # outside a
character class and the next newline character, inclusive, are also
ignored. This is equivalent to Perl's /x option, and makes it possible
to include comments inside complicated patterns. Note, however, that
this applies only to data characters. Whitespace characters may never
appear within special character sequences in a pattern, for example
within the sequence (?( which introduces a conditional subpattern.
For example, (?im) sets caseless, multiline matching. It is also
possible to unset these options by preceding the letter with a hyphen,
and a combined setting and unsetting such as (?im-sx), which sets
PCRE_CASELESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and
PCRE_EXTENDED, is also permitted. If a letter appears both before and
after the hyphen, the option is unset.

The scope of these option changes depends on where in the pattern the
setting occurs. For settings that are outside any subpattern (defined
below), the effect is the same as if the options were set or unset at
the start of matching. The following patterns all behave in exactly
the same way:

(?i)abc
a(?i)bc
ab(?i)c
abc(?i)

which in turn is the same as compiling the pattern abc with
PCRE_CASELESS set. In other words, such top level settings apply to
the whole pattern (unless there are other changes inside subpatterns).
If there is more than one setting of the same option at top level, the
rightmost setting is used.

If an option change occurs inside a subpattern, the effect is
different. This is a change of behaviour in Perl 5.005. An option
change inside a subpattern affects only that part of the subpattern
that follows it, so

(a(?i)b)c

matches abc and aBc and no other strings (assuming PCRE_CASELESS is
not used). By this means, options can be made to have different
settings in different parts of the pattern. Any changes made in one
alternative do carry on into subsequent branches within the same
subpattern. For example,

(a(?i)b|c)

matches ab, aB, c, and C, even though when matching C the
first branch is abandoned before the option setting. This is because
the effects of option settings happen at compile time. There would be
some very weird behaviour otherwise.

The PCRE-specific options PCRE_UNGREEDY and PCRE_EXTRA can be changed
in the same way as the Perl-compatible options by using the characters
U and X respectively. The (?X) flag setting is special in that it must
always occur earlier in the pattern than any of the additional
features it turns on, even when it is at top level. It is best put at
the start.

Note: This topic was taken from the PCRE library manual. The PCRE
library is open source software, written by Philip Hazel
[EMAIL PROTECTED], and copyright by the University of Cambridge,
England.
/from TB! help file

-- 
Bien à vous,
   
  \---SatorArepoTenet---/  
  |  _   __ |  
  | //\lexis |-|aeringer/ _ . _ |_  |  
  |

Re: auto reply with a few regular exp.

2002-08-13 Thread Ricardo M. Reyes

PP %REGEXPTEXT=(?ism)^From:\s*.*?([^\s]+@[^\s]+)\s+.*^\w.*?:

PP This will extract only the e-mail-address, as I don't know if The Bat!
PP converts the QP or B64 encoded name correctly or if it 're-encodes'
PP that string a second time, or if it leaves it I don't know if
PP recipient MUA displays it correctly.

thanks, it works great

-- 
Ricardo M. Reyes | [EMAIL PROTECTED]
 | (Mar del Plata - Argentina)
 | Usando The Bat! 1.60c


__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Re: auto reply with a few regular exp.

2002-08-13 Thread Ricardo M. Reyes

M etcetera. section 2.2.3 and 3.2.3. elaborate some more, but i won't bore
M the list with more quotes :)

thanks for the info, I remember it know.

-- 
Ricardo M. Reyes | [EMAIL PROTECTED]
 | (Mar del Plata - Argentina)
 | Usando The Bat! 1.60c


__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]




Re: XMailer extractor macro

2002-08-13 Thread Ricardo M. Reyes

RMR What does it look for? An 'i' and a caracther between 'm' and 's'?
RMR What for?

ACM Those are actually internal option settings.

ACM 'i' makes the expression search without paying attention to character
ACM case.

thanks for the explanation, I didn't know that meaning of (?

-- 
Ricardo M. Reyes | [EMAIL PROTECTED]
 | (Mar del Plata - Argentina)
 | Usando The Bat! 1.60c


__
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]