Vincenzo,
Here is more detail....
I have several 'external' email addresses: [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], etc.
All of the domain.com email addresses map, using virtual user table to
one inbox named: inbox.domain.com
All of the dom2.com email addresses map to another inbox named
inbox.dom2.com
From what I can determine when I send an email out with a 'from'
address of "[EMAIL PROTECTED]", WhiteListManager looks in the user table
to see if "info" is a 'local user'. There is no "info" entry in the
user table (and there shouldn't be...). There is only inbox.domain.com
and inbox.dom2.com in the user table. So it says I'm not a local user
and returns from the mailet without doing anything.
My plan B was to simply put a dummy "info" entry in the user table to
fake it out and make the mailet not kick me out. But I got the other
error when I did that.
But the plan-B stuff was not the real problem. The real problem is that
the mailet thinks "[EMAIL PROTECTED]" is not a valid user due to my use of
VirtualUserTable. (Just for clarification... I was referring to
"[EMAIL PROTECTED]" as the 'pre-mapped' address).
Does this help explain the problem?
Jerry
Vincenzo Gianferrari Pini wrote:
Jerry M wrote:
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.
What does it means "... creating a user in the table for the
pre-mapped email address ..."?
BTW I assume you have coded <automaticInsert>true</automaticInsert> ...
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.
In fact it's redundant if you code
<mailet match="SMTPAuthSuccessful" class="WhiteListManager" .....> ...
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
Vincenzo
---------------------------------------------------------------------
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]