Re: [Exim] Let the user manage emails

Etusivu
Poista viesti
Vastaa
Lähettäjä: Matthew Byng-Maddick
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [Exim] Let the user manage emails
On Thu, Mar 20, 2003 at 06:36:20PM +0100, Florian Lindner wrote:
> external clieant via SMTP -> MTA (exim) -> MDA (maildrop) -> Maildir in the
> users homedir.
>
> My problem are how to enable the users to create email adresses with config
> files in their homedirs. I need to place a aliases and virtual table in the
> users homedir which in only for one virtual domain.
>
> A idea:
> Using a file like that as a virtual map: (for local user example)
>
> example.net DOMAIN
> me@??? example+me
> you@??? example+you
> she@??? example+she


I have something slightly similar, though not in people's homedirs. In this
case, though, what I'd do is:

user must have files: eg. /home/user/emaildomains/usersdomain.tld

That file is an alias file for the domain.

Your system configuration has something like:
usersdomain.tld: user

and then your config file has some macros like:

| DOMAINCONFIG = /etc/exim/domains.cfg
| HOMEROOT = /home/
| DOMAINFILES = emaildomains


and some routers like:

| user_aliases:
| driver = redirect
| forbid_file = true
| forbid_pipe = true
| allow_defer = true
| allow_fail = true
| retry_use_local_part = true
| domains = lsearch;DOMAINCONFIG
| require_files = "HOMEROOT${lookup{$domain} lsearch {DOMAINCONFIG}}/DOMAINFILES/$domain"
| data = ${lookup{$local_part} lsearch* {HOMEROOT${lookup{$domain} lsearch {DOMAINCONFIG}}/DOMAINFILES/$domain}}

|
| user_no_file:
| driver = redirect
| forbid_file = true
| forbid_pipe = true
| allow_defer = true
| allow_fail = true
| retry_use_local_part = true
| domains = lsearch;DOMAINCONFIG
| data = ${lookup{$domain} lsearch {DOMAINCONFIG}}


The first router makes the email files work. The second provides a default
if that file doesn't exist. This allows you to delegate authority in a
sensible way.

You'll also need to make sure that your local domain list includes an
entry lsearch;DOMAINCONFIG, and then the whole lot will work sensibly.

MBM

--
Matthew Byng-Maddick         <mbm@???>           http://colondot.net/