Re: [exim] Wildcards in aliases

Top Page
Delete this message
Reply to this message
Author: Mike Brudenell
Date:  
To: Exim Users
Subject: Re: [exim] Wildcards in aliases
Please forgive me veering off topic a little for a moment, but in case it
helps you Hardy I find these two web sites really useful for testing
various flavours of regular expressions. (I think Exim uses PCRE if memory
serves?)

- https://www.debuggex.com/?flavor=pcre
- https://www.regextester.com/

The first one even draws the expression's pattern matching so you can
visually check what's happening. They both let you try various test strings
or parts thereof to see where your pattern is going wrong.

Cheers,
Mike B-)

On 13 February 2018 at 10:40, Hardy via Exim-users <exim-users@???>
wrote:

> Thank you Heiko and Merlin,
>
> lookups are my really weak point ;-) and my lack on a grasp on regex
> hampers me even more. I know I should change this on the long run, but for
> now your short term help is very much appreciated...
>
> A one-time change to the conf is acceptable, of course.
>
> I had hope for a solution to keep my alias file the single point of
> maintenance AND keep it compilable by exim_dbmbuild. I would like to stick
> with the simple
>
>         require verify = recipient

>
> for validation. My lookup now is
>
>         data = ${lookup{$local_part}dbm{/etc/exim/$domain.aliases.db}}

>
> Can I still do what I want with dbm, and how would I write the alias file
> for entries meaning
>
> myname[digits]: myname
>
> Thanks
> Hardy
>
>
>
> On 13.02.2018 11:12, Merlin Hartley via Exim-users wrote:
>
>> Or even full expansion options - which puts huge power into the aliases
>> file:
>>    data = ${expand:${lookup{$local_part}lsearch{/etc/aliases}}}

>>
>> Hope this is useful!
>>
>>
>> Merlin
>> --
>> Merlin Hartley
>> Computer Officer
>> MRC Mitochondrial Biology Unit
>> University of Cambridge
>> Cambridge, CB2 0XY
>> United Kingdom
>>
>> On 13 Feb 2018, at 09:38, Heiko Schlittermann via Exim-users <
>>> exim-users@???> wrote:
>>>
>>> Hardy via Exim-users <exim-users@???> (Di 13 Feb 2018 09:44:38
>>> CET):
>>>
>>>> Hi folks,
>>>>
>>>> my aim is to have something in the way of
>>>>
>>>> myname.*: myname
>>>>
>>>> for the local user myname, if this is possible to do in the alias file.
>>>> I
>>>> would rather like to have it here than to change the conf. Possible?
>>>>
>>>
>>> You need to modify the config anyway, to allow for patterns in your
>>> alias file.
>>>
>>>
>>>     data = ${lookup{$local_part}nwildlsearch{/etc/aliases}}

>>>
>>> With entries like:
>>>
>>>     hans:   literal
>>>     hans*:  literal
>>>     *hans:  pattern
>>>     ^hans:  regexp

>>>
>>>
>>>     Best regards from Dresden/Germany
>>>     Viele Grüße aus Dresden
>>>     Heiko Schlittermann
>>> --
>>> SCHLITTERMANN.de ---------------------------- internet & unix support -
>>> Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
>>> gnupg encrypted messages are welcome --------------- key ID: F69376CE -
>>> ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -
>>> --
>>> ## 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/

>>>
>>
>>
> --
> ## 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/
>




--
Systems Administrator & Change Manager
IT Services, University of York, Heslington, York YO10 5DD, UK
Tel: +44-(0)1904-323811

Web: www.york.ac.uk/it-services
Disclaimer: www.york.ac.uk/docs/disclaimer/email.htm