Re: [exim] Looking for a sample configuration

Top Page
Delete this message
Reply to this message
Author: Heiko Schlittermann
Date:  
To: exim-users
Subject: Re: [exim] Looking for a sample configuration
Jim Trigg <jtrigg@???> (Fr 23 Apr 2010 18:04:08 CEST):
> Does anyone here use system groups to determine what domains are valid
> for a system user to receive mail through? I am hosting nine domains on
> a single system, and am looking for a simple way to allow a given user
> to receive email through a defined subset of the domains. (I'm not yet
> worrying about the consideration that I want to have one user name on
> half the domains and another on the other half...)


Do I understand it the right way?

    # getent group
    dom1:user1,user2
    dom2:user1,user3


user1@dom1 is valid, but user2@dom2 is not.

What you need is to check for a given address $local_part@$domain,
if either the user list of $domain (the group) contains the $local_part
or the $local_part's (the users) $domain is the is listed in
his primary/supplementary groups.

You can decide, which check is more simple to implement.

    # router
    systemgroup_domain
        driver = accept
        check_local_user
        #local_parts = <, ${extract{4}{:}{${run{/usr/bin/getent group $domain}}}}'
        # or
        #domains = ${sg{${run{/usr/bin/id -nG $local_part}}}{ }{:}}
        transport = local_transport



But beware, it's not tested a lot.

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann HS12-RIPE -----------------------------------------
 gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
 gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B -