Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

One Mail Domain, Multiple Backend Servers

127 views
Skip to first unread message

VM3139

unread,
Sep 23, 2012, 9:53:26 AM9/23/12
to
Hi guys,

How can I have the following set up working -

- mail.example.com is a single MX for example.com
- use...@example.com mailbox get delivered on a.mail.example.com, use...@example.com mailbox is delivered on b.mail.example.com respectively?

Please provide example if possible.

Best regards,
VM

Loki Harfagr

unread,
Sep 23, 2012, 1:00:47 PM9/23/12
to
Sun, 23 Sep 2012 06:53:26 -0700, VM3139 did cat :
please provide details, like what are "[a-z].mail.example.com"?
are they local (inside) MXs or are you wondering about virtusers
or whatever?
Do not hesitate, be terse but show it all.

VM3139

unread,
Sep 23, 2012, 2:14:56 PM9/23/12
to
On Sunday, September 23, 2012 8:00:51 PM UTC+3, Loki Harfagr wrote:
> Sun, 23 Sep 2012 06:53:26 -0700, VM3139 did cat :
>
>
>
> > Hi guys,
>
> >
>
> > How can I have the following set up working -
>
> >
>
> > - mail.example.com is a single MX for example.com
>
> > - use...@example.com mailbox get delivered on a.mail.example.com,
>
> > use...@example.com mailbox is delivered on b.mail.example.com respectively?
>
> >
>
> > Please provide example if possible.
>
>

Thanks for the prompt response.

>
> please provide details, like what are "[a-z].mail.example.com"?
>

Two remote mail servers. Perhaps 'backend' might not be the best way to describe them. Still, these are 'behind' the public facing MX. One is expensive storage & service provider, other is low cost. The idea is to have important mailboxes on the expensive provider.

> are they local (inside) MXs or are you wondering about virtusers
>

They would be remote mail servers and mail.example.com should decide where to route e-mails based on recipient address.

I need e-mail for j...@example.com to go to a.mail.example.com (the expensive sp), while f...@example.com gets delivered to b.mail.example.com (low cost).

Claus Aßmann

unread,
Sep 23, 2012, 2:48:54 PM9/23/12
to
VM3139 wrote:
>
> - use...@example.com mailbox get delivered on a.mail.example.com, use...@example.com mailbox is delivered on
> b.mail.example.com respectively?

man aliases

or: cf/README: virtusertable

Claus Aßmann

unread,
Sep 23, 2012, 10:40:25 PM9/23/12
to
Hmm, are you running sendmail 8 or postfix? Or is it someone
else who asked the same question on the postfix mailing list?

Well, you were pointed to "virtual" users in both cases...

VM3139

unread,
Sep 24, 2012, 8:49:41 AM9/24/12
to
Thanks.

I've got sendmail to do basic e-mail forwarding for my domain using virtusertable and mailertable, however this implies rewriting of the RCPT command, while I need to preserve this value.

I.e. e-mail for use...@example.com goes to a.mail.example.com server but RCPT address is now use...@a.mail.example.com. How can I have the RCPT part rewritten to use...@example.com upon connecting to a.mail.example.com?



Andrzej Adam Filip

unread,
Sep 24, 2012, 12:47:22 PM9/24/12
to
VM3139 <vema...@gmail.com> wrote:
> On Sunday, September 23, 2012 10:10:02 PM UTC+3, Claus Aßmann -no-copies-please wrote:
>> VM3139 wrote:
>> > - use...@example.com mailbox get delivered on a.mail.example.com,
>> > use...@example.com mailbox is delivered on b.mail.example.com
>> > respectively?
>>
>> man aliases
>>
>> or: cf/README: virtusertable
>
> I've got sendmail to do basic e-mail forwarding for my domain using
> virtusertable and mailertable, however this implies rewriting of the
> RCPT command, while I need to preserve this value.
>
> I.e. e-mail for use...@example.com goes to a.mail.example.com server
> but RCPT address is now use...@a.mail.example.com. How can I have the
> RCPT part rewritten to use...@example.com upon connecting to
> a.mail.example.com?

