On 2012-03-22 14:53, /dev/rob0 wrote:
> On Thu, Mar 22, 2012 at 12:33:26PM +0100, Claudius wrote:
>> Or do I have to compile a file that has all my domains in it?
> You do. In regexp/pcre you can enclose the LHS (local-part) matches 
> in an IF/ENDIF loop with the domains:
>
> if /\@(example\.com|(other|third)\.example)$/
> ... your LHS stuff ...
> endif
>
> (Escaping of the \@ is necessary in PCRE but not POSIX RE.)
>
> With domain lists in SQL, this is trivial -- I have posted this
> solution before, recently. Simply do the magic in a SQL query with 
> hardcoded values for the LHS matches.
>
> I do have my domain lists in SQLite, but I don't do this. I just add 
> postmaster/abuse aliases when adding a domain. If this is something 
> commonplace, you can script it.
>
> It looks like you are duplicating alias_maps in virtual_alias_maps. 
> You probably don't need all those aliases for each virtual domain. I 
> think the purpose of all the default aliases(5) in alias_maps was 
> originally to prevent Internet mail from being delivered to system 
> and daemon accounts. These accounts must exist in the local passwd(5) 
> database, but you don't want them getting mail.
>
> Also note that alias_maps does this perfectly for $mydestination 
> local(8) domains. The RHS (domain-part) is ignored.
Thank you for the insight.
those actually are only for virtual domains. They just alias to the
local users.
Using just /etc/aliases didn't do anything for the virtual domains.

I will use my mysql tables then as you suggested instead of regexp. Thanks.

- Claudius

Reply via email to