[Pkg-exim4-users] Secondary MX with virtual domain config
Jonathan Plews
jon at syn.co.uk
Mon Jan 31 00:22:56 UTC 2011
My server does just that, the following lines are in
exim4.conf.localmacros (but you could use debconf too)
MAIN_LOCAL_DOMAINS = @:localhost:dsearch;/srv/conf/vmail
MAIN_RELAY_TO_DOMAINS = dsearch;/srv/conf/dns
/srv/conf/vmail is just the same as /etc/exim4/virtual in examples
/srv/conf/dns works the same way as alias files for the virtual
domains - but they're tinydns files
I'd expect 'lsearch:/etc/exim4/local_relay_domains' or similar would
work too if it contained:
example.co.uk
etc.org
...
Seems to work well for me, no problems so far.
--
Jonathan Plews
Quoting x_debian-exim4-users_x at nospam.pz.podzone.net:
> Hi,
>
> I am trying to configure exim for so called 'virtual' domains, but
> with a primary/secondary MX scenario. In fact I'm not so sure this is
> strictly correct usage of primary/secondary terminolgy but I hope it's
> clear.
>
> The stock solution appears to be the "vdom_aliases" router (below), as
> variously quoted in howto's and internet postings. However afaict,
> this only caters for single server operation and my attempts to morph
> this to work satisfactorilly on a secondary MX have failed so far.
>
> I have previously used the hubbed_hosts router (below) on the
> secondary MX, together with callout to the primary to check for valid
> recipient. This doesn't work so well I think if the primary MX is
> down.
>
> So I think the solution is to modify the hubbed_hosts router so that
> it will consult a local configuration (as the vdom_aliases router
> does) to validate the recipient addr.
>
> The primary MX would then run the vdom_aliases router as per normal,
> with it's local configuration of /etc/exim4/virtual/... files.
>
> My efforts to figure this out have so far not come to much. I'm
> hoping someone can point me in the right direction please?
>
> I'm happy if the solution requires files to be synched between MXs, or
> a hybrid solution where /etc/exim4/virtual/... is first used for
> vaildation and /etc/exim4/hubbed_hosts is then used for routing.
>
> -- 150_exim4-config_hubbed_hosts --
>
> hubbed_hosts:
> debug_print = "R: hubbed_hosts for $domain"
> driver = manualroute
> domains = "${if exists{CONFDIR/hubbed_hosts}
> {partial-lsearch;CONFDIR/hubbed_hosts}
> fail}"
> same_domain_copy_routing = yes
> route_data = ${lookup{$domain}partial-lsearch{CONFDIR/hubbed_hosts}}
> transport = remote_smtp
>
> -- 350_local-config_vdom_aliases --
>
> vdom_aliases:
> driver = redirect
> allow_defer
> allow_fail
> domains = dsearch;/etc/exim4/virtual
> data =
> ${expand:${lookup{$local_part}lsearch*@{/etc/exim4/virtual/$domain}}}
> retry_use_local_part
> pipe_transport = address_pipe
> file_transport = address_file
> no_more
>
> My references on this have so far been the (Red) Exim book, and -
>
> http://www.debian-administration.org/articles/140
>
> http://wiki.nerdylorrin.net/wiki/Wiki.jsp?page=EximVirtualDomains
>
> Thanks in advance for any help or advice received.
>
> Charlie
>
> _______________________________________________
> Pkg-exim4-users mailing list
> Pkg-exim4-users at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-exim4-users
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: PGP Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-exim4-users/attachments/20110131/11437bee/attachment.pgp>
More information about the Pkg-exim4-users
mailing list