[Exim] virtual domains and mysql

Página Inicial
Delete this message
Reply to this message
Autor: Andrew Nelson
Data:  
Para: exim-users
Assunto: [Exim] virtual domains and mysql
Hi,

I'm trying to set up my server so that it can
receive mail for a couple of different domains -
the userbase seperate on each.

I want the router to check that it is a valid
username for the domain, and then the delivery
to put it in a file (named by username) in a
seperate directory for each domain.

I have tried writing the conf below - but it
isn't checking the domain or delivering properlly
yet - can anyone please help?

thanks,
Andrew.



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



_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail