One domain, one user account - aliases
\ Jori Mantysalo (14 Nov 2007)
. \ Hamilton Vera (14 Nov 2007)
. . \ Jori Mantysalo (14 Nov 2007)
. \ mouss (14 Nov 2007)
. . \ Jori Mantysalo (14 Nov 2007)
. . . \ mouss (14 Nov 2007)

6 msgDisable from=<>
4 msgPostfix and Locale
5 msgamavis documentation
3 msgA little bit confusing...
5 msgemail filtering
3 msgPostfix, dns, and hosts.allow
3 msgThis is new
10 msgUsing a Specific SMTP instead of DNS for Intern...
2 msgRe: Issue on postrix
2 msgCaching/connection pooling?
4 msgdkim-filter wildcards
4 msgHow to avoid dictionary attacks, from internal ...
5 msgQuestion for WV? [Fwd: Re: [dkim-milter-beta] d...
3 msgSpam simulation
20 msgBlackberry or iphone ?
3 msgsmtp auth session cache Q
1 msgRE: ETRN / fast flush - how many domains is 'to...
5 msgdifference between amavis and amavis-new
6 msgETRN forward?
Subject:Re: One domain, one user account - aliases
Group:Postfix-users
From:mouss
Date:14 Nov 2007


 
Jori Mantysalo wrote:
> On Wed, 14 Nov 2007, mouss wrote:
>
>>> So, I would like to have domain-specific aliases file that is editable
>>> by named user. Is that possible with postfix?
>
>> Use virtual_alias_maps:
>>
>> one someone1
>> one someone2
>
> I do not understand. Could you give longer example?
>
> I now have at main.cf
>
> virtual_alias_domains = bar.example foo.example
> virtual_alias_maps = hash:/etc/postfix/virtual
>
> and at virtual I have for example
>
> sales someone1
> sales someone2
> repairs some
>
> but that doesn't work if I want to give bar-user permissions to set up
> @bar.example -addresses as he like.
>


[method 1: users are trusted]
virtual_alias_maps =
hash:/etc/postfix/virtual_foo
hash:/etc/postfix/virtual_bar


# chgrp foogroup /etc/postfix/virtual_foo
# chmod g+w /etc/postfix/virtual_foo

# chgrp bargroup /etc/postfix/virtual_bar
# chmod g+w /etc/postfix/virtual_bar

# su - foo
[foo]% emacs /etc/postfix/virtual_foo
[foo]% postmap hash:/etc/postfix/virtual_foo

I assume that you trust foo and bar users, because here, nothing
prevents foo from adding a virtual alias for any domain (yes, including
yahoo, gmail, ... etc).

[method 2: sudo + script]
An alternative is to use sudo to allow them to run a script that you
create for them. This script would take their input file, check it and
run the postmap command.

[method 3: sql]
Yet another alternative is to use multiple sql tables and grant each
user access to the associated table..

virtual_alias_maps =
mysql:/etc/postfix/mysql/virtual_foo
mysql:/etc/postfix/mysql/virtual_bar

so virtual_foo will use some alias_foo table (foo is granted all
privileges on this table) but the query is controlled by yourself, so
you can do whatever restrictions you want. for example:
QUERY = ...
WHERE '%d' = 'foo.example'




© 2004-2008 readlist.com