Re: [exim] Wildcards in aliases

2018-02-16 Thread Hartmut Steffin via Exim-users

On 13.02.2018 13:14, Andrew C Aitchison via Exim-users wrote:
> On Tue, 13 Feb 2018, Hardy via Exim-users wrote:

>> my aim is to have something in the way of
>>
>> myname.*: myname
>>
>
> I wonder whether you are trying to implement a feature
> already explicitly supported in exim ?

This may well be the case. I am so deep into writing ACLs only, I tend 
to neglect all the other parts of configuration and possibilities there.


>
> If you want that for all users, you could use something like
>  local_part_suffix : .
> in the "userforward" router (if I have got that right).
>

I found it in the docs... sounds interesting, but actually no, I don't 
want to add it to all users, that is why I preferred the alias solution. 
But still this seeds ideas.


Thank you.

And all the others, thank you also for pointing me to my self study for 
expressions...


Hardy
--
No pasaran!



smime.p7s
Description: S/MIME Cryptographic Signature
-- 
## 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/


Re: [exim] Wildcards in aliases

2018-02-14 Thread Hardy via Exim-users
In fact I have an approach not too different from yours. I call it the 
"volatile" addresses you use for suspicious cases where you need to give 
your email. It is nameYYMM, it exists for the current and last month, 
but disappears after that automatically. (By that time you need to 
decide, whether you like their mail, so either let go, or change to a 
non-volatile) I am far better in scripting than in looking up 
configuration details :-( so a monthly script actually changes/adds 
these in my aliases file m-)


But what I need now is indeed closer to your way. I will find something. 
Thanks again for your input.


Hardy


On 14.02.2018 11:14, Merlin Hartley via Exim-users wrote:

We use the local_part_suffix for all users, then they can choose to give out 
different addresses to different websites and use filters on any incoming mail 
based on addressee - for example I use merlin-slurm@… for the slurm mailing 
list.
This way they can automatically file/trash mail from a leaked/sold address.

To be honest I don’t think many of our users are utilising that feature, but I 
personally find it useful!


Merlin



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


Re: [exim] Wildcards in aliases

2018-02-14 Thread Merlin Hartley via Exim-users
We use the local_part_suffix for all users, then they can choose to give out 
different addresses to different websites and use filters on any incoming mail 
based on addressee - for example I use merlin-slurm@… for the slurm mailing 
list.
This way they can automatically file/trash mail from a leaked/sold address.

To be honest I don’t think many of our users are utilising that feature, but I 
personally find it useful!


Merlin

--
Merlin Hartley
Computer Officer
MRC Mitochondrial Biology Unit
University of Cambridge
Cambridge, CB2 0XY
United Kingdom

> On 14 Feb 2018, at 06:47, Hardy via Exim-users  wrote:
> 
> On 13.02.2018 13:14, Andrew C Aitchison via Exim-users wrote:
> > On Tue, 13 Feb 2018, Hardy via Exim-users wrote:
> 
> >> my aim is to have something in the way of
> >>
> >> myname.*: myname
> >>
> >
> > I wonder whether you are trying to implement a feature
> > already explicitly supported in exim ?
> >
> > If you want that for all users, you could use something like
> >  local_part_suffix : .
> > in the "userforward" router (if I have got that right).
> >
> 
> I found it in the docs... sounds interesting, but actually no, I don't want 
> to add it to all users, that is why I would prefer an alias file solution. 
> But still this seeds ideas. Thank you.
> 
> And all the others, thank you also for pointing me to my self study for 
> expressions... ;-)
> 
> Hardy
> 
> -- 
> No pasaran!
> 
> -- 
> ## 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/


Re: [exim] Wildcards in aliases

2018-02-13 Thread Hardy via Exim-users

On 13.02.2018 13:14, Andrew C Aitchison via Exim-users wrote:
> On Tue, 13 Feb 2018, Hardy via Exim-users wrote:

>> my aim is to have something in the way of
>>
>> myname.*: myname
>>
>
> I wonder whether you are trying to implement a feature
> already explicitly supported in exim ?
>
> If you want that for all users, you could use something like
>  local_part_suffix : .
> in the "userforward" router (if I have got that right).
>

I found it in the docs... sounds interesting, but actually no, I don't 
want to add it to all users, that is why I would prefer an alias file 
solution. But still this seeds ideas. Thank you.


And all the others, thank you also for pointing me to my self study for 
expressions... ;-)


Hardy

--
No pasaran!

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


Re: [exim] Wildcards in aliases

2018-02-13 Thread Andrew C Aitchison via Exim-users

On Tue, 13 Feb 2018, Hardy via Exim-users wrote:


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?


I wonder whether you are trying to implement a feature
already explicitly supported in exim ?

If you want that for all users, you could use something like
local_part_suffix : .
in the "userforward" router (if I have got that right).

--
Andrew C. Aitchison Cambridge, UK
and...@aitchison.me.uk

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


Re: [exim] Wildcards in aliases

2018-02-13 Thread Heiko Schlittermann via Exim-users
Mike Brudenell via Exim-users  (Di 13 Feb 2018 12:07:56 
CET):
> 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/


- https://www.regex101.com/

No pricing, no ads.

-- 
Heiko


signature.asc
Description: PGP signature
-- 
## 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/


Re: [exim] Wildcards in aliases

2018-02-13 Thread Jeremy Harris via Exim-users
On 13/02/18 11:07, Mike Brudenell via Exim-users wrote:
>  (I think Exim uses PCRE if memory
> serves?)

Yes.

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


Re: [exim] Wildcards in aliases

2018-02-13 Thread Heiko Schlittermann via Exim-users
Hardy via Exim-users  (Di 13 Feb 2018 11:40:11 CET):
…
>   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

As far as I know, DBM lookups do not work with wildcards, it is a
limitation imposed by DBM.

http://www.schlittermann.de/doc/exim-lookup-benchmark.txt

… it's not fresh anymore, but maybe it gives you some idea.

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  -


signature.asc
Description: PGP signature
-- 
## 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/


Re: [exim] Wildcards in aliases

2018-02-13 Thread Mike Brudenell via Exim-users
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 
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@exim.org> wrote:
>>>
>>> Hardy via 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
-- 
## 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/


Re: [exim] Wildcards in aliases

2018-02-13 Thread Hardy via Exim-users

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 
 wrote:

Hardy via 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/


Re: [exim] Wildcards in aliases

2018-02-13 Thread Merlin Hartley via Exim-users
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 
>  wrote:
> 
> Hardy via 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/


Re: [exim] Wildcards in aliases

2018-02-13 Thread Heiko Schlittermann via Exim-users
Hardy via 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  -


signature.asc
Description: PGP signature
-- 
## 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/


[exim] Wildcards in aliases

2018-02-13 Thread Hardy via Exim-users

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?



Hardy

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