Autor: Steve Thomas Datum: To: Matt Jones CC: exim-users Betreff: Re: [Exim] help with routers
On Tue, Jan 13, 2004 at 09:32:54PM -0000, Matt Jones is rumored to have said: >
> how would the router config look to save incomming mails to the users
> in mysql to their home dir. and if the mysql user dont exist, send an
> email back saying unknown user
Here's the router/transport I use for mysql virtual users. I'm no exim guru, so I don't know if they could be improved upon, but they work for me. Be sure to change the SQL query to whatever fits your environment. "maildir" is the field which holds the user's mail directory on my system, and usually looks something like "/usr/local/virtual/domain.com/users/joebob/Maildir/".
# mysql users
virtual_users:
driver = redirect
allow_fail
allow_defer
data = ${lookup mysql{select maildir from users where id='$local_part@$domain'}{$value}fail}
directory_transport = virtual_delivery
virtual_delivery:
driver = appendfile
maildir_format
delivery_date_add
envelope_to_add
return_path_add
group = mail
user = mail
mode = 0660
HTH,
Steve
--
"God, please save me from your followers!"
- Bumper Sticker