You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2010/11/16 11:56:16 UTC
svn commit: r1035583 -
/james/server/trunk/fetchmail/src/main/java/org/apache/james/fetchmail/MessageProcessor.java
Author: norman
Date: Tue Nov 16 10:56:15 2010
New Revision: 1035583
URL: http://svn.apache.org/viewvc?rev=1035583&view=rev
Log:
Correctly handle the check for local recipients. See JAMES-1135. Thx to Toël Hartmann for the fix
Modified:
james/server/trunk/fetchmail/src/main/java/org/apache/james/fetchmail/MessageProcessor.java
Modified: james/server/trunk/fetchmail/src/main/java/org/apache/james/fetchmail/MessageProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/fetchmail/src/main/java/org/apache/james/fetchmail/MessageProcessor.java?rev=1035583&r1=1035582&r2=1035583&view=diff
==============================================================================
--- james/server/trunk/fetchmail/src/main/java/org/apache/james/fetchmail/MessageProcessor.java (original)
+++ james/server/trunk/fetchmail/src/main/java/org/apache/james/fetchmail/MessageProcessor.java Tue Nov 16 10:56:15 2010
@@ -893,7 +893,16 @@ public class MessageProcessor extends Pr
*/
protected boolean isLocalRecipient(MailAddress recipient)
{
- return isLocalServer(recipient) && getLocalUsers().contains(recipient.toString());
+ if (isLocalServer(recipient)) {
+ // check if we use virtualhosting or not and use the right part of the recipient in respect of this
+ // See JAMES-1135
+ if (getServer().supportVirtualHosting()) {
+ return getLocalUsers().contains(recipient.toString());
+ } else {
+ return getLocalUsers().contains(recipient.getLocalPart());
+ }
+ }
+ return false;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org