Re: [exim] Maildir, mysql database, and creating home dirs

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Wakko Warner
Datum:  
To: Bertrand CHERRIER
CC: exim-users
Betreff: Re: [exim] Maildir, mysql database, and creating home dirs
Bertrand CHERRIER wrote:
> Ooops I didn't read the subject ... so here it is for mysql ...
>
> virtual_delivery:
>  driver = appendfile
>  envelope_to_add
>  return_path_add
>  mode = 0600
>  maildir_format = true
>  create_directory = true
>  directory = ${lookup mysql{select smtp from users,domains \
>                where localpart = '${quote_mysql:$local_part}' \
>                and domain = '${quote_mysql:$domain}' \
>                and users.domain_id = domains.domain_id}}
>  user = ${lookup mysql{select users.uid  from users,domains \
>                where localpart = '${quote_mysql:$local_part}' \
>                and domain = '${quote_mysql:$domain}' \
>                and users.domain_id = domains.domain_id}}
>  group = ${lookup mysql{select users.gid from users,domains \
>                where localpart = '${quote_mysql:$local_part}' \
>                and domain = '${quote_mysql:$domain}' \
>                and users.domain_id = domains.domain_id}}
>  quota = ${lookup mysql{select users.quota from users,domains \
>                where localpart = '${quote_mysql:$local_part}' \
>                and domain = '${quote_mysql:$domain}' \
>                and users.domain_id = domains.domain_id}{${value}M}}
>  quota_is_inclusive = false
>  quota_size_regex = ,S=(\d+)
>  quota_warn_threshold = 90%
>  maildir_use_size_file = true


FYI: You could combine those 4 lookups in the routers by setting
address_data and using ${extract to recover the data. You'd save on 3 calls
to the SQL server.

--
Lab tests show that use of micro$oft causes cancer in lab animals
Got Gas???