🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.mail.mta
Article #62582

Re: milter-regex pytanie

#62582
From: Piotr Lechowicz
Date: Wed, 06 Feb 2019 23:00
49 lines
3203 bytes
W dniu 2019-02-06 o 18:41, LFC pisze:
> 
> Nawiasem mówiąc reguła, którą przytoczyłeś dla X-Report-Abuse 

Czyli ta?
header /^X-Report-Abuse$/ ,^\s*<http:\/\/\w+\.(com|info|icu)\/aa\.php\?a=,ie


> u mnie na Centos 6 w regex-milter nie działa prawidowo. 

SOA#1

$ cat /etc/centos-release
CentOS release 6.10 (Final)

$ rpm -qa|grep milter-regex
milter-regex-2.0-1.el6.x86_64


> Po pierwsze przecinki. W regex milterze powinny być slash,

Eeee tam.
Nie możesz użyć slasha jako delimitera, jeżeli w regexie też chcesz go użyć. Dlatego przecinki (ale mogłyby być też małpy, średniki czy co ci tam innego pasuje).
Czytałeś readme?:

      The regular expressions used in the configuration rules are enclosed in
      *arbitrary delimiters*, no further escaping is needed.

      The first character of an argument is taken as the delimiter, and all
      subsequent characters up to the next occurance of the same delimiter are
      taken literally as the regular expression.	 Since the delimiter itself
      cannot be part of the regular expression (no escaping is supported), a
      delimiter must be chosen that doesn't occur in the regular expression
      itself.  Each argument can use a different delimiter, all characters
      except spaces and tabs are valid.


> ale nawet, jak to poprawię i tak się czepia zawartości. Muszę poeksperymentować z tym zapisem 

Podaje w logu co go boli?
Zwróciłeś uwagę na flagi po końcowym delimiterze regexa (zwłaszcza e - ze względu na użyty |)?

      Optionally, the following flags can be used after the closing delimiter:
      e	  Extended regular expression.	This sets REG_EXTENDED for regcomp(3).
      i	  Ignore upper/lower case.  This sets REG_ICASE.



Piotr
Technical Details
Message-ID: <5c5b671f$0$499$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.69.MISMATCH!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.fr7!futter-mich.highwinds-media.com!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <32hoif-0pm.ln1@mpwik1.mpwikzdw.com.pl> <5c59a14e$0$504$65785112@news.neostrada.pl> <tm8pif-e8r.ln1@mpwik1.mpwikzdw.com.pl> <anfi+dh9vzsqhhf-j252@wp.eu> <c2aqif-hg2.ln1@mpwik1.mpwikzdw.com.pl> <5c5a8ade$0$491$65785112@news.neostrada.pl> <1sirif-k6a.ln1@mpwik1.mpwikzdw.com.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.69.MISMATCH!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.fr7!futter-mich.highwinds-media.com!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Subject: Re: milter-regex pytanie
Newsgroups: pl.comp.mail.mta
References: <32hoif-0pm.ln1@mpwik1.mpwikzdw.com.pl> <5c59a14e$0$504$65785112@news.neostrada.pl> <tm8pif-e8r.ln1@mpwik1.mpwikzdw.com.pl> <anfi+dh9vzsqhhf-j252@wp.eu> <c2aqif-hg2.ln1@mpwik1.mpwikzdw.com.pl> <5c5a8ade$0$491$65785112@news.neostrada.pl> <1sirif-k6a.ln1@mpwik1.mpwikzdw.com.pl>
From: Piotr Lechowicz <edithkal@gmail.com>
Date: Thu, 7 Feb 2019 00:00:27 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0
MIME-Version: 1.0
In-Reply-To: <1sirif-k6a.ln1@mpwik1.mpwikzdw.com.pl>
Lines: 49
Message-ID: <5c5b671f$0$499$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 79.188.53.188
X-Trace: 1549494047 unt-rea-a-01.news.neostrada.pl 499 79.188.53.188:63971
X-Complaints-To: abuse@news.neostrada.pl
X-Received-Bytes: 3010
X-Received-Body-CRC: 4014016921
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit