Re: Automatically creating user accounts from exim
On Qua, 17 Jun 2009, David wrote:
Could you point me to docs where I can read more about virtual users?
Most of the Google results are for Virtual Domains, or for Exim in
combination with other software.
Exim doesn't really make a distinction between real users and local  
users. It can check /etc/passwd (or some other database) for users,  
but it can also check a text file, a database, check for the existence  
of a file...
For example, this is a very simple router that checks if the  
destination is a local user, and if it is, calls the transport to  
store mail in a local file:
localuser:
  driver = accept
  check_local_user
  transport = local_delivery
Here's the said transport:
local_delivery:
  driver = appendfile
  file = /var/mail/$local_part
  delivery_date_add
  envelope_to_add
  return_path_add
If check_local_user is removed, then all mail that reaches the  
localuser router is accepted, and will be stored in  
/var/mail/destination. (A few more settings in the transport might be  
necessary.)
A user account is not created, though. This part is complicated, what  
I can think of is a sending the e-mail (via a pipe transport) that  
creates the account. Then it stored the mail, or sends it back to exim  
to be processed again.
As for docs, there's the extensive exim manual at  
http://www.exim.org/exim-html-current/doc/html/spec_html/ . You'll  
certainly need to take a look at the sections about routers and  
transports.
--
Eduardo M KALINOWSKI
eduardo@kalinowski.com.br
Reply to: