Jerry Malcolm created JAMES-2975:
------------------------------------
Summary: RecipientIsLocal Fails on Aliased (RRT) Email Address
Key: JAMES-2975
URL: https://issues.apache.org/jira/browse/JAMES-2975
Project: James Server
Issue Type: Bug
Components: Mailet Contributions
Affects Versions: 3.3.0
Reporter: Jerry Malcolm
I have an RRT entry:
sales (@) mycompany.com maps to
[[email protected]|mailto:[email protected]]
If mail is sent to jerry@.... RecipientIsLocal matcher correctly returns "true"
If mail is sent to sales@..... RecipientIsLocal matcher incorrectly returns
"false"
This is due to the fact that JamesMailetContext.isLocalEmail(...) only compares
to the users table and not the RRT table.
In my opinion, there needs to be (if it doesn't already exist) a utility method
called: getAccountFromEmail( MailAddress xxx ). This method should simply
return the same email address if there is no aliasing since the emailaddress is
indeed the account. But the method should determine if the email address is
actually an RRT alias for the account and do the appropriate mapping and return
the account name. Then RecipientIsLocal() matcher should have the following
change:
return mailetContext.isLocalEmail(getAccountFromEmail(recipient));
All email addresses will be normalized to account name only whether RRT or not.
Downstream tests will now successfully return true even if address is an alias.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]