OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Regular Expressions in virtual_alias_maps

From: Andreas Winkelmann (mlawinkelmann.de)
Date: Sat Oct 07 2006 - 13:07:45 CDT


Am Saturday 07 October 2006 19:48 schrieb watsonfongaboo.com:

> I am following Hilderbrandt and Koehler's Postfix book on setting patterns
> in virtual_alias_maps using regular expressions.

s/Koehler/Koetter/

> The example they give is:
>
> /^admin-.*postfix-book\.com$/ mailboxexample.com
>
> By their explanation, this should cover instances such as:
>
> admin-firewallpostfix-book.com
> admin-mailpostfix-book.com
> admin-webpostfix-book.com
>
> I entered the line in as they had it (except transposing for my own
> domain), but it doesn't seem to kick in.
>
> A colleague thought maybe that one has to change the virtual_alias_map
> from being a hash: map to being a regex: map.. But there's no sign of that
> in the chapter in the book.

The Headline of this Example is "Regular Expression Entries".

Hint: regex: = REGular EXpression.

Maybe you should read first the Chapter, which describes the Map-Types.

> If this were the case, how would any other aliases in non-regex form be
> proecessed properly?

--
        Andreas