Re: [exim] Discard mail to certain recipients if the subject…

Góra strony
Delete this message
Reply to this message
Autor: Александр Кириллов
Data:  
Dla: exim-users
CC: Mike Brudenell, Chris Siebenmann
Temat: Re: [exim] Discard mail to certain recipients if the subject matches a string
> Do note that the router you describe here doesn't actually do what you
> originally asked us about!


Sorry, if I wasn't clear enough in my original post but why you assume the
question was about local delivery? These acls apply to any message
submitted to the relay via smtp.

I have non-local recipients working in other parts of my exim config and
wildcards like *@<non-local domain> in senders. I suspect these wildcards
would also work in recipients but I didn't check.

> - a single space then just type a single space between the words;
> - any one whitespace character (including tabs, newlines, etc) then use

"\s" instead.

I've tried nearly anything I could think of:

Commit by
Commit\ by
Commit\sby
Commit\\ by
Commit\\sby
Commit[ ]by
"Commit by"
\NCommit by\N

Nothing worked and I'm writing regular expressions in various languages for
20+ years. I've failed miserably on this one. )

I understand your point about anchors but all outgoing mail comes to this
relay from an incident tracker system so the subjects are quite rigid and I
feel pretty sure this simple match will work well.

Given the fact that I can't write a regexp matching a single space I don't
really want to explore anything more complex till I get the answer to this
one.

The question still stands. How the hell I can match a single space in a
subject string. This is exim-4.84.2 on CentOS 6.

Regards,
Alex

2017-04-06 16:08 GMT+03:00 George L. Yermulnik <yz@???>:

> Hello!
>
> On Thu, 06 Apr 2017 at 13:57:36 (+0300), Александр Кириллов via Exim-users
> wrote:
>
> > condition = ${if match {$h_subject:}{Commit.by}}
>
> > I probably spent more time trying to figure out how to match a single
> space
> > in "Commit by" and didn't succeed yet. This is a minor thing but I would
> > like to know the answer and go to bed a happy man. )
>
> Literally "Commit by" should work (RHS is treated as a regex):
>         condition = ${if match {$h_subject:}{Commit by}}

>
> --
> George L. Yermulnik
> [YZ-RIPE]
>
> --
> ## List details at https://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/
>