| |||||||||||||||||||||||||||||||
|
> 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