
v.tolstov at selfip
Nov 10, 2009, 3:57 PM
Post #3 of 3
(601 views)
Permalink
|
On Tue, 2009-11-10 at 14:43 -0800, Phil Pennock wrote: > On 2009-11-10 at 18:04 +0300, Vasiliy G Tolstov wrote: > > Hello. > > I have this regular expression to check Message-Id header > > [\S]+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])? > > > > (* before @ and two words separated with dot after @) > > > > deny condition = ${if match > > {$h_Message-Id:}{[\S]+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?} {1}} > > message = X-ACL-DATA: Invalid Message-Id > > log_message = X-ACL-DATA: Invalid Message-Id > > > > But if a send e-mail with aaa [at] tes and aaa [at] test all messages passed > > by this acl and delivery. > > > > pcretest work's fine with this expression > > You need to wrap the regexp in \N....\N to protect escape sequences > inside it. Otherwise, the "\." is interpreted at the Exim string > expansion layer and becomes just "." in the regexp. > > Generally, you can test by starting a test Exim daemon on a different > port, with debugging turned on via -d; you can test the string expansion > with -d+expand for more information. Eg, in one terminal run: > > exim -d+expand -oX 26 -bd > > and then connect to port 26 in a different window and type/paste in the > SMTP dialogue to send your test message. > > Regards, > -Phil > Thank's. THis forks fine. -- Vasiliy G Tolstov <v.tolstov [at] selfip> Selfip.Ru -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
|