[Vmail-discuss] Re: exim confs and maildir
Peter McGarvey
xaphod at packet.org.uk
Thu, 10 Jul 2003 09:35:59 +0100
--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
* Patrick Okui <pokui@one2net.co.ug> [2003-07-09 20:59:25 BST]:
> Hi all
>
> does anyone know if the configuration stuff in the README will work with
> exim 4.x and secondly, how much of it must I change to get maildir
> format?
Well, it's been a while since I read the README. But as I run with
maildirs you may find the attached portions of my config files useful.
--
TTFN, FNORD
Peter McGarvey
Freelance FreeBSD Hacker
(will work for bandwidth)
--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename="configure.vmail"
## ----------------------------------------------- Router -
## -=* VMAIL *=-
## - virtual forward
## DB means:
## local_part ==> remote address
## local_part ==> local aliases
## local_part ==> local maildrop
## uses tables forwarder & popbox
## - virtual_localuser
## Deliver virtual domains
## - virtual_default user
## deliver unrouteable virtual mail to the _default_
virtual_forward:
driver = redirect
allow_defer
allow_fail
forbid_file
forbid_pipe
local_part_prefix = *-
local_part_prefix_optional
retry_use_local_part
data = \
${lookup mysql { \
select remote_name \
from forwarder \
left join domain_alias \
on domain_alias.domain_name = forwarder.domain_name \
where local_part = '$local_part' \
and (forwarder.domain_name = '$domain' \
or alias = '$domain') }}
virtual_localuser:
driver = accept
local_part_prefix = *-
local_part_prefix_optional
retry_use_local_part
transport = virtual_localdelivery
condition = \
${if eq \
{} \
{${lookup mysql { \
select mbox_name \
from popbox \
left join domain_alias \
on domain_alias.domain_name = popbox.domain_name \
where local_part = '$local_part' \
and (popbox.domain_name = '$domain' \
or alias = '$domain')}}} \
{no}{yes}}
virtual_defaultuser:
driver = redirect
allow_defer
allow_fail
forbid_file
forbid_pipe
local_part_prefix = *-
local_part_prefix_optional
retry_use_local_part
data = \
${lookup mysql { \
select remote_name \
from forwarder \
left join domain_alias \
on domain_alias.domain_name = forwarder.domain_name \
where local_part = '_default_' \
and (forwarder.domain_name = '$domain' \
or domain_alias.alias = '$domain')}}
## -------------------------------------------- Transport -
## -=* VMAIL *=-
## - directories /var/spool/mail/SERVERS/...
# This transport is to deliver mail going to virtual domains to user
# mailspools in directories under /var/spool/mail/SERVERS/foo/bar; this is
# triggered from a director below.
virtual_localdelivery:
driver = appendfile
create_directory
delivery_date_add
directory_mode = 0770
envelope_to_add
maildir_format
mode = 0660
return_path_add
directory = \
${lookup mysql{ \
select path \
from domain \
left join domain_alias \
on domain_alias.domain_name = domain.domain_name \
where domain.domain_name = '$domain' \
or domain_alias.alias = '$domain' \
limit 1} \
{$value}fail}/${lookup mysql{ \
select mbox_name \
from popbox \
left join domain_alias \
on popbox.domain_name = domain_alias.domain_name \
where (popbox.domain_name = '$domain' \
or domain_alias.alias = '$domain') \
and local_part = '$local_part' \
LIMIT 1} \
{$value}fail} \
user = \
${lookup mysql{ \
select unix_user \
from domain \
left join domain_alias \
on domain_alias.domain_name = domain.domain_name \
where domain.domain_name = '$domain' \
or domain_alias.alias = '$domain' \
limit 1} \
{$value}fail}
--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename="tpop3d.conf.vmail"
# Support vmail domain account
auth-mysql-enable: yes
auth-mysql-hostname: sql.diogenes.intranet
auth-mysql-database: vmail
auth-mysql-username: USERNAME
auth-mysql-password: PASSWORD
auth-mysql-pass-query: \
SELECT CONCAT(domain.path, '/', popbox.mbox_name) as location, \
popbox.password_hash, \
domain.unix_user, \
'maildir' \
FROM popbox, domain \
WHERE popbox.local_part = '$(local_part)' \
AND popbox.domain_name = '$(domain)' \
AND popbox.domain_name = domain.domain_name
--7AUc2qLy4jB3hD7Z--