Well, Plan-B did not work. I tried simply creating a user in the table
for the pre-mapped email address. Outbound mail now goes in the
deadletter table with the error: Invalid mail address in database: 0,
for user.... So I'm lost.
How do I get the WhiteListManager to work?
Jerry
Jerry M wrote:
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 [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED], 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]