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
--- Begin Message ---
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 -0000
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 -0000
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:
Atenci�n:\0D\0A\0D\0ASu\20mensaje\20supera\20el\20tama�o\20m�ximo\20permitido\20de\20%REGEXPTEXT\3D\22(\5Cd+)\20K\20bytes\22\20KB.\0D\0A\0D\0AEl\20mensaje\20fue\20eliminado\20autom�ticamente.\20Si\20es\20necesario,\20vuelva\0D\0Aa\20enviarlo\20dividido\20en\20partes\20o\20envie\20otro\20mensaje\20explicando\20su\0D\0Acontenido\20para\20que\20sea\20desactivado\20este\20control\20de\20tama�o.\0D\0A\0D\0A--------------------------------------------------------------------\0D\0ADatos\20del\20mensaje\20recibido:\0D\0A--------------------------------------------------------------------\0D\0ADesde:\20\20%REGEXPTEXT\3D\22^From:(.+?)\5Cn\22\0D\0APara:\20\20\20%REGEXPTEXT\3D\22^To:(.+?)\5Cn\22\0D\0AAsunto:\20%REGEXPTEXT\3D\22^Subject:(.+?)\5Cn\22\0D\0AFecha:\20\20%REGEXPTEXT\3D\22^Date:(.+?)\5Cn\22\0D\0A--------------------------------------------------------------------\0D\0A\0D\0APor\20favor\20disculpe\20esta\20molestia,\20pero\20el\20tel�fono\20es\20caro\20y\0D\0ATelef�nica\20es\20cruel.\0D\0A\0D\0A--\20\0D\0ARicardo\20M.\20Reyes\0D\0A%FROMADDR\0D\0A\0D\0A%SUBJECT\3D\22Su\20mensaje\20fue\20eliminado\22\0D\0A%TO\3D\22\22\0D\0A%TO\3D\22%REGEXPTEXT\3D\22\22^From:(.+?)\5Cn\22\22\22\0D\0A%PRIORITY\3D\22H\22\0D\0A\0D\0A
FwdAddr:
RedirectAddr:
NewAddr:
NewTemplate:
ExtCmd:
ExtFile:
ExtractDir:
ColourGroup: <default>
AddAddrItems: afiFrom,
DelAddrItems: afiFrom,
HotKey: 0
IsOfColour: <default>
SizeBigger: 0
SizeSmaller: 0
AgeOlder: 0
AgeNewer: 0
InAddrPos: 0
OutAddrPos: 0
InAddrGroups:
NoAddrGroups:
KillFile:
KillMethod: 0
SaveTemplate:
SndFile:
SysSound: 0
SoundTime: 0:00-0:00
AllowTime: 0:00-0:00
EndFilter