* [mdk-re] Подскажите regexp pls
@ 2002-04-22 11:29 Korshunov Ilya
2002-04-22 11:35 ` Igor Homyakov
0 siblings, 1 reply; 5+ messages in thread
From: Korshunov Ilya @ 2002-04-22 11:29 UTC (permalink / raw)
To: mandrake-russian
Есть такая задачка -
в теле письма с вложеным файлом встречается такая строка
filename="UNKNOWN.rar"
Вопрос - как должен выглядеть regexp который отлавливает такие строки с
отсутсвующими кавычками т.е.
filename=UNKNOWN.rar
??
--------------------
Best regards,
Korshunov Ilya
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [mdk-re] Подскажите regexp pls
2002-04-22 11:29 [mdk-re] Подскажите regexp pls Korshunov Ilya
@ 2002-04-22 11:35 ` Igor Homyakov
2002-04-22 11:39 ` Korshunov Ilya
2002-04-22 11:41 ` Igor Homyakov
0 siblings, 2 replies; 5+ messages in thread
From: Igor Homyakov @ 2002-04-22 11:35 UTC (permalink / raw)
To: mandrake-russian
On Mon, Apr 22, 2002 at 11:30:46AM +0400, Korshunov Ilya wrote:
> Есть такая задачка -
> в теле письма с вложеным файлом встречается такая строка
> filename="UNKNOWN.rar"
> Вопрос - как должен выглядеть regexp который отлавливает такие строки с
> отсутсвующими кавычками т.е.
> filename=UNKNOWN.rar
>
у меня в /etc/postfix/bodychecks.pcre написано :
/^(Content)?\s+(file)?name="?worm\.zip"?\s?$/i REJECT Virus in your mail
--
Igor Homyakov
<homyakov(at)ramax.spb.ru>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [mdk-re] Подскажите regexp pls
2002-04-22 11:35 ` Igor Homyakov
@ 2002-04-22 11:39 ` Korshunov Ilya
2002-04-22 11:58 ` Igor Homyakov
2002-04-22 11:41 ` Igor Homyakov
1 sibling, 1 reply; 5+ messages in thread
From: Korshunov Ilya @ 2002-04-22 11:39 UTC (permalink / raw)
To: mandrake-russian
Mon, 22 Apr 2002 12:37:07 +0400
Igor Homyakov <homyakov@ramax.spb.ru> Писал:
> On Mon, Apr 22, 2002 at 11:30:46AM +0400, Korshunov Ilya wrote:
> > Есть такая задачка -
> > в теле письма с вложеным файлом встречается такая строка
> > filename="UNKNOWN.rar"
> > Вопрос - как должен выглядеть regexp который отлавливает такие строки с
> > отсутсвующими кавычками т.е.
> > filename=UNKNOWN.rar
> >
> у меня в /etc/postfix/bodychecks.pcre написано :
>
> /^(Content)?\s+(file)?name="?worm\.zip"?\s?$/i REJECT Virus in your mail
Не понял что делает...не объясните подробнее ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [mdk-re] Подскажите regexp pls
2002-04-22 11:35 ` Igor Homyakov
2002-04-22 11:39 ` Korshunov Ilya
@ 2002-04-22 11:41 ` Igor Homyakov
1 sibling, 0 replies; 5+ messages in thread
From: Igor Homyakov @ 2002-04-22 11:41 UTC (permalink / raw)
To: mandrake-russian
On Mon, Apr 22, 2002 at 12:37:07PM +0400, Igor Homyakov wrote:
> On Mon, Apr 22, 2002 at 11:30:46AM +0400, Korshunov Ilya wrote:
> > Есть такая задачка -
> > в теле письма с вложеным файлом встречается такая строка
> > filename="UNKNOWN.rar"
> > Вопрос - как должен выглядеть regexp который отлавливает такие строки с
> > отсутсвующими кавычками т.е.
> > filename=UNKNOWN.rar
> >
> у меня в /etc/postfix/bodychecks.pcre написано :
>
> /^(Content)?\s+(file)?name="?worm\.zip"?\s?$/i REJECT Virus in your mail
ошибочка ... лучше (и быстрее) так
/^Content.*(file)?name="?worm\.zip"?\s?$/i REJECT Virus in your mail
/^\s+(file)?name="?worm\.zip"?\s?$/i REJECT Virus in your mail
--
Igor Homyakov
<homyakov(at)ramax.spb.ru>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [mdk-re] Подскажите regexp pls
2002-04-22 11:39 ` Korshunov Ilya
@ 2002-04-22 11:58 ` Igor Homyakov
0 siblings, 0 replies; 5+ messages in thread
From: Igor Homyakov @ 2002-04-22 11:58 UTC (permalink / raw)
To: mandrake-russian
On Mon, Apr 22, 2002 at 11:39:39AM +0400, Korshunov Ilya wrote:
> Mon, 22 Apr 2002 12:37:07 +0400
> Igor Homyakov <homyakov@ramax.spb.ru> Писал:
>
> > On Mon, Apr 22, 2002 at 11:30:46AM +0400, Korshunov Ilya wrote:
> > > Есть такая задачка -
> > > в теле письма с вложеным файлом встречается такая строка
> > > filename="UNKNOWN.rar"
> > > Вопрос - как должен выглядеть regexp который отлавливает такие строки с
> > > отсутсвующими кавычками т.е.
> > > filename=UNKNOWN.rar
> > >
> > у меня в /etc/postfix/bodychecks.pcre написано :
> >
> > /^(Content)?\s+(file)?name="?worm\.zip"?\s?$/i REJECT Virus in your mail
>
> Не понял что делает...не объясните подробнее ?
Дает "от ворот поворот" письмам с вложением worm.zip, проблема в том что
заголовок аттача может иметь разный вид и записываться в одну стоку или в
две, иметь вид filename= или name= и так далее
--
Igor Homyakov
<homyakov(at)ramax.spb.ru>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-04-22 11:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22 11:29 [mdk-re] Подскажите regexp pls Korshunov Ilya
2002-04-22 11:35 ` Igor Homyakov
2002-04-22 11:39 ` Korshunov Ilya
2002-04-22 11:58 ` Igor Homyakov
2002-04-22 11:41 ` Igor Homyakov
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git