[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: does sendmail work with ldap groups?



Stuart Lynne <sl@fireplug.net> writes:

> In a former work environment I had a work alias that chained through four
> different mail addresses, on three machines, one of which was a mere 3000km
> away (but this was in the days of T1 cross country links). So mail to that
> address would bounce across Canada three times!

:-)

I think having all of them run off the same directory and implementing
the same routing semantics would help.  The first mail server to see
the message would do the hard work and then forward to others exactly
what needs to be forwarded.

> The ridiculous part being that *all* of the systems where using the same
> database for routing (replicated for local access). 
> 
> I was very motivated to make sure my current solution using exim would not
> require this. I use a mailschema similiar to the Laser draft and exim is
> very happy iterating and recursing through all available addresses until
> it has a final list of deliverable addresses. It then proceeds to deliver
> them locally or forwards them to whatever system they should be delivered 
> to. 

What my mail500 tries to do is exactly that, it will try to expand the
list internally as much as possible and will build N lists: one for
"normal" recipients and one more for every mail group that requires a
specific envelope sender address.  All routines receive a pointer to a
recipient list and care no further.  Sometimes that is the main
recipient list, sometimes it is some mail group recipient list.  It
cannot be reduced any further.  So the basic logic is sort of there.

Now, the problem is my mail500 has no concept of what domains are
locally hosted or, to be precise, what domains are governed by the
directory we are using (the logic is in sendmail.cf).  So when an
entry expansion ends in an RFC822 address (not a mailbox account), it
ends expansion at that point and passes the result to sendmail.  Of
the list of new recipients, sendmail will deliver locally some,
forward elsewhere a few others and those in directory domains will be
passed to mail500 again.  This should be improved by letting mail500
know more about what is its universe.  We could do away without it if
we knew for sure there was no inconvenient entry in the directory, but
I think it would be unnecessarily restrictive.

And I have the feeling that the problem is exacerbated by this part:

$* < @ $=Q > $*        $#mail500 $@ $2 $: <$1@$2>              domain handled by mail500

I am unsure, but it seems this forces sendmail to call mail500 once
per different domain.  I'll have to experiment with this, probably $@
should not be set or should be set to something fixed.  My mail500
does not need to be told about the domain separately, is perfectly
happy to extract it from the address.

Julio