[Exim] virtual domains and mysql

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Andrew Nelson
Date:  
À: exim-users
Sujet: [Exim] virtual domains and mysql
Hi,

I'm trying to get my server to accept mail
for a handfull of different domains with
different users on each..

I need a router that checks that the user
(for the domain) exists in a mysql database,
and then a delivery block that checks the
UID/GID from mysql and appends the email to
a file (named using username) in a different
directory for each domain.

The conf sections below doesn't currently
deal with the domain part, but is working
for local users.. Can someone please help
me modify it.. I can't get it going..


mysql_user:
  driver = accept
  condition = \
   ${if eq{} \
     { ${lookup mysql {SELECT maildir FROM userbase \
         WHERE username='${local_part}'}} \
     } \
     {no}{yes} \
   }
  retry_use_local_part
  transport=mysql_delivery



mysql_delivery:
driver = appendfile
envelope_to_add
return_path_add
file = ${lookup mysql{SELECT maildir FROM userbase WHERE
username='${local_part}' and email_access='YES'}}$local_part
user = ${lookup mysql{SELECT u_id FROM userbase WHERE
username='${local_part}' and email_access='YES'}}
group = ${lookup mysql{SELECT g_id FROM userbase WHERE
username='${local_part}' and email_access='YES'}}

thanks,
Andrew.


_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail