On Wed, Mar 15, 2006 at 01:33:08PM +1100, Voytek Eymont wrote:
> any Postfix experts here ?

*cough*jdub*cough*

> I'd like to 'convert' local users to be email users in similar fasion,
> through MySQL lookup

Uhm... WTF?  Do you want them to be local, or virtual?  Are you storing your
/etc/passwd in MySQL, or do you want to remove users who only use your
system for e-mail from your local /etc/passwd and only have them in MySQL? 

> .....
> virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
> ....
> # local_transport = local
> # local_recipient_maps = unix:passwd.byname $alias_maps
> #
> local_transport = virtual
> local_recipient_maps = $virtual_mailbox_maps
> ....
> 
> but,. I'm missing aliases...

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf

mysql-virtual_alias_maps.cf:
user = <SQL_UNPRIVILEGED_USER>
password = <SQL_UNPRIVILEGED_PASSWORD>
dbname = <SQL_DB>
table = mail_virtual
select_field = destination
where_field = email
additional_conditions = and destination <> '' and destination <> ' '
hosts = <SQL_HOST> 

(According to SysCP, which does all this sort of thing for me automatically
normally).

- Matt
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to