Virtual Domain (was: [HLUG] Exim 4.50 on Debian 3.1 external greet_pause?)

Mark Broadbent mgjbroadbent at googlemail.com
Mon Jan 29 22:13:15 GMT 2007


Hi Andrew,

On 29/01/07, Andrew Hodgson <andrew at hodgsonfamily.org> wrote:
> [Re Virtual Domains]
>
> >Try this (using Exim, Courier-IMAP and MySQL):
>
> >http://www.debian-administration.org/articles/140
> >and
> >http://www.tty1.net/virtual_domains_en.html
>
> Thanks but they aren't quite what I want.  I have now configured the POP
> server (using PAM) to authenticate against the passwd file I specify.
> Is there any way of telling Exim I want all mail that has a user in this
> file to be delivered to /var/mail/username?   Am I being really dumb?

I suspect what you're wanting here is:

First you need to verify the local part of the email (i.e. the user
part of user at example.com).    This can be done by getting exim to
check your alternative passwd file like so:

Checks /etc/passwd and /etc/otherpasswd:

local_parts = passwd;$local_part : lsearch;/etc/otherpasswd

Fully virtual:

local_parts = lsearch;/etc/otherpasswd

You'll also have to make sure the virtual users mbox exists and is
writeable by exim before it will work.

[The following rules should already exist in your configuration but
may need tweaking as described to get delivery in the right place]

Then you need to have a router section that can verify and direct
local user mail.  See the example below:

localusers:
  driver = accept
  domains = mydomain.example
  check_local_user
  transport = local_delivery

In you're transport section you'll need a local delivery rule that
defines the location of the mbox (or whatever format you're using).
The one below is an example from the exim manual:

local_delivery:
  driver = appendfile
  file = /var/mail/$local_part
  delivery_date_add
  envelope_to_add
  return_path_add


Thanks
Mark

-- 
Mark Broadbent
* http://www.wetlettuce.com/



More information about the Herefordshire mailing list