On Wed, Jun 09, 2004 at 10:54:59AM -0400, Ted Zlatanov wrote:
> On 8 Jun 2004, [EMAIL PROTECTED] wrote:
> 
> On Tue, Jun 08, 2004 at 03:54:11PM -0400, Ted Zlatanov wrote:
> >> I have the following system (among others) in locals:
> >> 
> >> smtp.spl.harvard.edu
> >> 
> >> According to the docs, then, mail to [EMAIL PROTECTED] should
> >> work, right?  It should go to the local USER.
> 
> > This is a known limitation of qmail-ldap. 
> 
> I could not find it in the docs.  I only saw references that
> qmail-smtpd uses "locals" or "locals.cdb" but no mention that the
> local delivery ignores "locals."  Maybe that should be noted.
> 

It does not ignore it. If a domain is not in locals it is not local. That
decision is done before the user lookup is done.

> > The main reason for this is that in an ISP environment you do not
> > want this behaviour. It is considered bad when a customer uses the
> > domainname of a other customer.
> 
> Sure, but why not have a "ldaplocals" control file for people like me
> that are not an ISP?  I can see that you may not want to use "locals"
> but "ldaplocals" will not confuse people.
> 

That won't help you because qmail-ldap searches the LDAP directroy always
with "[EMAIL PROTECTED]" keys. So what you have to do is change the search
behaviour -- without fucking up the whole system or doing some powerful
rewriting in qmail-send.c (the file that is already too big ;-)).

> > On www.lifewithqmail.org/ldap is a example how to rewrite a domain to a
> > other one with virtualhosts, the alias user and the forward utility.
> > At least I think I have seen it there.
> > Something similar could be done with a catchall account.
> 
> Sure, but just like adding 600 mailForwardingAddress entries to each
> user, it's a hack.  Why not use a "ldaplocals" file, that's what it's
> for (when it's called "locals").
> 
> The operation can be very simple - if the domain is in ldaplocals,
> replace it with `cat me` and try delivering that.
> 

That is rewriting and for that we have virtualhosts. Probably you need to
tune it a bit, I don't know. I never had to do that. Especially just do a
replace with `cat me` is not very powerful. It is easy but suddenly you
need to rewrite a new domain to something else.

> > In most cases mail addresses of the form [EMAIL PROTECTED] are
> > generated by a missconfiguration. For example qmail has a few control
> > files to fix this (defaultdomain, plusdomain, etc.). At least I never
> > found a good reason why something like this should be done.
> 
> In an ideal world, I would have control over every MUA and every
> user's mind as well.  There's plenty of bad MUAs that I have to
> handle, and users don't want to leave them.  Unfortunately, it's not
> something I can change.
> 

I know, there seems to be a unlimited pool of stupid users but I'm still
optimistic.

> So I can either do the virtual setup you suggest, or qmail-ldap can be
> patched to support "ldaplocals".
> 

Henning told me once about a idea to do rewriting in a very powerful
manner but he never came up with some code. Note: this is a hint for
Henning because he should start again writing code for qmail-ldap :-)

> If I'm the only one who needs this feature, perhaps I should add it
> to the C code and keep the patch for my personal use.  I hope someone
> else speaks up that they need it too :)  I'm not a good C coder
> anymore, so I doubt my patch will be up to your standards.
> 

I'm always willing to add and cleanup new features if they are done in a
clean way. I'm currently just very busy with to many projects. Note: this
is a hint to myself because I should unslack and start finishing the next
release... 

-- 
:wq Claudio

Reply via email to