Re: PATCH: disable mailbox delivery

"John Hohm" <jhohm-A2FxZZ/Jk9tWk0Htik3J/[email protected]>
Newsgroups gmane.comp.isp.ispman.devel
Message-ID <CA1E33DC3B66894AB4D157905F2B40E1014A2600@providen-exchg.provinet.com>
Quoting Jörg Delker <[email protected]>:

> Well, better late than never ;)

Yes, certainly.  Thanks for responding.

> Though, this patch looks quite good, it doesn't work unfortunately.

I must respectfully disagree, as I have been using it since its posting.

> The problem is that you are disabling the mailRoutingAddress attribute,
> while keeping the mailLocalAddress attribute.

Creating a user and choosing "None (no mailbox. Just forwardings)" for the "Create mailbox on server" also results in a mailLocalAddress being generated but no mailRoutingAddress.
 
> This causes postfix to accept the mail (due to valid maillocaladdress)
> but can't deliver it (missing mailroutingaddress) resulting in a mail
> loop (mx lookup, redeliver to mx which is the host itself) with a final
> mailbounce.

Would not the same thing happen if you created a user without a mailbox and failed to set any forwarding addresses?

The point of the patch is to handle the case where a user wants his mail forwarded, and no longer wants it to also be delivered to our system.  The resulting LDAP data is identical to a "None (no mailbox. Just forwardings)" user except that mailHost is still set, allowing mailRoutingAddress to be regenerated and the existing (but inactive) mailbox to be identified.

> A proper solution is not that easy IMHO:
> To properly disable mail for an user, the maillocaladdress has to be
> changed/deleted, which could be a problem when mail retreival is enabled
> again (attribute value may not be recoverable).

But I do not want to disable mail for the user, only mailbox delivery.

A more thorough patch might go so far as to delete the mailbox (and remove the mailHost attribute), but I was a little squeamish about deleting mailboxes, and some users want a period of time to move their mail from our mailbox to their forwarded mailbox.

-- 
John K. Hohm
ProviNET Solutions
<jhohm-A2FxZZ/Jk9tWk0Htik3J/[email protected]>



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.