Author: norman
Date: Sun Nov 29 15:12:21 2009
New Revision: 885239

URL: http://svn.apache.org/viewvc?rev=885239&view=rev
Log:
Use the full emailladdress only if virtualhosting is supported

Modified:
    
james/server/trunk/imapserver-function/src/main/java/org/apache/james/imapserver/sieve/SieveMailet.java

Modified: 
james/server/trunk/imapserver-function/src/main/java/org/apache/james/imapserver/sieve/SieveMailet.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/imapserver-function/src/main/java/org/apache/james/imapserver/sieve/SieveMailet.java?rev=885239&r1=885238&r2=885239&view=diff
==============================================================================
--- 
james/server/trunk/imapserver-function/src/main/java/org/apache/james/imapserver/sieve/SieveMailet.java
 (original)
+++ 
james/server/trunk/imapserver-function/src/main/java/org/apache/james/imapserver/sieve/SieveMailet.java
 Sun Nov 29 15:12:21 2009
@@ -66,13 +66,18 @@
     }
    
     /**
-     * Return the username to use for sieve processing for the given 
MailAddress
+     * Return the username to use for sieve processing for the given 
MailAddress. If virtualhosting
+     * is supported use the full emailaddrees as username
      * 
      * @param m
      * @return username
      */
     protected String getUsername(MailAddress m) {
-        return m.toString();
+        if (mailServer.supportVirtualHosting()) {
+            return m.toString();
+        } else {
+            return super.getUsername(m);
+        }
     }
     
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to