OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Virtual aliasing - query

From: /dev/rob0 (rob0gmx.co.uk)
Date: Thu Aug 10 2006 - 15:13:23 CDT


On Thursday 10 August 2006 14:56, Dick Middleton wrote:
> I'm a bit puzzled by the way virtual aliasing seems to work.

And, it seems, about PCRE.

> I have a pcre virtual_alias_maps entry like:
>
> /^[ph]ostmaster|webmaster|abuse/ adminmydomain

First, you need an expression for which domains to alias, or in an
"if ... endif" construct.

Second, that's not doing what you think, apart from the following
misunderstanding. You need to enclose those |'s ...

if /^(([ph]ost|web)master|abuse)/
/example\.com$/ adminmydomain
...
endif

> What I find is that if I try to send email to
> postmastersome.other.domain the message immediately ends up in my
> admin mailbox.

As would anyuserpostmaster.example.com and many other unintended
things.

> The bit that puzzles me is that some.other.domain is not in the
> virtual_mailbox_domains map.
>
> Shouldn't virtual_mailbox_domains be checked before
> virtual_alias_maps so postfix knows the domain is not local?

As documented, virtual_alias_maps apply to ALL mail, not just mail
destined to this server. IAC there's no direct connection between
virtual_mailbox_domains and virtual_alias_maps at all. There is a
"virtual alias class" of domains listed in virtual_alias_domains,
however.
--
    Offlist mail to this address is discarded unless
    "/dev/rob0" or "not-spam" is in Subject: header