diff --git a/etc/alternc/templates/postfix/myalias.cf b/etc/alternc/templates/postfix/myalias.cf index 251d9672..353e733b 100644 --- a/etc/alternc/templates/postfix/myalias.cf +++ b/etc/alternc/templates/postfix/myalias.cf @@ -6,7 +6,5 @@ user = %%dbuser%% password = %%dbpwd%% hosts =%%dbhost%% dbname = %%dbname%% -table = mail_alias -select_field = alias -where_field = mail +query = select concat(if(isnull(mailbox.id), '', concat(address.address, '\n')), recipient.recipient) from recipient join address on address.id = recipient.address_id left outer join mailbox on mailbox.address_id = address.id where address.address='%s'; diff --git a/etc/alternc/templates/postfix/mydomain.cf b/etc/alternc/templates/postfix/mydomain.cf index 69b3bc00..5c67e46e 100644 --- a/etc/alternc/templates/postfix/mydomain.cf +++ b/etc/alternc/templates/postfix/mydomain.cf @@ -6,7 +6,5 @@ user = %%dbuser%% password = %%dbpwd%% hosts =%%dbhost%% dbname = %%dbname%% -table = mail_domain -select_field = alias -where_field = mail +query = select domaines.domaine from domaines where domaine='%s' and gesmx=1; diff --git a/etc/alternc/templates/postfix/mygid.cf b/etc/alternc/templates/postfix/mygid.cf index 15c96842..3fa3f349 100644 --- a/etc/alternc/templates/postfix/mygid.cf +++ b/etc/alternc/templates/postfix/mygid.cf @@ -6,6 +6,5 @@ user = %%dbuser%% password = %%dbpwd%% hosts =%%dbhost%% dbname = %%dbname%% -table = mail_users -select_field = uid -where_field = alias +query = select compte from domaines join address on address.domain_id = domaines.id join mailbox on mailbox.address_id = address.id where address.address='%s' + diff --git a/etc/alternc/templates/postfix/myvirtual.cf b/etc/alternc/templates/postfix/myvirtual.cf index b7fe8841..481b7b5b 100644 --- a/etc/alternc/templates/postfix/myvirtual.cf +++ b/etc/alternc/templates/postfix/myvirtual.cf @@ -6,7 +6,5 @@ user = %%dbuser%% password = %%dbpwd%% hosts =%%dbhost%% dbname = %%dbname%% -table = mail_users -select_field = path -where_field = alias +select concat(path, '/Maildir/') from mailbox join address on address.id = mailbox.address_id where address.address='%s'