Re: [Exim] Need Recommendation: Backend Store for Virtual Ac…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Fred Viles
Data:  
Para: Exim-users
Assunto: Re: [Exim] Need Recommendation: Backend Store for Virtual Accounts
On 12 Jan 2004 at 13:24, Jonathan Vanasco wrote about
    "[Exim] Need Recommendation: Backend":


|...
| It works great -- but its a bit overkill for my personal web machine. 
| I'd like that to run exim, and handle virtual accounts with something
| simpler than ldap -- perhaps dbm or a flatfile.


For a really lightweight solution, just use maildir directories.
Then exim doesn't need any sort of database at all, and you can use
courier-imap's userdb for the POP/IMAP passwords.

| Can anyone point me to a setup they've enjoyed in the past.


Here's mine (I don't think it can get much simpler). In exim:

# router
localuser:
driver = accept
local_part_suffix = +* : -*
local_part_suffix_optional
local_parts = dsearch;/var/spool/vmail
transport = local_delivery
cannot_route_message = Unknown user

#transport
local_delivery:
driver = appendfile
directory = /var/spool/vmail/$local_part
maildir_format
delivery_date_add
envelope_to_add
return_path_add
group = mail

And I use this script to create the mailboxes and courier-imap
accounts:

#! /bin/sh
#
# usage: userdb-adduser username password
#
mkdir /var/spool/vmail/$1
touch /var/spool/vmail/$1/maildirfolder
mkdir /var/spool/vmail/$1/{new,cur,tmp}
chmod -R 700 /var/spool/vmail/$1
chown -R mail.mail /var/spool/vmail/$1
/usr/lib/courier-imap/sbin/userdb $1 set home=/var/spool/vmail mail=/var/spool/vmail/$1 uid=8 gid=12
/usr/lib/courier-imap/sbin/userdbpw <<EOF | /usr/lib/courier-imap/sbin/userdb $1 set systempw
$2
$2
EOF