You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Jerry M <te...@malcolms.com> on 2007/01/15 05:07:47 UTC
WhiteListManager Does Not Work when JDBCVirtualUserTable is Used
I found a problem with the WhiteListManager mailet. Actually it looks
like a more fundamental problem with the MailetContext class. If I map
my 'external' email address to custom mailbox name using the virtual
user table, the method getMailetContext().isLocalUser( senderUser )
returns FALSE. I understand why it would think this address is not a
local user. The sender address is my external address, and is not in
the user table since the user table contains post-mapped mailbox names.
I have to do the virtual mapping due to having multiple domains to
prevent mailbox naming conflicts. (So fixing it by removing the virtual
user mapping is not an option).
The simple fix for WhiteListManager is to simply remove the check in the
service( mail ) method. This is a redundant check anyway if the config
file is set correctly. We shouldn't be here unless it's an authorized
user. To now check again to see if the sender address is local seems
redundant, and obviously since it doesn't understand virtual users, is a
serious problem.
As I mentioned earlier, the immediate problem is the WhiteListManager
mailet. But on the other hand, if this MailetContext is used elsewhere,
and it fails on valid users simply because I'm using the virtual user
table, I think there may be a bigger problem that needs to be addressed.
I can create a patched version of the mailet that removes the check for
my own use. But I suspect others are going to hit this same problem
considering the popularity of the VirtualUserTable.
Or theoretically I could create dummy entries in the users table for all
of the external email addresses as well as for the real mapped mailbox
names. I guess that would 'fix' this problem. But is that really the
correct answer? If I have info@domainA.com, info@domainB.com,
info@domain3.com, I can create a user id 'info' that would cover all
three. And I absolutely could NOT put any mail in a mailbox by that
name, since it would be mail for all three domains. This solution seems
completely useless other than making the MailetContext happy. But I
guess it would at least make the WhiteListManager start working.
Please advise.
Jerry
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org