=> You can use FEATURE(`ldap_routing')

It can be used with standard maps (hash,dbm,...) instead of LDAP queries.
http://groups.google.com/groups?q=sendmail+ldap_routing+null+hash

VM3139

unread,
Sep 24, 2012, 4:20:09 PM9/24/12
to
Thanks, sounds perfect :)

VM3139

unread,
Sep 24, 2012, 6:18:15 PM9/24/12
to
On Monday, September 24, 2012 7:47:26 PM UTC+3, Andrzej Adam Filip wrote:
Thanks again. Works like a charm. Had to patch ldap_routing.m4 a little bit. Can't believe there is not more generic sendmail way of handling this task.

Andrzej Adam Filip

unread,
Sep 24, 2012, 7:02:43 PM9/24/12
to
VM3139 <vema...@gmail.com> wrote:
> On Monday, September 24, 2012 7:47:26 PM UTC+3, Andrzej Adam Filip wrote:
>> VM3139 <vema...@gmail.com> wrote:
>> > [...]
>> > I've got sendmail to do basic e-mail forwarding for my domain using
>> > virtusertable and mailertable, however this implies rewriting of the
>> > RCPT command, while I need to preserve this value.
>> >
>> > I.e. e-mail for use...@example.com goes to a.mail.example.com server
>> > but RCPT address is now use...@a.mail.example.com. How can I have the
>> > RCPT part rewritten to use...@example.com upon connecting to
>> > a.mail.example.com?
>>
>> => You can use FEATURE(`ldap_routing')
>>
>> It can be used with standard maps (hash,dbm,...) instead of LDAP queries.
>> http://groups.google.com/groups?q=sendmail+ldap_routing+null+hash
>
> Thanks again. Works like a charm.
> Had to patch ldap_routing.m4 a little bit.

Why? [Sometimes people patch to get something available without patching]

> Can't believe there is not more generic sendmail way of handling this
> task.

* ldap_routing works good enough.
* ldap_routing works with hash/dbm/... and null maps instead of LDAP look-ups
=> I can not see _urgent_ need to improve it
(even if the name may be misleading for "no LDAP" deployments)

BTW Even domains with single incoming MX may prefer to keep migration to
LDAP as on open possibility for multiple incoming MXes in separate locations
[ and multiple SMTP AUTH servers using LDAP based SMTP AUTH]

VM3139

unread,
Sep 25, 2012, 4:31:56 AM9/25/12
to
On Tuesday, September 25, 2012 2:03:16 AM UTC+3, Andrzej Adam Filip wrote:
> VM3139 <vema...@gmail.com> wrote:
>
> > On Monday, September 24, 2012 7:47:26 PM UTC+3, Andrzej Adam Filip wrote:
>
> >> VM3139 <vema...@gmail.com> wrote:
>
> >> > [...]
>
> >> > I've got sendmail to do basic e-mail forwarding for my domain using
>
> >> > virtusertable and mailertable, however this implies rewriting of the
>
> >> > RCPT command, while I need to preserve this value.
>
> >> >
>
> >> > I.e. e-mail for use...@example.com goes to a.mail.example.com server
>
> >> > but RCPT address is now use...@a.mail.example.com. How can I have the
>
> >> > RCPT part rewritten to use...@example.com upon connecting to
>
> >> > a.mail.example.com?
>
> >>
>
> >> => You can use FEATURE(`ldap_routing')
>
> >>
>
> >> It can be used with standard maps (hash,dbm,...) instead of LDAP queries.
>
> >> http://groups.google.com/groups?q=sendmail+ldap_routing+null+hash
>
> >
>
> > Thanks again. Works like a charm.
>
> > Had to patch ldap_routing.m4 a little bit.
>
>
>
> Why? [Sometimes people patch to get something available without patching]
>
>

http://devroot.org/2012/04/30/fix-ldap_route-null-in-sendmail-8-14-4/

>
> > Can't believe there is not more generic sendmail way of handling this
>
> > task.
>
>
>
> * ldap_routing works good enough.
>
> * ldap_routing works with hash/dbm/... and null maps instead of LDAP look-ups
>
> => I can not see _urgent_ need to improve it
>
> (even if the name may be misleading for "no LDAP" deployments)
>

Are there any known flaws with using ldap null maps? Performance and interoperability wise (i.e. w/ any milters).

Andrzej Adam Filip

unread,
Sep 25, 2012, 11:44:36 AM9/25/12
to
VM3139 <vema...@gmail.com> wrote:
> On Tuesday, September 25, 2012 2:03:16 AM UTC+3, Andrzej Adam Filip wrote:
>> VM3139 <vema...@gmail.com> wrote:
>> > On Monday, September 24, 2012 7:47:26 PM UTC+3, Andrzej Adam Filip wrote:
>> >> VM3139 <vema...@gmail.com> wrote:
>> >> > [...]
>> >> > I've got sendmail to do basic e-mail forwarding for my domain using
>> >> > virtusertable and mailertable, however this implies rewriting of the
>> >> > RCPT command, while I need to preserve this value.
>> >> >
>> >> > I.e. e-mail for use...@example.com goes to a.mail.example.com server
>> >> > but RCPT address is now use...@a.mail.example.com. How can I have the
>> >> > RCPT part rewritten to use...@example.com upon connecting to
>> >> > a.mail.example.com?
>> >>
>> >> => You can use FEATURE(`ldap_routing')
>> >>
>> >> It can be used with standard maps (hash,dbm,...) instead of LDAP queries.
>> >> http://groups.google.com/groups?q=sendmail+ldap_routing+null+hash
>> >
>> > Thanks again. Works like a charm.
>> > Had to patch ldap_routing.m4 a little bit.
>>
>> Why? [Sometimes people patch to get something available without patching]
>
> http://devroot.org/2012/04/30/fix-ldap_route-null-in-sendmail-8-14-4/
> [... ]

BTW there may be an ugly fix without patching:
sequence map containing single null map
Anyway it seems to be fixed in sendmail-8.14.5

http://www.sendmail.com/sm/open_source/download/8.14.5/?show_rs=1#RS
8.14.5/8.14.5 2011/05/17
[...]
CONFIG: FEATURE(`ldap_routing') in 8.14.4 tried to add a missing
-T<h;TMPF> that is required, but failed for some cases
that did not use LDAP. This change has been undone
until a better solution can be implemented. Problem
found by Andy Fiddaman.
0 new messages