[jira] Created: (JSPF-30) Support The Trusted Forwarder SPF Global Whitelist

2006-09-24 Thread Norman Maurer (JIRA)
Support The Trusted Forwarder SPF Global Whitelist
--

 Key: JSPF-30
 URL: http://issues.apache.org/jira/browse/JSPF-30
 Project: jSPF
  Issue Type: New Feature
Reporter: Norman Maurer
 Assigned To: Norman Maurer
 Fix For: 0.9b4


The Trusted Forwarder SPF Global Whitelist ( trusted-forwarder.org) should be 
supported (optinal)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (JSPF-24) Handle of non configured SPF domains with default SPF record

2006-09-24 Thread Norman Maurer (JIRA)
 [ http://issues.apache.org/jira/browse/JSPF-24?page=all ]

Norman Maurer updated JSPF-24:
--

Fix Version/s: 0.9b4

> Handle of non configured SPF domains with default SPF record
> 
>
> Key: JSPF-24
> URL: http://issues.apache.org/jira/browse/JSPF-24
> Project: jSPF
>  Issue Type: Improvement
> Environment: jSPF 0.9b2
>Reporter: Guillermo Grandes
> Assigned To: Norman Maurer
> Fix For: 0.9b4
>
> Attachments: SPF.java.diff, SPF.java.Zen-Version.diff
>
>
> Use the best guess SPF record when one cannot be found in the DNS. Note that 
> this can only return pass or neutral.
> example best_guess: "v=spf1 a/24 mx/24 ptr ?all"
> This improvement is not standard, but Google uses it (cannot be bad)  ;-)
> The idea is that the use of this improvement and the policy that is used by 
> default can initialize, to even force the use of a local_policy (just in case 
> the request were arriving to us from an internal network 10.0.0.0/8 for 
> example)
> See also: 
> http://search.cpan.org/dist/Mail-SPF-Query/lib/Mail/SPF/Query.pm#NON-STANDARD_FEATURES

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JSPF-24) Handle of non configured SPF domains with default SPF record

2006-09-24 Thread Norman Maurer (JIRA)
[ 
http://issues.apache.org/jira/browse/JSPF-24?page=comments#action_12437464 ] 

Norman Maurer commented on JSPF-24:
---

Sorry for all the critism but that patch does not act as it should. It will use 
the given spf record every time. From the perldoc of spfquery this should only 
done if "NO" spf record was found for the given arguments. Anyway I will commit 
a change to SVN soon to support best guess.. 
Thx for all the patches and inspiration.

> Handle of non configured SPF domains with default SPF record
> 
>
> Key: JSPF-24
> URL: http://issues.apache.org/jira/browse/JSPF-24
> Project: jSPF
>  Issue Type: Improvement
> Environment: jSPF 0.9b2
>Reporter: Guillermo Grandes
> Assigned To: Norman Maurer
> Attachments: SPF.java.diff, SPF.java.Zen-Version.diff
>
>
> Use the best guess SPF record when one cannot be found in the DNS. Note that 
> this can only return pass or neutral.
> example best_guess: "v=spf1 a/24 mx/24 ptr ?all"
> This improvement is not standard, but Google uses it (cannot be bad)  ;-)
> The idea is that the use of this improvement and the policy that is used by 
> default can initialize, to even force the use of a local_policy (just in case 
> the request were arriving to us from an internal network 10.0.0.0/8 for 
> example)
> See also: 
> http://search.cpan.org/dist/Mail-SPF-Query/lib/Mail/SPF/Query.pm#NON-STANDARD_FEATURES

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r449578 - /james/jspf/trunk/src/main/java/org/apache/james/jspf/SPFQuery.java

2006-09-24 Thread norman
Author: norman
Date: Sun Sep 24 22:43:27 2006
New Revision: 449578

URL: http://svn.apache.org/viewvc?view=rev&rev=449578
Log:
Allow the user to set a default explanation on cmdline usage. See JSPF-28

Modified:
james/jspf/trunk/src/main/java/org/apache/james/jspf/SPFQuery.java

Modified: james/jspf/trunk/src/main/java/org/apache/james/jspf/SPFQuery.java
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/SPFQuery.java?view=diff&rev=449578&r1=449577&r2=449578
==
--- james/jspf/trunk/src/main/java/org/apache/james/jspf/SPFQuery.java 
(original)
+++ james/jspf/trunk/src/main/java/org/apache/james/jspf/SPFQuery.java Sun Sep 
24 22:43:27 2006
@@ -45,8 +45,20 @@
 
 private final static int NONE_RCODE = 6;
 
-private final static int UNKNOWN_RCODE = 255;
-
+private final static int UNKNOWN_RCODE = 255;

+

+private final static String CMD_IP = "-ip";

+

+private final static String CMD_SENDER = "-sender";

+

+private final static String CMD_HELO = "-helo";

+

+private final static String CMD_DEBUG = "-debug";

+

+private final static String CMD_VERBOSE = "-verbose";
+

+private final static String CMD_DEFAULT_EXP =  "-default-explanation";

+
 private static Logger logger = Logger.getRootLogger();
 
 /**
@@ -57,7 +69,8 @@
 
 String ip = null;
 String sender = null;
-String helo = null;
+String helo = null;

+String defaultExplanation = null;
 
 SimpleLayout layout = new SimpleLayout();
 ConsoleAppender consoleAppender = new ConsoleAppender(layout);
@@ -71,17 +84,21 @@
 } else {
 for (int i = 0; i < args.length; i++) {
 String[] arguments = args[i].split("=");
-
-if (arguments[0].equals("-ip")) {
+

+if (arguments == null || arguments.length != 2) usage();

+
+if (arguments[0].equals(CMD_IP)) {
 ip = arguments[1];
-} else if (arguments[0].equals("-sender")) {
+} else if (arguments[0].equals(CMD_SENDER)) {
 sender = arguments[1];
-} else if (arguments[0].equals("-helo")) {
+} else if (arguments[0].equals(CMD_HELO)) {
 helo = arguments[1];
-} else if (arguments[0].equals("-debug")) {
+} else if (arguments[0].equals(CMD_DEBUG)) {
 logger.setLevel(Level.DEBUG);
-} else if (arguments[0].equals("-verbose")) {
-logger.setLevel(Level.TRACE);
+} else if (arguments[0].equals(CMD_VERBOSE)) {
+logger.setLevel(Level.TRACE);

+} else if (arguments[0].equals(CMD_DEFAULT_EXP)) {

+defaultExplanation = arguments[1];
 } else {
 usage();
 }
@@ -89,12 +106,20 @@
 }
 
 // check if all needed values was set
-if (ip != null && sender != null && helo != null) {
-SPF spf = new SPF(new Log4JLogger(logger));
+if (ip != null && sender != null && helo != null) {

+

+SPF spf = new SPF(new Log4JLogger(logger));

+

+// Check if we should set a costum default explanation

+if (defaultExplanation != null) {

+spf.setDefaultExplanation(defaultExplanation);

+}

+
 SPFResult result = spf.checkSPF(ip, sender, helo);
 System.out.println(result.getResult());
 System.out.println(result.getHeader());
-System.exit(getReturnCode(result.getResult()));
+System.exit(getReturnCode(result.getResult()));

+
 } else {
 usage();
 }
@@ -105,8 +130,8 @@
  * Print out the usage
  */
 private static void usage() {
-System.out
-.println("Usage: java -jar jspf-x.jar -ip=192.168.100.1 [EMAIL 
PROTECTED] -helo=foo.bar [-debug] [-verbose]");
+System.out.println("Usage: java -jar jspf-x.jar " + CMD_IP + 
"=192.168.100.1 " + CMD_SENDER + "[EMAIL PROTECTED] "

++ CMD_HELO + "=foo.bar [" + CMD_DEBUG + "] [" + 
CMD_VERBOSE+ "]");
 System.exit(UNKNOWN_RCODE);
 }
 
@@ -117,7 +142,8 @@
  * @param result The result 
  * @return returnCode
  */
-public static int getReturnCode(String result) {
+public static int getReturnCode(String result) {

+
 if (result.equals(SPF1Utils.PASS_CONV)) {
 return PASS_RCODE;
 } else if (result.equals(SPF1Utils.FAIL_CONV)) {
@@ -132,7 +158,8 @@
 return PERM_ERROR_RCODE;
 } else if (result.eq

[jira] Updated: (JAMES-601) Add Class detail in logs of James.Mailet (patch)

2006-09-24 Thread Guillermo Grandes (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-601?page=all ]

Guillermo Grandes updated JAMES-601:


Attachment: JAMES-601-Plus.diff

It seems that is already working everything.

Attach diff corrected (JAMES-601-Plus.diff) with a little change, moved 
loadClass to 1st instruction within loop try/catch, to save resources in case 
of ClassNotFoundException.

> Add Class detail in logs of James.Mailet (patch)
> 
>
> Key: JAMES-601
> URL: http://issues.apache.org/jira/browse/JAMES-601
> Project: James
>  Issue Type: Improvement
>  Components: Mailet API, James Core, Matchers/Mailets (bundled), 
> Remote Delivery, Mailet Contributions
>Affects Versions: 2.3.0rc1
> Environment: james 2.3.0rc1
>Reporter: Guillermo Grandes
> Attachments: JAMES-601-Plus.diff, JAMES-601.diff, 
> James-final-20060923.diff, James.java.diff, James.java.diff, 
> JamesChildsLogger.java.diff
>
>
> In order to improve the organization and operation of logs I have thought 
> about this piece of code, without change Mailet API and that does not force 
> to make great changes in the Mailets.
> This code affects :
> http://svn.apache.org/viewvc/james/server/branches/v2.3/src/java/org/apache/james/James.java
> ==
> /**
> * Return the logger for the Mailet API
> *
> * @return the logger for the Mailet API
> */
> private Logger getMailetLogger() { // it replaces the original method
> if (mailetLogger == null) {
> mailetLogger = getLogger().getChildLogger("Mailet");
> }
> String p = findParentCaller();
> return ((p == null) ? mailetLogger : mailetLogger.getChildLogger(p));
> }
> /**
> * Return the Caller Mailet
> *
> * @return the ClassName for the Caller Mailet / Matcher
> */
> private String findParentCaller() {// it is a new method
> try {
> throw new Exception();
> }
> catch (Throwable t) {
> StackTraceElement[] ste = t.getStackTrace();
> int i;
> boolean found = false;
> for (i = 0; i < ste.length; i++) {
> String cn = ste[i].getClassName();
> if (cn.startsWith("sun") || cn.startsWith("java") || 
> cn.startsWith("$")) continue; // speed-up
> if ((cn.equals("org.apache.mailet.GenericMailet")) ||
> (cn.equals("org.apache.mailet.GenericMatcher"))) {
> continue;
> }
> try {
> Class c = Class.forName(cn);
> if 
> ((org.apache.mailet.GenericMailet.class.isAssignableFrom(c)) ||
> 
> (org.apache.mailet.GenericMatcher.class.isAssignableFrom(c))) {
> found = true; break;
> }
> }
> catch(Exception ign) {}
> }
> if (!found) return null;
> try {
> return ste[i].getClassName().replace("$", ".");
> }
> catch (Exception ign) {}
> return null;
> }
> }
> ==
> The result of this patch is:
> Original Logs...
> INFO  [James.Mailet] ToRepository: Storing mail Mail1-0 in 
> file://var/mail/inbound/
> INFO  [James.Mailet] RemoteDelivery: Attempting delivery of 
> Mail1-0 to host 192.168.1.1 at 192.168.1.1 for addresses [EMAIL 
> PROTECTED]
> INFO  [James.Mailet] BayesianAnalysisFeeder: maxSize: 20
> Improved Logs...
> INFO  [James.Mailet.org.apache.james.transport.mailets.ToRepository] 
> ToRepository: Storing mail Mail1-0 in file://var/mail/inbound/
> INFO  [James.Mailet.org.apache.james.transport.mailets.RemoteDelivery] 
> RemoteDelivery: Attempting delivery of Mail1-0 to host 
> 192.168.1.1 at 192.168.1.1 for addresses [EMAIL PROTECTED]
> INFO  
> [James.Mailet.org.apache.james.transport.mailets.BayesianAnalysisFeeder] 
> BayesianAnalysisFeeder: maxSize: 20
> With this you can organize your logs by Mailet / Category in environment.xml 
> :-)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-601) Add Class detail in logs of James.Mailet (patch)

2006-09-24 Thread Guillermo Grandes (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-601?page=comments#action_12437420 ] 

Guillermo Grandes commented on JAMES-601:
-

"Oops", logger is null

2006-09-25 03:20:06,659 ERROR [spoolmanager.root] Caused by nested exception: 
java.lang.NullPointerException
at 
org.apache.james.transport.Loader$MailetContextWrapper.log(Loader.java:194)
at org.apache.mailet.GenericMatcher.log(GenericMatcher.java:146)
at 
org.apache.james.transport.matchers.AbstractNetworkMatcher.init(AbstractNetworkMatcher.java:90)
at org.apache.mailet.GenericMatcher.init(GenericMatcher.java:116)
at 
org.apache.james.transport.JamesMatcherLoader.getMatcher(JamesMatcherLoader.java:62)

You forgot... the logger in constructor... only the most important thing in the 
world (joke) ;-)

public MailetContextWrapper(MailetContext mailetContext, Logger logger) 
{
this.mailetContext = mailetContext;
+this.logger = logger;
}

With this, all is right :-)

> Add Class detail in logs of James.Mailet (patch)
> 
>
> Key: JAMES-601
> URL: http://issues.apache.org/jira/browse/JAMES-601
> Project: James
>  Issue Type: Improvement
>  Components: Mailet API, James Core, Matchers/Mailets (bundled), 
> Remote Delivery, Mailet Contributions
>Affects Versions: 2.3.0rc1
> Environment: james 2.3.0rc1
>Reporter: Guillermo Grandes
> Attachments: JAMES-601.diff, James-final-20060923.diff, 
> James.java.diff, James.java.diff, JamesChildsLogger.java.diff
>
>
> In order to improve the organization and operation of logs I have thought 
> about this piece of code, without change Mailet API and that does not force 
> to make great changes in the Mailets.
> This code affects :
> http://svn.apache.org/viewvc/james/server/branches/v2.3/src/java/org/apache/james/James.java
> ==
> /**
> * Return the logger for the Mailet API
> *
> * @return the logger for the Mailet API
> */
> private Logger getMailetLogger() { // it replaces the original method
> if (mailetLogger == null) {
> mailetLogger = getLogger().getChildLogger("Mailet");
> }
> String p = findParentCaller();
> return ((p == null) ? mailetLogger : mailetLogger.getChildLogger(p));
> }
> /**
> * Return the Caller Mailet
> *
> * @return the ClassName for the Caller Mailet / Matcher
> */
> private String findParentCaller() {// it is a new method
> try {
> throw new Exception();
> }
> catch (Throwable t) {
> StackTraceElement[] ste = t.getStackTrace();
> int i;
> boolean found = false;
> for (i = 0; i < ste.length; i++) {
> String cn = ste[i].getClassName();
> if (cn.startsWith("sun") || cn.startsWith("java") || 
> cn.startsWith("$")) continue; // speed-up
> if ((cn.equals("org.apache.mailet.GenericMailet")) ||
> (cn.equals("org.apache.mailet.GenericMatcher"))) {
> continue;
> }
> try {
> Class c = Class.forName(cn);
> if 
> ((org.apache.mailet.GenericMailet.class.isAssignableFrom(c)) ||
> 
> (org.apache.mailet.GenericMatcher.class.isAssignableFrom(c))) {
> found = true; break;
> }
> }
> catch(Exception ign) {}
> }
> if (!found) return null;
> try {
> return ste[i].getClassName().replace("$", ".");
> }
> catch (Exception ign) {}
> return null;
> }
> }
> ==
> The result of this patch is:
> Original Logs...
> INFO  [James.Mailet] ToRepository: Storing mail Mail1-0 in 
> file://var/mail/inbound/
> INFO  [James.Mailet] RemoteDelivery: Attempting delivery of 
> Mail1-0 to host 192.168.1.1 at 192.168.1.1 for addresses [EMAIL 
> PROTECTED]
> INFO  [James.Mailet] BayesianAnalysisFeeder: maxSize: 20
> Improved Logs...
> INFO  [James.Mailet.org.apache.james.transport.mailets.ToRepository] 
> ToRepository: Storing mail Mail1-0 in file://var/mail/inbound/
> INFO  [James.Mailet.org.apache.james.transport.mailets.RemoteDelivery] 
> RemoteDelivery: Attempting delivery of Mail1-0 to host 
> 192.168.1.1 at 192.168.1.1 for addresses [EMAIL PROTECTED]
> INFO  
> [James.Mailet.org.apache.james.transport.mailets.BayesianAnalysisFeeder] 
> BayesianAnalysisFeeder: maxSize: 20
> With this you can organize your logs by Mailet / Category in environment.xml 
> :-)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www

[jira] Updated: (JSPF-24) Handle of non configured SPF domains with default SPF record

2006-09-24 Thread Guillermo Grandes (JIRA)
 [ http://issues.apache.org/jira/browse/JSPF-24?page=all ]

Guillermo Grandes updated JSPF-24:
--

Attachment: SPF.java.Zen-Version.diff

Hi Norman, this was the Zen version (SPF.java.Zen-Version.diff) ;-)

> Handle of non configured SPF domains with default SPF record
> 
>
> Key: JSPF-24
> URL: http://issues.apache.org/jira/browse/JSPF-24
> Project: jSPF
>  Issue Type: Improvement
> Environment: jSPF 0.9b2
>Reporter: Guillermo Grandes
> Assigned To: Norman Maurer
> Attachments: SPF.java.diff, SPF.java.Zen-Version.diff
>
>
> Use the best guess SPF record when one cannot be found in the DNS. Note that 
> this can only return pass or neutral.
> example best_guess: "v=spf1 a/24 mx/24 ptr ?all"
> This improvement is not standard, but Google uses it (cannot be bad)  ;-)
> The idea is that the use of this improvement and the policy that is used by 
> default can initialize, to even force the use of a local_policy (just in case 
> the request were arriving to us from an internal network 10.0.0.0/8 for 
> example)
> See also: 
> http://search.cpan.org/dist/Mail-SPF-Query/lib/Mail/SPF/Query.pm#NON-STANDARD_FEATURES

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JSPF-24) Handle of non configured SPF domains with default SPF record

2006-09-24 Thread Guillermo Grandes (JIRA)
[ 
http://issues.apache.org/jira/browse/JSPF-24?page=comments#action_12437270 ] 

Guillermo Grandes commented on JSPF-24:
---

(theater) ohh that sadness is mine. They don't like my patches... That I am 
going to do?, I me will become shepherd! :-P
well, the idea is what counts :-)
in fact only are 2 important changes, the rest is straw. (excuse me, it is what 
it has been devised in a while of time that I have been able to dedicate to him)
you change what you want, is only one contribution, a sand grain... it was for 
to give them push to the problem :-)

"synchronized", I forgot it, I take note of that :-)

I thank for the commentaries :-)

> Handle of non configured SPF domains with default SPF record
> 
>
> Key: JSPF-24
> URL: http://issues.apache.org/jira/browse/JSPF-24
> Project: jSPF
>  Issue Type: Improvement
> Environment: jSPF 0.9b2
>Reporter: Guillermo Grandes
> Assigned To: Norman Maurer
> Attachments: SPF.java.diff
>
>
> Use the best guess SPF record when one cannot be found in the DNS. Note that 
> this can only return pass or neutral.
> example best_guess: "v=spf1 a/24 mx/24 ptr ?all"
> This improvement is not standard, but Google uses it (cannot be bad)  ;-)
> The idea is that the use of this improvement and the policy that is used by 
> default can initialize, to even force the use of a local_policy (just in case 
> the request were arriving to us from an internal network 10.0.0.0/8 for 
> example)
> See also: 
> http://search.cpan.org/dist/Mail-SPF-Query/lib/Mail/SPF/Query.pm#NON-STANDARD_FEATURES

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Assigned: (JAMES-519) Implement a JDBC based JavaMail Store

2006-09-24 Thread Stefano Bagnara (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-519?page=all ]

Stefano Bagnara reassigned JAMES-519:
-

Assignee: (was: Stefano Bagnara)

I remove the assignment to me of this issue: Joachim is working on a Torque 
based implementation of a MessageRepository that maybe will be able to provide 
even a javamail store wrapper. I have already 21 assigned issues and I'm not 
working on this.

> Implement a JDBC based JavaMail Store
> -
>
> Key: JAMES-519
> URL: http://issues.apache.org/jira/browse/JAMES-519
> Project: James
>  Issue Type: Task
>Reporter: Stefano Bagnara
>
> We need an ASL licensed JavaMail Store. Better if it uses JDBC.
> Maybe we should create a subproject for this, too.
> This is to keep track of the effort.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (MIME4J-2) Update mime4j website to reflect the existence of new JIRA space instead of old sourceforge tracker.

2006-09-24 Thread Stefano Bagnara (JIRA)
 [ http://issues.apache.org/jira/browse/MIME4J-2?page=all ]

Stefano Bagnara resolved MIME4J-2.
--

Resolution: Fixed

Updated the pom and changed slightly the links in homepage to the old downloads 
on sourceforge

> Update mime4j website to reflect the existence of new JIRA space instead of 
> old sourceforge tracker.
> 
>
> Key: MIME4J-2
> URL: http://issues.apache.org/jira/browse/MIME4J-2
> Project: Mime4j
>  Issue Type: Task
>Reporter: Stefano Bagnara
> Assigned To: Stefano Bagnara
> Fix For: 0.3
>
>
> We now have JIRA, let's link to it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r449512 - in /james/mime4j/trunk: pom.xml src/site/xdoc/index.xml

2006-09-24 Thread bago
Author: bago
Date: Sun Sep 24 15:26:53 2006
New Revision: 449512

URL: http://svn.apache.org/viewvc?view=rev&rev=449512
Log:
Updated mime4j website to reflect the existence of new JIRA space instead of 
old sourceforge tracker (MIME4J-2)

Modified:
james/mime4j/trunk/pom.xml
james/mime4j/trunk/src/site/xdoc/index.xml

Modified: james/mime4j/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/james/mime4j/trunk/pom.xml?view=diff&rev=449512&r1=449511&r2=449512
==
--- james/mime4j/trunk/pom.xml (original)
+++ james/mime4j/trunk/pom.xml Sun Sep 24 15:26:53 2006
@@ -31,7 +31,7 @@
   Java stream based MIME message parser
   http://james.apache.org/mime4j/index.html
   
-http://sourceforge.net/tracker/?group_id=108895&atid=654176
+http://issues.apache.org/jira/browse/MIME4J
   
   2004
   

Modified: james/mime4j/trunk/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/james/mime4j/trunk/src/site/xdoc/index.xml?view=diff&rev=449512&r1=449511&r2=449512
==
--- james/mime4j/trunk/src/site/xdoc/index.xml (original)
+++ james/mime4j/trunk/src/site/xdoc/index.xml Sun Sep 24 15:26:53 2006
@@ -29,8 +29,10 @@
 
 NOTE: mime4j is now a subproject of 
 http://james.apache.org/";>Apache James. Please use
-the James mailing list for mime4j related questions. Downloads
-will still be available from the sourceforge project page.
+the James mailing list for mime4j related questions. We have 
not

+yet made a release under The Apache Software Fondation 
umbrella.

+In the mean time downloads of old releases will still be 
available

+from the sourceforge project page.
 
  mime4j provides a parser, 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (JSPF-29) Simplify DNSService service interface

2006-09-24 Thread Stefano Bagnara (JIRA)
Simplify DNSService service interface
-

 Key: JSPF-29
 URL: http://issues.apache.org/jira/browse/JSPF-29
 Project: jSPF
  Issue Type: Task
  Components: Core
Affects Versions: 0.9b3
Reporter: Stefano Bagnara
 Assigned To: Stefano Bagnara
 Fix For: 0.9b4


DNSService contains too much logic and we are not able to unit-test this part 
because of the networking needed.
So we should try to simplify it as much as possible.

1) Remove NoneException and simply return null when no result is found.
2) Refactor it to include a generci getRecords(host, recordType)
3) Decide wether to introduce a TimeoutException or simply reuse the 
TempErrorException we use now.
4) Move code for specific lookups 
getARecords/getMXRecords/getPTRRecords/getRecords and so on into the caller 
terms (or other code). We currenlty have very few callers for that services so 
it should not be a problem.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r449486 - /james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java

2006-09-24 Thread bago
Author: bago
Date: Sun Sep 24 14:10:54 2006
New Revision: 449486

URL: http://svn.apache.org/viewvc?view=rev&rev=449486
Log:
Refactored DNSServiceXBillImpl to remove duplicate code (introduced a generic 
getRecords including common code)

Modified:

james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java

Modified: 
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java?view=diff&rev=449486&r1=449485&r2=449486
==
--- 
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java 
(original)
+++ 
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java 
Sun Sep 24 14:10:54 2006
@@ -125,39 +125,14 @@
 private ArrayList getTXTRecords(String hostname)
 throws NoneException, TempErrorException {
 ArrayList txtR = new ArrayList();
-Record[] records;
-try {
-
-log.debug("Start TXT-Record lookup for : " + hostname);
-
-Lookup.getDefaultResolver().setTimeout(timeOut);
-Lookup query = new Lookup(hostname, Type.TXT);
-records = query.run();
-int queryResult = query.getResult();
-if ((queryResult != Lookup.TRY_AGAIN)) {
-if (records != null) {
-
-log.debug("Found " + records.length + " TXT-Records");
+Record[] records = getRecords(hostname, Type.TXT, "TXT", null);
+for (int i = 0; i < records.length; i++) {
+TXTRecord txt = (TXTRecord) records[i];
 
-for (int i = 0; i < records.length; i++) {
-TXTRecord txt = (TXTRecord) records[i];
+log.debug("Add txt " + txt.rdataToString()
++ " to list");
 
-log.debug("Add txt " + txt.rdataToString()
-+ " to list");
-
-txtR.add(txt.rdataToString());
-}
-} else {
-throw new NoneException("No TXTRecord found for host: "
-+ hostname);
-}
-} else {
-throw new TempErrorException("DNS Server returns RCODE: "
-+ queryResult);
-}
-} catch (TextParseException e) {
-// I think thats the best we could do
-throw new NoneException("No TXTRecord found for host: " + 
hostname);
+txtR.add(txt.rdataToString());
 }
 return txtR;
 }
@@ -177,40 +152,14 @@
 listTxtData.add(ipTest);
 } else {
 
-Record[] records;
-try {
-
-log.debug("Start A-Record lookup for : " + strServer);
+Record[] records = getRecords(strServer, Type.A, "A", null);
+for (int i = 0; i < records.length; i++) {
+ARecord a = (ARecord) records[i];
+
+IPAddr ip = IPAddr.getAddress(a.getAddress().getHostAddress());
 
-Lookup.getDefaultResolver().setTimeout(timeOut);
-Lookup query = new Lookup(strServer, Type.A);
-records = query.run();
-int queryResult = query.getResult();
-
-if ((queryResult != Lookup.TRY_AGAIN)) {
-if (records != null) {
-
-log.debug("Found " + records.length + " A-Records");
-
-for (int i = 0; i < records.length; i++) {
-ARecord a = (ARecord) records[i];
-
-IPAddr ip = 
IPAddr.getAddress(a.getAddress().getHostAddress());
-
-log.debug("Add ipAddress " + ip + " to list");
-listTxtData.add(ip);
-}
-} else {
-throw new NoneException("No A record found for host: "
-+ strServer);
-}
-} else {
-throw new TempErrorException("DNS Server returns RCODE: "
-+ queryResult);
-}
-} catch (TextParseException e) {
-// i think this is the best we could do
-throw new NoneException("No A Record found for host: " + 
strServer);
+log.debug("Add ipAddress " + ip + " to list");
+listTxtData.add(ip);
 }
 }
 return listTxtData;
@@ -230,43 +179,16 @@
 // Address is already an IP address, so add it to list
 listTxtData.add(ipTest);
 } else {
+Record[] records = getRecords(strServer, Type., "", null);
 
-Record[] records;
-try 

svn commit: r449475 - /james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java

2006-09-24 Thread bago
Author: bago
Date: Sun Sep 24 13:45:42 2006
New Revision: 449475

URL: http://svn.apache.org/viewvc?view=rev&rev=449475
Log:
Small refactoring in DNSServiceXBillImpl to compact the getMxRecords code

Modified:

james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java

Modified: 
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java?view=diff&rev=449475&r1=449474&r2=449475
==
--- 
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java 
(original)
+++ 
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java 
Sun Sep 24 13:45:42 2006
@@ -273,36 +273,6 @@
 }
 
 /**
- * Convert list of DNS names to masked IPAddr
- * 
- * @param addressList
- *ArrayList of DNS names which should be converted to masked
- *IPAddresses
- * @param maskLength
- *the networkmask
- * @return ArrayList of the conversion
- * @throws PermErrorException
- * if an PermError should be returned
- * @throws TempErrorException if the lookup result was "TRY_AGAIN"
- */
-private ArrayList getAList(ArrayList addressList)
-throws PermErrorException, TempErrorException {
-
-ArrayList listAddresses = new ArrayList();
-String aValue;
-
-for (int i = 0; i < addressList.size(); i++) {
-aValue = addressList.get(i).toString();
-try {
-listAddresses.addAll(getARecords(aValue));
-} catch (NoneException e) {
-// ignore
-}
-}
-return listAddresses;
-}
-
-/**
  * @see 
org.apache.james.jspf.core.DNSService#getTxtCatType(java.lang.String)
  */
 public String getTxtCatType(String strServer) throws NoneException,
@@ -380,33 +350,14 @@
 public List getMXRecords(String domainName)
 throws PermErrorException, NoneException, TempErrorException {
 
-ArrayList mxAddresses = getAList(getMXNames(domainName));
-return mxAddresses;
-
-}
-
-/**
- * Get all MX Records for a domain
- * 
- * @param host
- *The hostname we want to retrieve the MXRecords for
- * @return MX-Records for the given hostname
- * @throws NoneException
- * if no MX-Records was found
- * @throws TempErrorException
- * if the lookup result was "TRY_AGAIN"
- * @throws PermErrorException 
- */
-private ArrayList getMXNames(String host) throws NoneException,
-TempErrorException, PermErrorException {
 ArrayList mxR = new ArrayList();
 Record[] records;
 try {
 
-log.debug("Start MX-Record lookup for : " + host);
+log.debug("Start MX-Record lookup for : " + domainName);
 
 Lookup.getDefaultResolver().setTimeout(timeOut);
-Lookup query = new Lookup(host, Type.MX);
+Lookup query = new Lookup(domainName, Type.MX);
 
 records = query.run();
 int queryResult = query.getResult();
@@ -423,11 +374,14 @@
 log.debug("Add MX-Record " + mx.getTarget()
 + " to list");
 
-mxR.add(mx.getTarget());
-
+try {
+mxR.addAll(getARecords(mx.getTarget().toString()));
+} catch (NoneException e) {
+// ignore
+}
 }
 } else {
-throw new NoneException("No MX Record found for host: " + 
host);
+throw new NoneException("No MX Record found for host: " + 
domainName);
 }
 } else {
 throw new TempErrorException("DNS Server returns RCODE: "
@@ -435,8 +389,9 @@
 }
 } catch (TextParseException e) {
 // i think this is the best we could do
-throw new NoneException("No MX Record found for host: " + host);
+throw new NoneException("No MX Record found for host: " + 
domainName);
 }
+
 return mxR;
 }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r449474 - in /james/server/trunk/src/java/org/apache/james: transport/mailets/ util/mailet/

2006-09-24 Thread bago
Author: bago
Date: Sun Sep 24 13:24:07 2006
New Revision: 449474

URL: http://svn.apache.org/viewvc?view=rev&rev=449474
Log:
Added few missing license headers

Modified:
james/server/trunk/src/java/org/apache/james/transport/mailets/OnlyText.java

james/server/trunk/src/java/org/apache/james/transport/mailets/ReplaceContent.java

james/server/trunk/src/java/org/apache/james/transport/mailets/UnwrapText.java
james/server/trunk/src/java/org/apache/james/transport/mailets/WrapText.java

james/server/trunk/src/java/org/apache/james/util/mailet/FlowedMessageUtils.java
james/server/trunk/src/java/org/apache/james/util/mailet/StringUtils.java

Modified: 
james/server/trunk/src/java/org/apache/james/transport/mailets/OnlyText.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/transport/mailets/OnlyText.java?view=diff&rev=449474&r1=449473&r2=449474
==
--- 
james/server/trunk/src/java/org/apache/james/transport/mailets/OnlyText.java 
(original)
+++ 
james/server/trunk/src/java/org/apache/james/transport/mailets/OnlyText.java 
Sun Sep 24 13:24:07 2006
@@ -1,3 +1,22 @@
+/
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information*
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the*
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *  *
+ *   http://www.apache.org/licenses/LICENSE-2.0 *
+ *  *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY   *
+ * KIND, either express or implied.  See the License for the*
+ * specific language governing permissions and limitations  *
+ * under the License.   *
+ /
+
 package org.apache.james.transport.mailets;
 
 import org.apache.mailet.GenericMailet;

Modified: 
james/server/trunk/src/java/org/apache/james/transport/mailets/ReplaceContent.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/transport/mailets/ReplaceContent.java?view=diff&rev=449474&r1=449473&r2=449474
==
--- 
james/server/trunk/src/java/org/apache/james/transport/mailets/ReplaceContent.java
 (original)
+++ 
james/server/trunk/src/java/org/apache/james/transport/mailets/ReplaceContent.java
 Sun Sep 24 13:24:07 2006
@@ -1,3 +1,22 @@
+/
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information*
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the*
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *  *
+ *   http://www.apache.org/licenses/LICENSE-2.0 *
+ *  *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY   *
+ * KIND, either express or implied.  See the License for the*
+ * specific language governing permissions and limitations  *
+ * under the License.   *
+ /
+
 package org.apache.james.transport.mailets;
 
 import org.apache.james.util.mailet.StringUtils;

Modified: 
james/server/trunk/src/java/org/apache/james/transport/mailets/UnwrapText.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/transport/mailets/UnwrapText.java?view=diff&rev=449474&r1=449473&r2=449474
==
--- 
james/server/trunk/src/java/org/apache/james/transport/mailets/UnwrapText.java 
(original)
+++ 
james/server/trunk/src/java/org/apache/james/transport/mailets/UnwrapText.java 
Sun Sep 24 13:24:07 2006
@@ -1,3 +1,22 @@
+/
+ * Licen

Re: allowMissingBracket

2006-09-24 Thread Vincenzo Gianferrari Pini

+1

Vincenzo

Stefano Bagnara wrote:

I like your patch, and I think we should include it as an optional 
(disabled by default) feature.


Please open a JIRA issue and submit it as a diff against current 
trunk, so we can review changes and decide wether to include it or not.


About the name I would prefer "allowMissingBrackets" (not the trailing 
"s").


Stefano

Laurent Rouvet wrote:


Hi,

James doesn't allow missing bracket into the "mailto" and "rcpt to", 
which is conforme to the RFC.
However, most of the smtp server allow that. When some simple client 
does not follow the RFC. It is the case of the Oracle UTL_MAIL 
(pl-sql pkg) which is quite buggy.


Anyway, I got the problem, so I added an allowMissingBracket 
parameter to MailCmdHandler and RcptCmdHandler.


I'll be happy to send you a patch if you would like include it into 
the James distribution. In that case do you prefere that I add the 
parameter (like I did) or do you prefere that I create a new class 
like NotStrictMailCmdHandler...?


Anyway, I send were the code that I did.
Let me know if you would like anything more in order to make it part 
of your distribution.


Regards,

Laurent Rouvet





-
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]



svn commit: r449469 [3/3] - in /james/jspf/trunk/src: main/java/org/apache/james/jspf/exceptions/ test/resources/org/apache/james/jspf/

2006-09-24 Thread bago
Modified: james/jspf/trunk/src/test/resources/org/apache/james/jspf/tests.yml
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/test/resources/org/apache/james/jspf/tests.yml?view=diff&rev=449469&r1=449468&r2=449469
==
--- james/jspf/trunk/src/test/resources/org/apache/james/jspf/tests.yml 
(original)
+++ james/jspf/trunk/src/test/resources/org/apache/james/jspf/tests.yml Sun Sep 
24 12:50:31 2006
@@ -1,182 +1,182 @@


-description: Converted tests

-tests:

-  test-#1:

-helo: spf1-test.foo.bar

-host: 192.0.2.200

-mailfrom: spf1-test.foo.bar

-result: pass

-explanation: 

-  test-#2:

-helo: spf3-test.foo.bar

-host: 192.0.2.200

-mailfrom: spf3-test.foo.bar

-result: fail

-explanation: 
http://www.openspf.org/why.html?sender=spf3-test.foo.bar&ip=192.0.2.200

-  test-#3:

-helo: spf4-test.foo.bar

-host: 192.0.2.200

-mailfrom: spf4-test.foo.bar

-result: pass

-explanation: 

-  test-#4:

-helo: spf5-test.foo.bar

-host: 192.0.2.200

-mailfrom: spf5-test.foo.bar

-result: permerror

-explanation: 

-  test-#5:

-helo: spf7-test.foo.bar

-host: 192.0.2.200

-mailfrom: spf7-test.foo.bar

-result: neutral

-explanation: 

-  test-#6:

-helo: spf9-test.foo.bar

-host: 192.0.2.200

-mailfrom: spf9-test.foo.bar

-result: pass

-explanation: 

-  test-#7:

-helo: spf9-test.foo.bar

-host: 192.0.2.200

-mailfrom: spf11-test.foo.bar

-result: pass

-explanation: 

-  test-#8:

-helo: spf13-test.foo.bar

-host: 192.0.2.200

-mailfrom: spf13-test.foo.bar

-result: fail

-explanation: original.explanation

-  test-#9:

-helo: spf15-test.foo.bar

-host: 192.0.2.200

-mailfrom: spf15-test.foo.bar

-result: fail

-explanation: redirect.explanation

-  test-#10:

-helo: spf18-test.foo.bar

-host: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210

-mailfrom: spf18-test.foo.bar

-result: pass

-explanation: 

-  test-#11:

-helo: spf19-test.foo.bar

-host: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210

-mailfrom: spf19-test.foo.bar

-result: fail

-explanation: 
http://www.openspf.org/why.html?sender=spf19-test.foo.bar&ip=F.E.D.C.B.A.9.8.7.6.5.4.3.2.1.0.F.E.D.C.B.A.9.8.7.6.5.4.3.2.1.0

-  test-#12:

-helo: spf20-test.foo.bar

-host: 2001:1234:5678:9ABC::::

-mailfrom: spf20-test.foo.bar

-result: pass

-explanation: 

-  test-#13:

-helo: spf21-test.foo.bar

-host: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210

-mailfrom: spf21-test.foo.bar

-result: pass

-explanation: 

-  test-#14:

-helo: spf21-test.foo.bar

-host: 192.168.0.1

-mailfrom: spf22-test.foo.bar

-result: temperror

-explanation: 

-  test-#15:

-helo: spf23-test.foo.bar

-host: 10.0.0.1

-mailfrom: spf23-test.foo.bar

-result: fail

-explanation: 
http://www.openspf.org/why.html?sender=spf23-test.foo.bar&ip=10.0.0.1

-zonedata:

-  spf1-test.foo.bar:

-- TXT:   v=spf1 redirect=spf2-test.foo.bar +all

-  spf2-test.foo.bar: 

-- TXT:   v=spf1 -all

-  spf3-test.foo.bar:

-- TXT:   v=spf1 redirect=spf2-test.foo.bar

-  spf4-test.foo.bar:

-- TXT:  'v=spf1 include:spf2-test.foo.bar +all'

-  spf5-test.foo.bar:

-- TXT:  'v=spf1 include:spf6-test.foo.bar -all'

-  spf7-test.foo.bar: 

-- TXT:  'v=spf1 include:spf8-test.foo.bar'

-  spf8-test.foo.bar:

-- TXT:   v=spf1 -all

-  spf9-test.foo.bar:

-- TXT:  'v=spf1 include:spf10-test.foo.bar +all'

-  spf10-test.foo.bar:

-- TXT:   v=spf1 ?all

-  spf11-test.foo.bar:

-- TXT:  'v=spf1 include:spf12-test.foo.bar +all'

-  spf12-test.foo.bar:

-- TXT:   v=spf1 ~all

-  spf13-test.foo.bar:

-- TXT:  'v=spf1 include:spf14-test.foo.bar -all exp=exp-spf17-test.foo.bar'

-  spf14-test.foo.bar:

-- TXT:   v=spf1 -all exp=exp-spf14-test.foo.bar

-  exp-spf14-test.foo.bar:

-- TXT:   include.explanation

-  spf15-test.foo.bar:

-- TXT:   v=spf1 redirect=spf16-test.foo.bar exp=exp-spf17-test.foo.bar

-  spf16-test.foo.bar:

-- TXT:   v=spf1 -all exp=exp-spf16-test.foo.bar

-  exp-spf16-test.foo.bar:

-- TXT:  redirect.explanation

-  exp-spf17-test.foo.bar:

-- TXT:  original.explanation

-  spf18-test.foo.bar:

-- TXT:  'v=spf1 +ip6:FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 -all'

-  spf19-test.foo.bar:

-- TXT:  'v=spf1 +ip6:::1 -all'

-  spf20-test.foo.bar:

-- TXT:  'v=spf1 +ip6:2001:1234:5678:9ABC::/64 -all '

-  spf21-test.foo.bar:

-- TXT:  'v=spf1 +a:myipv6a.record -all'

-  spf23-test.foo.bar:

-- TXT:   v=spf1 ptr -all

-  spf22-test.foo.bar:

-- TIMEOUT

-  myipv6a.record:

-- :  'FEDC:BA98:7654:3210:FEDC:BA98:7654:3210'



-description: JSPF coverage

-tests:

-  test-macrodata:

-helo: spf24-test.foo.bar

-host: 10.0.0.24

svn commit: r449469 [1/3] - in /james/jspf/trunk/src: main/java/org/apache/james/jspf/exceptions/ test/resources/org/apache/james/jspf/

2006-09-24 Thread bago
Author: bago
Date: Sun Sep 24 12:50:31 2006
New Revision: 449469

URL: http://svn.apache.org/viewvc?view=rev&rev=449469
Log:
Add missing svn:eol-style=native property to yaml tests and NeutralException

Modified:

james/jspf/trunk/src/main/java/org/apache/james/jspf/exceptions/NeutralException.java
   (contents, props changed)

james/jspf/trunk/src/test/resources/org/apache/james/jspf/mailzone-tests.yml   
(contents, props changed)
james/jspf/trunk/src/test/resources/org/apache/james/jspf/pyspf-tests.yml   
(props changed)
james/jspf/trunk/src/test/resources/org/apache/james/jspf/rfc4408-tests.yml 
  (props changed)
james/jspf/trunk/src/test/resources/org/apache/james/jspf/test.txt   (props 
changed)
james/jspf/trunk/src/test/resources/org/apache/james/jspf/tests.yml   
(contents, props changed)

Modified: 
james/jspf/trunk/src/main/java/org/apache/james/jspf/exceptions/NeutralException.java
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/exceptions/NeutralException.java?view=diff&rev=449469&r1=449468&r2=449469
==
--- 
james/jspf/trunk/src/main/java/org/apache/james/jspf/exceptions/NeutralException.java
 (original)
+++ 
james/jspf/trunk/src/main/java/org/apache/james/jspf/exceptions/NeutralException.java
 Sun Sep 24 12:50:31 2006
@@ -1,35 +1,35 @@
-/

- * Licensed to the Apache Software Foundation (ASF) under one   *

- * or more contributor license agreements.  See the NOTICE file *

- * distributed with this work for additional information*

- * regarding copyright ownership.  The ASF licenses this file   *

- * to you under the Apache License, Version 2.0 (the*

- * "License"); you may not use this file except in compliance   *

- * with the License.  You may obtain a copy of the License at   *

- *  *

- *   http://www.apache.org/licenses/LICENSE-2.0 *

- *  *

- * Unless required by applicable law or agreed to in writing,   *

- * software distributed under the License is distributed on an  *

- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY   *

- * KIND, either express or implied.  See the License for the*

- * specific language governing permissions and limitations  *

- * under the License.   *

- /

-

-

-package org.apache.james.jspf.exceptions;

-

-/**

- * This exception get thrown if the result should be neutral

- * 

- */

-public class NeutralException extends Exception {

-

-private static final long serialVersionUID = 1L;

-

-public NeutralException(String strErrorMessage) {

-super(strErrorMessage);

-}

-

+/
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information*
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the*
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *  *
+ *   http://www.apache.org/licenses/LICENSE-2.0 *
+ *  *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY   *
+ * KIND, either express or implied.  See the License for the*
+ * specific language governing permissions and limitations  *
+ * under the License.   *
+ /
+
+
+package org.apache.james.jspf.exceptions;
+
+/**
+ * This exception get thrown if the result should be neutral
+ * 
+ */
+public class NeutralException extends Exception {
+
+private static final long serialVersionUID = 1L;
+
+public NeutralException(String strErrorMessage) {
+super(strErrorMessage);
+}
+
 }

Propchange: 
james/jspf/trunk/src/main/java/org/apache/james/jspf/exceptions/NeutralException.java
--
svn:eol-style = native



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r449468 - in /james/jspf/trunk/src: main/java/org/apache/james/jspf/SPF1Utils.java test/java/org/apache/james/jspf/AbstractYamlTest.java test/resources/org/apache/james/jspf/mailzone-tests

2006-09-24 Thread bago
Author: bago
Date: Sun Sep 24 12:47:04 2006
New Revision: 449468

URL: http://svn.apache.org/viewvc?view=rev&rev=449468
Log:
Changed "error" to "permerror": this seems what is used as the official reply 
for a permanent error.

Modified:
james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java
james/jspf/trunk/src/test/java/org/apache/james/jspf/AbstractYamlTest.java
james/jspf/trunk/src/test/resources/org/apache/james/jspf/mailzone-tests.yml
james/jspf/trunk/src/test/resources/org/apache/james/jspf/tests.yml

Modified: james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java?view=diff&rev=449468&r1=449467&r2=449468
==
--- james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java 
(original)
+++ james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF1Utils.java Sun Sep 
24 12:47:04 2006
@@ -31,7 +31,7 @@
 
 public class SPF1Utils {
 
-public static final String PERM_ERROR_CONV = "error";
+public static final String PERM_ERROR_CONV = "permerror";
 
 public static final String NONE_CONV = "none";
 

Modified: 
james/jspf/trunk/src/test/java/org/apache/james/jspf/AbstractYamlTest.java
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/test/java/org/apache/james/jspf/AbstractYamlTest.java?view=diff&rev=449468&r1=449467&r2=449468
==
--- james/jspf/trunk/src/test/java/org/apache/james/jspf/AbstractYamlTest.java 
(original)
+++ james/jspf/trunk/src/test/java/org/apache/james/jspf/AbstractYamlTest.java 
Sun Sep 24 12:47:04 2006
@@ -138,16 +138,12 @@
 String resultSPF = res.getResult();
 
 if (currentTest.get("result") instanceof String) {
-if ("permerror".equals(currentTest.get("result"))) {
-assertEquals("Test "+next+" 
("+currentTest.get("description")+") failed. Returned: "+res.getResult()+" 
Expected: "+currentTest.get("result")+" 
[["+res.getResultChar()+"||"+res.getHeaderText()+"]]", "error", 
res.getResult());
-} else {
-assertEquals("Test "+next+" 
("+currentTest.get("description")+") failed. Returned: "+res.getResult()+" 
Expected: "+currentTest.get("result")+" 
[["+res.getResultChar()+"||"+res.getHeaderText()+"]]", 
currentTest.get("result"), res.getResult());
-}
+assertEquals("Test "+next+" ("+currentTest.get("description")+") 
failed. Returned: "+res.getResult()+" Expected: "+currentTest.get("result")+" 
[["+res.getResultChar()+"||"+res.getHeaderText()+"]]", 
currentTest.get("result"), res.getResult());
 } else {
 ArrayList results = (ArrayList) currentTest.get("result");
 boolean match = false;
 for (int i = 0; i < results.size(); i++) {
-if (results.get(i).equals(resultSPF) || 
(results.get(i).equals("permerror") && resultSPF.equals("error"))) match = true;
+if (results.get(i).equals(resultSPF)) match = true;
 System.err.println("checking "+results.get(i)+" => 
"+resultSPF);
 }
 assertTrue(match);

Modified: 
james/jspf/trunk/src/test/resources/org/apache/james/jspf/mailzone-tests.yml
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/test/resources/org/apache/james/jspf/mailzone-tests.yml?view=diff&rev=449468&r1=449467&r2=449468
==
--- 
james/jspf/trunk/src/test/resources/org/apache/james/jspf/mailzone-tests.yml 
(original)
+++ 
james/jspf/trunk/src/test/resources/org/apache/james/jspf/mailzone-tests.yml 
Sun Sep 24 12:47:04 2006
@@ -456,13 +456,13 @@
 helo: 55.spf1-test.mailzone.com

 host: 192.0.2.200

 mailfrom: 55.spf1-test.mailzone.com

-result: error

+result: permerror

   mailzone-#77:

 description: 'error in processing during lookup of domain of 
55.spf1-test.mailzone.com: Could not find a valid SPF record'

 helo: 55.spf1-test.mailzone.com

 host: 192.0.2.130

 mailfrom: 55.spf1-test.mailzone.com

-result: error

+result: permerror

   mailzone-#78:

 description: 192.0.2.200 is neither permitted nor denied by domain of 
56.spf1-test.mailzone.com

 helo: 56.spf1-test.mailzone.com

@@ -474,25 +474,25 @@
 helo: 57.spf1-test.mailzone.com

 host: 192.0.2.200

 mailfrom: 57.spf1-test.mailzone.com

-result: error

+result: permerror

   mailzone-#80:

 description: 'error in processing during lookup of domain of 
57.spf1-test.mailzone.com: Could not find a valid SPF record'

 helo: 57.spf1-test.mailzone.com

 host: 192.0.2.130

 mailfrom: 57.spf1-test.mailzone.com

-result: error

+result: permerror

   mailzone-#81:

 description: 'error in processing during lookup of domain of 
58.spf

svn commit: r449467 - /james/jspf/trunk/src/site/xdoc/index.xml

2006-09-24 Thread bago
Author: bago
Date: Sun Sep 24 12:43:59 2006
New Revision: 449467

URL: http://svn.apache.org/viewvc?view=rev&rev=449467
Log:
Updated website to show 0.9b3 release

Modified:
james/jspf/trunk/src/site/xdoc/index.xml

Modified: james/jspf/trunk/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/site/xdoc/index.xml?view=diff&rev=449467&r1=449466&r2=449467
==
--- james/jspf/trunk/src/site/xdoc/index.xml (original)
+++ james/jspf/trunk/src/site/xdoc/index.xml Sun Sep 24 12:43:59 2006
@@ -45,10 +45,11 @@
 
 
   
-Latest and Stable: jSPF v0.9b2
+Latest and Stable: jSPF v0.9b3
 
-jSPF v0.9b2 is the current release.
+jSPF v0.9b3 is the current release.
 Both http://james.apache.org/download.cgi";>binary and source 
distributions are available.
+  This release passes all YAML tests published by openspf.org (still 
under development). So it should be fully RFC4408 compliant.
   
 Get your hands on the latest versions..
 We put significant milestones, and potential release candidates 
in the http://people.apache.org/dist/james/";>download area.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (JSPF-28) Allow to set the default explanation

2006-09-24 Thread Norman Maurer (JIRA)
 [ http://issues.apache.org/jira/browse/JSPF-28?page=all ]

Norman Maurer resolved JSPF-28.
---

Fix Version/s: 0.9b4
   Resolution: Fixed

> Allow to set the default explanation
> 
>
> Key: JSPF-28
> URL: http://issues.apache.org/jira/browse/JSPF-28
> Project: jSPF
>  Issue Type: New Feature
>Reporter: Norman Maurer
> Assigned To: Norman Maurer
> Fix For: 0.9b4
>
>
> It whould be nice to allow to set a costum default explanation which will be 
> used if noe explanation is specified in the SPF-Record.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Assigned: (JSPF-24) Handle of non configured SPF domains with default SPF record

2006-09-24 Thread Norman Maurer (JIRA)
 [ http://issues.apache.org/jira/browse/JSPF-24?page=all ]

Norman Maurer reassigned JSPF-24:
-

Assignee: Norman Maurer

> Handle of non configured SPF domains with default SPF record
> 
>
> Key: JSPF-24
> URL: http://issues.apache.org/jira/browse/JSPF-24
> Project: jSPF
>  Issue Type: Improvement
> Environment: jSPF 0.9b2
>Reporter: Guillermo Grandes
> Assigned To: Norman Maurer
> Attachments: SPF.java.diff
>
>
> Use the best guess SPF record when one cannot be found in the DNS. Note that 
> this can only return pass or neutral.
> example best_guess: "v=spf1 a/24 mx/24 ptr ?all"
> This improvement is not standard, but Google uses it (cannot be bad)  ;-)
> The idea is that the use of this improvement and the policy that is used by 
> default can initialize, to even force the use of a local_policy (just in case 
> the request were arriving to us from an internal network 10.0.0.0/8 for 
> example)
> See also: 
> http://search.cpan.org/dist/Mail-SPF-Query/lib/Mail/SPF/Query.pm#NON-STANDARD_FEATURES

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JSPF-24) Handle of non configured SPF domains with default SPF record

2006-09-24 Thread Norman Maurer (JIRA)
[ 
http://issues.apache.org/jira/browse/JSPF-24?page=comments#action_12437241 ] 

Norman Maurer commented on JSPF-24:
---

I don't like your patch but i like the idea :-P. IMHO we can do the same with 
less changes. And the setter must be synchronized.

> Handle of non configured SPF domains with default SPF record
> 
>
> Key: JSPF-24
> URL: http://issues.apache.org/jira/browse/JSPF-24
> Project: jSPF
>  Issue Type: Improvement
> Environment: jSPF 0.9b2
>Reporter: Guillermo Grandes
> Assigned To: Norman Maurer
> Attachments: SPF.java.diff
>
>
> Use the best guess SPF record when one cannot be found in the DNS. Note that 
> this can only return pass or neutral.
> example best_guess: "v=spf1 a/24 mx/24 ptr ?all"
> This improvement is not standard, but Google uses it (cannot be bad)  ;-)
> The idea is that the use of this improvement and the policy that is used by 
> default can initialize, to even force the use of a local_policy (just in case 
> the request were arriving to us from an internal network 10.0.0.0/8 for 
> example)
> See also: 
> http://search.cpan.org/dist/Mail-SPF-Query/lib/Mail/SPF/Query.pm#NON-STANDARD_FEATURES

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r449458 - /james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java

2006-09-24 Thread norman
Author: norman
Date: Sun Sep 24 11:58:15 2006
New Revision: 449458

URL: http://svn.apache.org/viewvc?view=rev&rev=449458
Log:
Fix a bug i indruduce. Now all junit tests pass again

Modified:
james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java

Modified: james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java?view=diff&rev=449458&r1=449457&r2=449458
==
--- james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java (original)
+++ james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java Sun Sep 24 
11:58:15 2006
@@ -260,8 +260,8 @@
 log.error("Invalid defaultExplanation: " + 
defaultExplanation);
 }
 }
-explanation = spfData.getExplanation();
 }
+explanation = spfData.getExplanation();
 }
 
 return new SPFInternalResult(result, explanation);



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-601) Add Class detail in logs of James.Mailet (patch)

2006-09-24 Thread Guillermo Grandes (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-601?page=comments#action_12437238 ] 

Guillermo Grandes commented on JAMES-601:
-

2) throw/catch, if worries to you is the speed, I have tested "the workarround" 
;-) with heavy-load and it has not lose speed. 

Well, is another option, I will prove your proposal :-)


> Add Class detail in logs of James.Mailet (patch)
> 
>
> Key: JAMES-601
> URL: http://issues.apache.org/jira/browse/JAMES-601
> Project: James
>  Issue Type: Improvement
>  Components: Mailet API, James Core, Matchers/Mailets (bundled), 
> Remote Delivery, Mailet Contributions
>Affects Versions: 2.3.0rc1
> Environment: james 2.3.0rc1
>Reporter: Guillermo Grandes
> Attachments: JAMES-601.diff, James-final-20060923.diff, 
> James.java.diff, James.java.diff, JamesChildsLogger.java.diff
>
>
> In order to improve the organization and operation of logs I have thought 
> about this piece of code, without change Mailet API and that does not force 
> to make great changes in the Mailets.
> This code affects :
> http://svn.apache.org/viewvc/james/server/branches/v2.3/src/java/org/apache/james/James.java
> ==
> /**
> * Return the logger for the Mailet API
> *
> * @return the logger for the Mailet API
> */
> private Logger getMailetLogger() { // it replaces the original method
> if (mailetLogger == null) {
> mailetLogger = getLogger().getChildLogger("Mailet");
> }
> String p = findParentCaller();
> return ((p == null) ? mailetLogger : mailetLogger.getChildLogger(p));
> }
> /**
> * Return the Caller Mailet
> *
> * @return the ClassName for the Caller Mailet / Matcher
> */
> private String findParentCaller() {// it is a new method
> try {
> throw new Exception();
> }
> catch (Throwable t) {
> StackTraceElement[] ste = t.getStackTrace();
> int i;
> boolean found = false;
> for (i = 0; i < ste.length; i++) {
> String cn = ste[i].getClassName();
> if (cn.startsWith("sun") || cn.startsWith("java") || 
> cn.startsWith("$")) continue; // speed-up
> if ((cn.equals("org.apache.mailet.GenericMailet")) ||
> (cn.equals("org.apache.mailet.GenericMatcher"))) {
> continue;
> }
> try {
> Class c = Class.forName(cn);
> if 
> ((org.apache.mailet.GenericMailet.class.isAssignableFrom(c)) ||
> 
> (org.apache.mailet.GenericMatcher.class.isAssignableFrom(c))) {
> found = true; break;
> }
> }
> catch(Exception ign) {}
> }
> if (!found) return null;
> try {
> return ste[i].getClassName().replace("$", ".");
> }
> catch (Exception ign) {}
> return null;
> }
> }
> ==
> The result of this patch is:
> Original Logs...
> INFO  [James.Mailet] ToRepository: Storing mail Mail1-0 in 
> file://var/mail/inbound/
> INFO  [James.Mailet] RemoteDelivery: Attempting delivery of 
> Mail1-0 to host 192.168.1.1 at 192.168.1.1 for addresses [EMAIL 
> PROTECTED]
> INFO  [James.Mailet] BayesianAnalysisFeeder: maxSize: 20
> Improved Logs...
> INFO  [James.Mailet.org.apache.james.transport.mailets.ToRepository] 
> ToRepository: Storing mail Mail1-0 in file://var/mail/inbound/
> INFO  [James.Mailet.org.apache.james.transport.mailets.RemoteDelivery] 
> RemoteDelivery: Attempting delivery of Mail1-0 to host 
> 192.168.1.1 at 192.168.1.1 for addresses [EMAIL PROTECTED]
> INFO  
> [James.Mailet.org.apache.james.transport.mailets.BayesianAnalysisFeeder] 
> BayesianAnalysisFeeder: maxSize: 20
> With this you can organize your logs by Mailet / Category in environment.xml 
> :-)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r449441 - /james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java

2006-09-24 Thread norman
Author: norman
Date: Sun Sep 24 10:34:52 2006
New Revision: 449441

URL: http://svn.apache.org/viewvc?view=rev&rev=449441
Log:
Allow the user to set a default explanation. See JSPF-28

Modified:
james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java

Modified: james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java?view=diff&rev=449441&r1=449440&r2=449441
==
--- james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java (original)
+++ james/jspf/trunk/src/main/java/org/apache/james/jspf/SPF.java Sun Sep 24 
10:34:52 2006
@@ -48,6 +48,8 @@
 private SPF1Parser parser;
 
 private Logger log;
+
+private String defaultExplanation = null;
 
 /**
  * Uses default Log4JLogger and DNSJava based dns resolver
@@ -242,12 +244,24 @@
 
 if (result.equals(SPF1Constants.FAIL)) {  
 if (spfData.getExplanation()==null || 
spfData.getExplanation().equals("")) {
-try {
-spfData.setExplanation(new MacroExpand(spfData, log)
-.expandExplanation(SPF1Utils.DEFAULT_EXPLANATION));
-} catch (PermErrorException e) {}
+if(defaultExplanation == null) {
+try {
+spfData.setExplanation(new MacroExpand(spfData, log)
+
.expandExplanation(SPF1Utils.DEFAULT_EXPLANATION));
+} catch (PermErrorException e) {
+// Should never happen !
+log.debug("Invalid defaulfExplanation: " + 
SPF1Utils.DEFAULT_EXPLANATION);
+}
+} else {
+try {
+spfData.setExplanation(new MacroExpand(spfData, log)
+.expandExplanation(defaultExplanation));
+} catch (PermErrorException e) {
+log.error("Invalid defaultExplanation: " + 
defaultExplanation);
+}
+}
+explanation = spfData.getExplanation();
 }
-explanation = spfData.getExplanation();
 }
 
 return new SPFInternalResult(result, explanation);
@@ -262,5 +276,14 @@
 public synchronized void setTimeOut(int timeOut) {
 log.debug("TimeOut was set to: " + timeOut);
 dnsProbe.setTimeOut(timeOut);
+}
+
+/**
+ * Set the default explanation which will be used if no explanation is 
found in the SPF Record
+ *  
+ * @param defaultExplanation The explanation to use if no explanation is 
found in the SPF Record
+ */
+public synchronized void setDefaultExplanation(String defaultExplanation) {
+this.defaultExplanation = defaultExplanation;  
 }
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: allowMissingBracket

2006-09-24 Thread Norman Maurer

+1
Norman

Stefano Bagnara schrieb:
I like your patch, and I think we should include it as an optional 
(disabled by default) feature.


Please open a JIRA issue and submit it as a diff against current 
trunk, so we can review changes and decide wether to include it or not.


About the name I would prefer "allowMissingBrackets" (not the trailing 
"s").


Stefano

Laurent Rouvet wrote:

Hi,

James doesn't allow missing bracket into the "mailto" and "rcpt to", 
which is conforme to the RFC.
However, most of the smtp server allow that. When some simple client 
does not follow the RFC. It is the case of the Oracle UTL_MAIL 
(pl-sql pkg) which is quite buggy.


Anyway, I got the problem, so I added an allowMissingBracket 
parameter to MailCmdHandler and RcptCmdHandler.


I'll be happy to send you a patch if you would like include it into 
the James distribution. In that case do you prefere that I add the 
parameter (like I did) or do you prefere that I create a new class 
like NotStrictMailCmdHandler...?


Anyway, I send were the code that I did.
Let me know if you would like anything more in order to make it part 
of your distribution.


Regards,

Laurent Rouvet




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

!EXCUBATOR:1,45169d6853078158981406!




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (JAMES-461) Javamail Store based MailRepository support (was: Maildir support)

2006-09-24 Thread Norman Maurer (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-461?page=all ]

Norman Maurer resolved JAMES-461.
-

Resolution: Fixed
  Assignee: Norman Maurer  (was: Stefano Bagnara)

was applied to trunk

> Javamail Store based MailRepository support (was: Maildir support)
> --
>
> Key: JAMES-461
> URL: http://issues.apache.org/jira/browse/JAMES-461
> Project: James
>  Issue Type: New Feature
>  Components: MailStore & MailRepository
>Reporter: Norman Maurer
> Assigned To: Norman Maurer
> Fix For: Trunk
>
> Attachments: diff_to-javamaildir-0.7-pre1-2.diff, 
> javamailstore-mailrepository-3.zip, javamailstore-mailrepository-4.zip, 
> javamailstore-mailrepository-5.jar, JavamailStoreMailRepository.java, 
> JavamailStoreMailRepository2.zip, MaildirMailRepository.java, 
> MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
>
> Add support for Javamail Stores as MailRepositories

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-596) Reorganize SMIME crypto support code to share it with future new PGP support code

2006-09-24 Thread Robert Burrell Donkin (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-596?page=comments#action_12437231 ] 

Robert Burrell Donkin commented on JAMES-596:
-

OpenPGP/MIME and inline PGP are very different approaches to the problem. An 
OpenPGP/MIME message (usually) consists of a 2 part MIME document: conceptually 
the message and a detached signature. An inline PGP message is a single part 
containing a (probably) clearsigned message.

There are some good reasons not to attempt to use the same codebase for 
OpenPGP/MIME and classic PGP inline:

1 OpenPGP/MIME fits well into the design structure in JAMES created for SMIME. 
Classic inline PGP is too different and would benefit from a different design.
2 Good support for older PGP versions requires full parsing of every part of 
every message part. The presence of an OpenPGP/MIME signature can be deduce 
from the content type. A pure OpenPGP/MIME matcher would offer performance 
advantages.
3 OpenPGP/MIME can be implemeted cleanly. Supporting classic PGP is messy.  

Most reasonably up to date open source email clients support OpenPGP/MIME (for 
example, evolution 2+, thunderbird). OpenPGP/MIME is a good standard which can 
be easily and robustly implemented. So, amongst those clients that support it, 
support is good.  Classic PGP support is often much patchier: there is a lack 
of standardisation and there are major interoperability issues. 

Full support for classic PGP is going to be difficult and time consuming. What 
would be more worthwhile is support for basic OpenPGP clear signed documents 
embedded in messages. But that would need separate code. 

> Reorganize SMIME crypto support code to share it with future new PGP support 
> code
> -
>
> Key: JAMES-596
> URL: http://issues.apache.org/jira/browse/JAMES-596
> Project: James
>  Issue Type: New Feature
>  Components: Matchers/Mailets (bundled)
>Reporter: Vincenzo Gianferrari Pini
> Assigned To: Vincenzo Gianferrari Pini
>Priority: Minor
> Fix For: Trunk
>
>
> The current mailet code that does cryptographic activity is specialized for 
> SMIME. In order to support PGP, as requested by some people (Robert Burrel 
> Donkin), it would be nice to have it rearranged in order to share code as 
> much as possible.
> First of all let me recall the current code.
> There are two similar but not identically built "strains", one written by me, 
> and the other by Stefano. But from our point of view they are equivalent.
> My strain is the SMIMESign mailet that extends SMIMEAbstractSign; the split 
> between the two classes is just to allow for some possible massaging of the 
> message before the signature (the "explanation text" in this case).
> Stefano's strain is composed of the SMIMECheckSignature and SMIMEDecrypt 
> mailet, plus the IsSMIMEEncrypted, IsSMIMESigned and IsX509CertificateSubject 
> matchers.
> SMIMEAbstractSign (and SMIMEDecrypt) uses *for all the SMIME related work* 
> the org.apache.james.security.KeyHolder helper class; similarly 
> SMIMECheckSignature uses the org.apache.james.security.KeyStoreHolder helper 
> class.
> The approach I'm thinking about is the following:
> 1) Create an *interface* named KeyHolder with all the needed (and not SMIME 
> dependent) methods.
> 2) Rename the current KeyHolder class to SMIMEKeyHolder, and have it 
> implement the KeyHolder interface doing the SMIME implementation.
> 3) Create a new PGPKeyHolder implementing KeyHolder interface doing the PGP 
> work. My assumption is that *there is a total equivalence* between the SMIME 
> and PGP required/desired functionalities, captured by the KeyHolder interface.
> 4) Have SMIMEAbstractSign instantiate either SMIMEKeyHolder or PGPKeyHolder 
> as the KeyHolder object that will be used, based on the value of a new 
>  attribute, that would be either  
> org.apache.james.security.SMIMEKeyHolder or  
> org.apache.james.security.PGPKeyHolder  .
> 5) Rename SMIMESign to Sign, that will become the concrete sign malet driven 
> by the  attribute.
> 6) Create two new and very simple SMIMESign and PGPSign mailets, whose only 
> job would be to force the  attribute to the right one.
> An equivalent job could and should be done for Stefano's mailets.
> The PGP equivalents of Stefano's matchers should be written from scratch.
> I have already done part of the work. If nobody has anything to say against 
> this approach, I will start committing to trunk in the next few days.  Robert 
> after that will write the PGP specific code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---

[jira] Updated: (JAMES-601) Add Class detail in logs of James.Mailet (patch)

2006-09-24 Thread Stefano Bagnara (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-601?page=all ]

Stefano Bagnara updated JAMES-601:
--

Attachment: JAMES-601.diff

Example on creating a child logger for each mailet.. UNTESTED!

> Add Class detail in logs of James.Mailet (patch)
> 
>
> Key: JAMES-601
> URL: http://issues.apache.org/jira/browse/JAMES-601
> Project: James
>  Issue Type: Improvement
>  Components: Mailet API, James Core, Matchers/Mailets (bundled), 
> Remote Delivery, Mailet Contributions
>Affects Versions: 2.3.0rc1
> Environment: james 2.3.0rc1
>Reporter: Guillermo Grandes
> Attachments: JAMES-601.diff, James-final-20060923.diff, 
> James.java.diff, James.java.diff, JamesChildsLogger.java.diff
>
>
> In order to improve the organization and operation of logs I have thought 
> about this piece of code, without change Mailet API and that does not force 
> to make great changes in the Mailets.
> This code affects :
> http://svn.apache.org/viewvc/james/server/branches/v2.3/src/java/org/apache/james/James.java
> ==
> /**
> * Return the logger for the Mailet API
> *
> * @return the logger for the Mailet API
> */
> private Logger getMailetLogger() { // it replaces the original method
> if (mailetLogger == null) {
> mailetLogger = getLogger().getChildLogger("Mailet");
> }
> String p = findParentCaller();
> return ((p == null) ? mailetLogger : mailetLogger.getChildLogger(p));
> }
> /**
> * Return the Caller Mailet
> *
> * @return the ClassName for the Caller Mailet / Matcher
> */
> private String findParentCaller() {// it is a new method
> try {
> throw new Exception();
> }
> catch (Throwable t) {
> StackTraceElement[] ste = t.getStackTrace();
> int i;
> boolean found = false;
> for (i = 0; i < ste.length; i++) {
> String cn = ste[i].getClassName();
> if (cn.startsWith("sun") || cn.startsWith("java") || 
> cn.startsWith("$")) continue; // speed-up
> if ((cn.equals("org.apache.mailet.GenericMailet")) ||
> (cn.equals("org.apache.mailet.GenericMatcher"))) {
> continue;
> }
> try {
> Class c = Class.forName(cn);
> if 
> ((org.apache.mailet.GenericMailet.class.isAssignableFrom(c)) ||
> 
> (org.apache.mailet.GenericMatcher.class.isAssignableFrom(c))) {
> found = true; break;
> }
> }
> catch(Exception ign) {}
> }
> if (!found) return null;
> try {
> return ste[i].getClassName().replace("$", ".");
> }
> catch (Exception ign) {}
> return null;
> }
> }
> ==
> The result of this patch is:
> Original Logs...
> INFO  [James.Mailet] ToRepository: Storing mail Mail1-0 in 
> file://var/mail/inbound/
> INFO  [James.Mailet] RemoteDelivery: Attempting delivery of 
> Mail1-0 to host 192.168.1.1 at 192.168.1.1 for addresses [EMAIL 
> PROTECTED]
> INFO  [James.Mailet] BayesianAnalysisFeeder: maxSize: 20
> Improved Logs...
> INFO  [James.Mailet.org.apache.james.transport.mailets.ToRepository] 
> ToRepository: Storing mail Mail1-0 in file://var/mail/inbound/
> INFO  [James.Mailet.org.apache.james.transport.mailets.RemoteDelivery] 
> RemoteDelivery: Attempting delivery of Mail1-0 to host 
> 192.168.1.1 at 192.168.1.1 for addresses [EMAIL PROTECTED]
> INFO  
> [James.Mailet.org.apache.james.transport.mailets.BayesianAnalysisFeeder] 
> BayesianAnalysisFeeder: maxSize: 20
> With this you can organize your logs by Mailet / Category in environment.xml 
> :-)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (JSPF-28) Allow to set the default explanation

2006-09-24 Thread Norman Maurer (JIRA)
Allow to set the default explanation


 Key: JSPF-28
 URL: http://issues.apache.org/jira/browse/JSPF-28
 Project: jSPF
  Issue Type: New Feature
Reporter: Norman Maurer
 Assigned To: Norman Maurer


It whould be nice to allow to set a costum default explanation which will be 
used if noe explanation is specified in the SPF-Record.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-601) Add Class detail in logs of James.Mailet (patch)

2006-09-24 Thread Stefano Bagnara (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-601?page=comments#action_12437225 ] 

Stefano Bagnara commented on JAMES-601:
---

Sorry but I still don't like this.

1) Thread.getStackTrace is a java5 method: we have to support java 2 1.4.
2) It throw/catch an exception for every log call.

I still think that the only "non-workaround" solution is wrapping the 
MailetContext.
I will attach an example patch soon, if you want to test it.

> Add Class detail in logs of James.Mailet (patch)
> 
>
> Key: JAMES-601
> URL: http://issues.apache.org/jira/browse/JAMES-601
> Project: James
>  Issue Type: Improvement
>  Components: Mailet API, James Core, Matchers/Mailets (bundled), 
> Remote Delivery, Mailet Contributions
>Affects Versions: 2.3.0rc1
> Environment: james 2.3.0rc1
>Reporter: Guillermo Grandes
> Attachments: James-final-20060923.diff, James.java.diff, 
> James.java.diff, JamesChildsLogger.java.diff
>
>
> In order to improve the organization and operation of logs I have thought 
> about this piece of code, without change Mailet API and that does not force 
> to make great changes in the Mailets.
> This code affects :
> http://svn.apache.org/viewvc/james/server/branches/v2.3/src/java/org/apache/james/James.java
> ==
> /**
> * Return the logger for the Mailet API
> *
> * @return the logger for the Mailet API
> */
> private Logger getMailetLogger() { // it replaces the original method
> if (mailetLogger == null) {
> mailetLogger = getLogger().getChildLogger("Mailet");
> }
> String p = findParentCaller();
> return ((p == null) ? mailetLogger : mailetLogger.getChildLogger(p));
> }
> /**
> * Return the Caller Mailet
> *
> * @return the ClassName for the Caller Mailet / Matcher
> */
> private String findParentCaller() {// it is a new method
> try {
> throw new Exception();
> }
> catch (Throwable t) {
> StackTraceElement[] ste = t.getStackTrace();
> int i;
> boolean found = false;
> for (i = 0; i < ste.length; i++) {
> String cn = ste[i].getClassName();
> if (cn.startsWith("sun") || cn.startsWith("java") || 
> cn.startsWith("$")) continue; // speed-up
> if ((cn.equals("org.apache.mailet.GenericMailet")) ||
> (cn.equals("org.apache.mailet.GenericMatcher"))) {
> continue;
> }
> try {
> Class c = Class.forName(cn);
> if 
> ((org.apache.mailet.GenericMailet.class.isAssignableFrom(c)) ||
> 
> (org.apache.mailet.GenericMatcher.class.isAssignableFrom(c))) {
> found = true; break;
> }
> }
> catch(Exception ign) {}
> }
> if (!found) return null;
> try {
> return ste[i].getClassName().replace("$", ".");
> }
> catch (Exception ign) {}
> return null;
> }
> }
> ==
> The result of this patch is:
> Original Logs...
> INFO  [James.Mailet] ToRepository: Storing mail Mail1-0 in 
> file://var/mail/inbound/
> INFO  [James.Mailet] RemoteDelivery: Attempting delivery of 
> Mail1-0 to host 192.168.1.1 at 192.168.1.1 for addresses [EMAIL 
> PROTECTED]
> INFO  [James.Mailet] BayesianAnalysisFeeder: maxSize: 20
> Improved Logs...
> INFO  [James.Mailet.org.apache.james.transport.mailets.ToRepository] 
> ToRepository: Storing mail Mail1-0 in file://var/mail/inbound/
> INFO  [James.Mailet.org.apache.james.transport.mailets.RemoteDelivery] 
> RemoteDelivery: Attempting delivery of Mail1-0 to host 
> 192.168.1.1 at 192.168.1.1 for addresses [EMAIL PROTECTED]
> INFO  
> [James.Mailet.org.apache.james.transport.mailets.BayesianAnalysisFeeder] 
> BayesianAnalysisFeeder: maxSize: 20
> With this you can organize your logs by Mailet / Category in environment.xml 
> :-)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (JSPF-24) Handle of non configured SPF domains with default SPF record

2006-09-24 Thread Guillermo Grandes (JIRA)
 [ http://issues.apache.org/jira/browse/JSPF-24?page=all ]

Guillermo Grandes updated JSPF-24:
--

Attachment: SPF.java.diff

Hi,

Attach a diff (SPF.java.diff) for the trunk (org.apache.james.jspf.SPF), for 
handle transitional domains (non configured with spf), force local policies, 
check a specified policy, etc etc.

they are a few lines, but few changes (all transparent) :-) more commentaries 
than code! ;-)


> Handle of non configured SPF domains with default SPF record
> 
>
> Key: JSPF-24
> URL: http://issues.apache.org/jira/browse/JSPF-24
> Project: jSPF
>  Issue Type: Improvement
> Environment: jSPF 0.9b2
>Reporter: Guillermo Grandes
> Attachments: SPF.java.diff
>
>
> Use the best guess SPF record when one cannot be found in the DNS. Note that 
> this can only return pass or neutral.
> example best_guess: "v=spf1 a/24 mx/24 ptr ?all"
> This improvement is not standard, but Google uses it (cannot be bad)  ;-)
> The idea is that the use of this improvement and the policy that is used by 
> default can initialize, to even force the use of a local_policy (just in case 
> the request were arriving to us from an internal network 10.0.0.0/8 for 
> example)
> See also: 
> http://search.cpan.org/dist/Mail-SPF-Query/lib/Mail/SPF/Query.pm#NON-STANDARD_FEATURES

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RemoteDeliverySocketFactory

2006-09-24 Thread Stefano Bagnara

Hi Laurent,

Laurent Rouvet wrote:

Hi,

Is it the time to remove the RemoteDeliverySocketFactory and to have 
ability to have multiple binding ?


I planned to do that change in past but I had to keep the socket factory 
because one of my production servers had problems with the total number 
of connections opened (that I never had time to investigate too much) 
and I fixed using a custom socket factory:



public class RemoteDeliverySocketFactoryTimeout extends 
RemoteDeliverySocketFactory {


public static final int TIMEOUT = 30;

/**
 * the same as the similarly named javax.net.SocketFactory operation.
 */
public static SocketFactory getDefault() {
return new RemoteDeliverySocketFactoryTimeout();
}

public Socket createSocket() throws SocketException {
Socket s = new Socket();
s.setSoTimeout(TIMEOUT);
return s;
}

public Socket createSocket(String host, int port)
throws IOException, UnknownHostException {
Socket s = new Socket();
s.setSoTimeout(TIMEOUT);
s.connect(new InetSocketAddress(host,port),6);
return s;
}

public Socket createSocket(InetAddress host, int port) throws 
IOException {

Socket s = new Socket();
s.setSoTimeout(TIMEOUT);
s.connect(new InetSocketAddress(host,port),6);
return s;
}

}
-

So I think we can remove that object but keep the ability to use an 
external factory to be used when the default javamail socket factory is 
not enough.



Should we use mail.smtp.bindAdress or mail.smtp.localaddr ?


mail.smtp.localaddr/mail.smtp.localport seems to be the only properties 
used: where did you find about mail.smtp.bindAdress ?



I'll be happy to do and test it... ;-)


If you do that, please open a JIRA issue and attach your patch granting 
rights to ASF for inclusion.


Stefano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: allowMissingBracket

2006-09-24 Thread Stefano Bagnara
I like your patch, and I think we should include it as an optional 
(disabled by default) feature.


Please open a JIRA issue and submit it as a diff against current trunk, 
so we can review changes and decide wether to include it or not.


About the name I would prefer "allowMissingBrackets" (not the trailing "s").

Stefano

Laurent Rouvet wrote:

Hi,

James doesn't allow missing bracket into the "mailto" and "rcpt to", 
which is conforme to the RFC.
However, most of the smtp server allow that. When some simple client 
does not follow the RFC. It is the case of the Oracle UTL_MAIL (pl-sql 
pkg) which is quite buggy.


Anyway, I got the problem, so I added an allowMissingBracket parameter 
to MailCmdHandler and RcptCmdHandler.


I'll be happy to send you a patch if you would like include it into the 
James distribution. In that case do you prefere that I add the parameter 
(like I did) or do you prefere that I create a new class like 
NotStrictMailCmdHandler...?


Anyway, I send were the code that I did.
Let me know if you would like anything more in order to make it part of 
your distribution.


Regards,

Laurent Rouvet




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RemoteDeliverySocketFactory

2006-09-24 Thread Laurent Rouvet

Hi,

Is it the time to remove the RemoteDeliverySocketFactory and to have 
ability to have multiple binding ?


Should we use mail.smtp.bindAdress or mail.smtp.localaddr ?

I'll be happy to do and test it... ;-)

Regards,

Laurent Rouvet


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



allowMissingBracket

2006-09-24 Thread Laurent Rouvet

Hi,

James doesn't allow missing bracket into the "mailto" and "rcpt to", 
which is conforme to the RFC.
However, most of the smtp server allow that. When some simple client 
does not follow the RFC. It is the case of the Oracle UTL_MAIL (pl-sql 
pkg) which is quite buggy.


Anyway, I got the problem, so I added an allowMissingBracket parameter 
to MailCmdHandler and RcptCmdHandler.


I'll be happy to send you a patch if you would like include it into the 
James distribution. In that case do you prefere that I add the parameter 
(like I did) or do you prefere that I create a new class like 
NotStrictMailCmdHandler...?


Anyway, I send were the code that I did.
Let me know if you would like anything more in order to make it part of 
your distribution.


Regards,

Laurent Rouvet

/***
 * Copyright (c) 1999-2006 The Apache Software Foundation. *
 * All rights reserved.*
 * --- *
 * Licensed under the Apache License, Version 2.0 (the "License"); you *
 * may not use this file except in compliance with the License. You*
 * may obtain a copy of the License at:*
 * *
 * http://www.apache.org/licenses/LICENSE-2.0  *
 * *
 * Unless required by applicable law or agreed to in writing, software *
 * distributed under the License is distributed on an "AS IS" BASIS,   *
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or *
 * implied.  See the License for the specific language governing   *
 * permissions and limitations under the License.  *
 ***/

package org.apache.james.smtpserver;

import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
import org.apache.james.services.DNSServer;
import org.apache.james.util.mail.dsn.DSNStatus;
import org.apache.mailet.MailAddress;

import java.util.Collection;
import java.util.Locale;
import java.util.StringTokenizer;

/**
  * Handles MAIL command
  */
public class MailCmdHandler
extends AbstractLogEnabled
implements CommandHandler,Configurable, Serviceable {

private final static String MAIL_OPTION_SIZE = "SIZE";

private final static String MESG_SIZE = "MESG_SIZE"; // The size of the 
message

private boolean checkValidSenderDomain = false;

private boolean checkAuthClients = false;

private boolean allowMissingBracket = false;

private DNSServer dnsServer = null;

/**
 * @see 
org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
 */
public void configure(Configuration handlerConfiguration) throws 
ConfigurationException {
Configuration configuration = 
handlerConfiguration.getChild("checkValidSenderDomain",false);
if(configuration != null) {
   checkValidSenderDomain = configuration.getValueAsBoolean();
   if (checkValidSenderDomain && dnsServer == null) {
   throw new ConfigurationException("checkValidSenderDomain enabled 
but no DNSServer service provided to SMTPServer");
   }
}

Configuration configRelay = 
handlerConfiguration.getChild("checkAuthClients",false);
if(configRelay != null) {
checkAuthClients = configRelay.getValueAsBoolean();
}

configRelay = 
handlerConfiguration.getChild("allowMissingBracket",false);
if(configRelay != null) {
allowMissingBracket = configRelay.getValueAsBoolean();
}
}

/**
 * @see 
org.apache.avalon.framework.service.Serviceable#service(ServiceManager)
 */
public void service(ServiceManager serviceMan) throws ServiceException {
dnsServer = (DNSServer) serviceMan.lookup(DNSServer.ROLE);
}

/**
 * handles MAIL command
 *
 * @see org.apache.james.smtpserver.CommandHandler#onCommand(SMTPSession)
 */
public void onCommand(SMTPSession session) {
doMAIL(session, session.getCommandArgument());
}


/**
 * Handler method called upon receipt of a MAIL command.
 * Sets up handler to deliver mail as the stated sender.
 *
 * @param session SMTP session object
 * @param argument the argument passed in with the command by the SMTP 
client
 */
private void doMAIL

[jira] Updated: (JAMES-620) James nightly builds are broken?

2006-09-24 Thread Guillermo Grandes (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-620?page=all ]

Guillermo Grandes updated JAMES-620:


Attachment: UnwrapText.java.diff

I have watching the JAMES Server Nightly Build Report and it only seems to have 
a strange file:

> Reverted 'src/java/org/apache/james/transport/mailets/UnwrapText.java'

Attach a diff (UnwrapText.java.diff) with reindent / modified to see if the 
problem is corrected.

> James nightly builds are broken?
> 
>
> Key: JAMES-620
> URL: http://issues.apache.org/jira/browse/JAMES-620
> Project: James
>  Issue Type: Bug
>  Components: Build System
>Affects Versions: Trunk
> Environment: James 3.0
>Reporter: Guillermo Grandes
> Attachments: UnwrapText.java.diff
>
>
> http://people.apache.org/builds/james/nightly/
> no changes since 29-Aug-2006 00:31, is broken?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-596) Reorganize SMIME crypto support code to share it with future new PGP support code

2006-09-24 Thread Vincenzo Gianferrari Pini (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-596?page=comments#action_12437211 ] 

Vincenzo Gianferrari Pini commented on JAMES-596:
-

About the right approach to the generation of the new MimeBodyPart content, I'm 
unable to answer; perhaps someone else of the committers can. Post  the 
question to server-dev.

> Reorganize SMIME crypto support code to share it with future new PGP support 
> code
> -
>
> Key: JAMES-596
> URL: http://issues.apache.org/jira/browse/JAMES-596
> Project: James
>  Issue Type: New Feature
>  Components: Matchers/Mailets (bundled)
>Reporter: Vincenzo Gianferrari Pini
> Assigned To: Vincenzo Gianferrari Pini
>Priority: Minor
> Fix For: Trunk
>
>
> The current mailet code that does cryptographic activity is specialized for 
> SMIME. In order to support PGP, as requested by some people (Robert Burrel 
> Donkin), it would be nice to have it rearranged in order to share code as 
> much as possible.
> First of all let me recall the current code.
> There are two similar but not identically built "strains", one written by me, 
> and the other by Stefano. But from our point of view they are equivalent.
> My strain is the SMIMESign mailet that extends SMIMEAbstractSign; the split 
> between the two classes is just to allow for some possible massaging of the 
> message before the signature (the "explanation text" in this case).
> Stefano's strain is composed of the SMIMECheckSignature and SMIMEDecrypt 
> mailet, plus the IsSMIMEEncrypted, IsSMIMESigned and IsX509CertificateSubject 
> matchers.
> SMIMEAbstractSign (and SMIMEDecrypt) uses *for all the SMIME related work* 
> the org.apache.james.security.KeyHolder helper class; similarly 
> SMIMECheckSignature uses the org.apache.james.security.KeyStoreHolder helper 
> class.
> The approach I'm thinking about is the following:
> 1) Create an *interface* named KeyHolder with all the needed (and not SMIME 
> dependent) methods.
> 2) Rename the current KeyHolder class to SMIMEKeyHolder, and have it 
> implement the KeyHolder interface doing the SMIME implementation.
> 3) Create a new PGPKeyHolder implementing KeyHolder interface doing the PGP 
> work. My assumption is that *there is a total equivalence* between the SMIME 
> and PGP required/desired functionalities, captured by the KeyHolder interface.
> 4) Have SMIMEAbstractSign instantiate either SMIMEKeyHolder or PGPKeyHolder 
> as the KeyHolder object that will be used, based on the value of a new 
>  attribute, that would be either  
> org.apache.james.security.SMIMEKeyHolder or  
> org.apache.james.security.PGPKeyHolder  .
> 5) Rename SMIMESign to Sign, that will become the concrete sign malet driven 
> by the  attribute.
> 6) Create two new and very simple SMIMESign and PGPSign mailets, whose only 
> job would be to force the  attribute to the right one.
> An equivalent job could and should be done for Stefano's mailets.
> The PGP equivalents of Stefano's matchers should be written from scratch.
> I have already done part of the work. If nobody has anything to say against 
> this approach, I will start committing to trunk in the next few days.  Robert 
> after that will write the PGP specific code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-596) Reorganize SMIME crypto support code to share it with future new PGP support code

2006-09-24 Thread Vincenzo Gianferrari Pini (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-596?page=comments#action_12437209 ] 

Vincenzo Gianferrari Pini commented on JAMES-596:
-

Regarding your proposal of adding only RFC 3156 OpenPGP/MIME support, I leave 
it to your judgement; but what is the client support for it? The "Classic 
inline PGP" is always available to anyone having PGP or GPG installed, so isn't 
it a pity to miss its support?

> Reorganize SMIME crypto support code to share it with future new PGP support 
> code
> -
>
> Key: JAMES-596
> URL: http://issues.apache.org/jira/browse/JAMES-596
> Project: James
>  Issue Type: New Feature
>  Components: Matchers/Mailets (bundled)
>Reporter: Vincenzo Gianferrari Pini
> Assigned To: Vincenzo Gianferrari Pini
>Priority: Minor
> Fix For: Trunk
>
>
> The current mailet code that does cryptographic activity is specialized for 
> SMIME. In order to support PGP, as requested by some people (Robert Burrel 
> Donkin), it would be nice to have it rearranged in order to share code as 
> much as possible.
> First of all let me recall the current code.
> There are two similar but not identically built "strains", one written by me, 
> and the other by Stefano. But from our point of view they are equivalent.
> My strain is the SMIMESign mailet that extends SMIMEAbstractSign; the split 
> between the two classes is just to allow for some possible massaging of the 
> message before the signature (the "explanation text" in this case).
> Stefano's strain is composed of the SMIMECheckSignature and SMIMEDecrypt 
> mailet, plus the IsSMIMEEncrypted, IsSMIMESigned and IsX509CertificateSubject 
> matchers.
> SMIMEAbstractSign (and SMIMEDecrypt) uses *for all the SMIME related work* 
> the org.apache.james.security.KeyHolder helper class; similarly 
> SMIMECheckSignature uses the org.apache.james.security.KeyStoreHolder helper 
> class.
> The approach I'm thinking about is the following:
> 1) Create an *interface* named KeyHolder with all the needed (and not SMIME 
> dependent) methods.
> 2) Rename the current KeyHolder class to SMIMEKeyHolder, and have it 
> implement the KeyHolder interface doing the SMIME implementation.
> 3) Create a new PGPKeyHolder implementing KeyHolder interface doing the PGP 
> work. My assumption is that *there is a total equivalence* between the SMIME 
> and PGP required/desired functionalities, captured by the KeyHolder interface.
> 4) Have SMIMEAbstractSign instantiate either SMIMEKeyHolder or PGPKeyHolder 
> as the KeyHolder object that will be used, based on the value of a new 
>  attribute, that would be either  
> org.apache.james.security.SMIMEKeyHolder or  
> org.apache.james.security.PGPKeyHolder  .
> 5) Rename SMIMESign to Sign, that will become the concrete sign malet driven 
> by the  attribute.
> 6) Create two new and very simple SMIMESign and PGPSign mailets, whose only 
> job would be to force the  attribute to the right one.
> An equivalent job could and should be done for Stefano's mailets.
> The PGP equivalents of Stefano's matchers should be written from scratch.
> I have already done part of the work. If nobody has anything to say against 
> this approach, I will start committing to trunk in the next few days.  Robert 
> after that will write the PGP specific code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-596) Reorganize SMIME crypto support code to share it with future new PGP support code

2006-09-24 Thread Vincenzo Gianferrari Pini (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-596?page=comments#action_12437208 ] 

Vincenzo Gianferrari Pini commented on JAMES-596:
-

I would return for getSignerCN() the primary name of the PGP key;

for getSignerDistinguishedName() I would return a "nice" toString of the PGP 
key, and why not a string like "[EMAIL PROTECTED], CN=The Primary Name", 
consistent with the string returned by 
X509Certificate.getSubjectDN().toString()?

> Reorganize SMIME crypto support code to share it with future new PGP support 
> code
> -
>
> Key: JAMES-596
> URL: http://issues.apache.org/jira/browse/JAMES-596
> Project: James
>  Issue Type: New Feature
>  Components: Matchers/Mailets (bundled)
>Reporter: Vincenzo Gianferrari Pini
> Assigned To: Vincenzo Gianferrari Pini
>Priority: Minor
> Fix For: Trunk
>
>
> The current mailet code that does cryptographic activity is specialized for 
> SMIME. In order to support PGP, as requested by some people (Robert Burrel 
> Donkin), it would be nice to have it rearranged in order to share code as 
> much as possible.
> First of all let me recall the current code.
> There are two similar but not identically built "strains", one written by me, 
> and the other by Stefano. But from our point of view they are equivalent.
> My strain is the SMIMESign mailet that extends SMIMEAbstractSign; the split 
> between the two classes is just to allow for some possible massaging of the 
> message before the signature (the "explanation text" in this case).
> Stefano's strain is composed of the SMIMECheckSignature and SMIMEDecrypt 
> mailet, plus the IsSMIMEEncrypted, IsSMIMESigned and IsX509CertificateSubject 
> matchers.
> SMIMEAbstractSign (and SMIMEDecrypt) uses *for all the SMIME related work* 
> the org.apache.james.security.KeyHolder helper class; similarly 
> SMIMECheckSignature uses the org.apache.james.security.KeyStoreHolder helper 
> class.
> The approach I'm thinking about is the following:
> 1) Create an *interface* named KeyHolder with all the needed (and not SMIME 
> dependent) methods.
> 2) Rename the current KeyHolder class to SMIMEKeyHolder, and have it 
> implement the KeyHolder interface doing the SMIME implementation.
> 3) Create a new PGPKeyHolder implementing KeyHolder interface doing the PGP 
> work. My assumption is that *there is a total equivalence* between the SMIME 
> and PGP required/desired functionalities, captured by the KeyHolder interface.
> 4) Have SMIMEAbstractSign instantiate either SMIMEKeyHolder or PGPKeyHolder 
> as the KeyHolder object that will be used, based on the value of a new 
>  attribute, that would be either  
> org.apache.james.security.SMIMEKeyHolder or  
> org.apache.james.security.PGPKeyHolder  .
> 5) Rename SMIMESign to Sign, that will become the concrete sign malet driven 
> by the  attribute.
> 6) Create two new and very simple SMIMESign and PGPSign mailets, whose only 
> job would be to force the  attribute to the right one.
> An equivalent job could and should be done for Stefano's mailets.
> The PGP equivalents of Stefano's matchers should be written from scratch.
> I have already done part of the work. If nobody has anything to say against 
> this approach, I will start committing to trunk in the next few days.  Robert 
> after that will write the PGP specific code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r449397 - /james/jspf/tags/build_0_9_B3/

2006-09-24 Thread bago
Author: bago
Date: Sun Sep 24 05:41:31 2006
New Revision: 449397

URL: http://svn.apache.org/viewvc?view=rev&rev=449397
Log:
tag for the just released 0.9b3

Added:
james/jspf/tags/build_0_9_B3/
  - copied from r448260, james/jspf/trunk/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Commented: (JAMES-620) James nightly builds are broken?

2006-09-24 Thread Stefano Bagnara

Guillermo Grandes (JIRA) wrote:
[ http://issues.apache.org/jira/browse/JAMES-620?page=comments#action_12437180 ] 

Guillermo Grandes commented on JAMES-620:

-

there is somebody watching this problem? 



The nighly builds are created by a server managed by Noel. I already 
wrote to the mailing list previously to let Noel know of this problem.


Noel is currently busy so we have to wait.

Stefano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Resolved: (JAMES-631) Default host configuration for InSpammerBlacklist is relative: it should contain a trailing "." or it will reject all mail when the default domain has an "*" IN A rule.

2006-09-24 Thread Norman Maurer (JIRA)
 [ http://issues.apache.org/jira/browse/JAMES-631?page=all ]

Norman Maurer resolved JAMES-631.
-

Fix Version/s: 2.3.0
   (was: Trunk)
   Resolution: Fixed

> Default host configuration for InSpammerBlacklist is relative: it should 
> contain a trailing "." or it will reject all mail when the default domain has 
> an "*" IN A rule.
> 
>
> Key: JAMES-631
> URL: http://issues.apache.org/jira/browse/JAMES-631
> Project: James
>  Issue Type: Bug
>Affects Versions: 2.3.0rc3
>Reporter: Stefano Bagnara
> Assigned To: Stefano Bagnara
> Fix For: 2.3.0
>
>
> If your default search domain has a wildcard record ("* IN A xxx.xxx.xxx.xxx" 
> record) and you enable InSpammerBlackList it will match every single message.
> We should at least change our default config.xml to include a trailing space: 
> we already did this in the smtphandler configuration for this kind of lookups.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r449389 - /james/server/branches/v2.3/src/conf/james-config.xml

2006-09-24 Thread norman
Author: norman
Date: Sun Sep 24 03:30:37 2006
New Revision: 449389

URL: http://svn.apache.org/viewvc?view=rev&rev=449389
Log:
Backport james-config.xml changes. see JAMES-631)

Modified:
james/server/branches/v2.3/src/conf/james-config.xml

Modified: james/server/branches/v2.3/src/conf/james-config.xml
URL: 
http://svn.apache.org/viewvc/james/server/branches/v2.3/src/conf/james-config.xml?view=diff&rev=449389&r1=449388&r2=449389
==
--- james/server/branches/v2.3/src/conf/james-config.xml (original)
+++ james/server/branches/v2.3/src/conf/james-config.xml Sun Sep 24 03:30:37 
2006
@@ -347,7 +347,7 @@
  -->
 
  
- 
 transport 
  
@@ -373,13 +373,13 @@
  
  
  
- 
 spam 
550 Requested action not taken: rejected - see 
http://njabl.org/ 
  
 
- 
 spam 
550 Requested action not taken: rejected - see 
http://www.ordb.org/ 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-596) Reorganize SMIME crypto support code to share it with future new PGP support code

2006-09-24 Thread Robert Burrell Donkin (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-596?page=comments#action_12437195 ] 

Robert Burrell Donkin commented on JAMES-596:
-

I assume that the right approach to the generation of the new MimeBodyPart 
content is to register appropriate DataContentHandler implementations for the 
necessary (pgp-*) MIME types. I also assume that the right way to do this in 
JAMES is to add the implementation classes to src/meta-inf/mailcap. Let me know 
if any of these assumptions are wide of the mark.

> Reorganize SMIME crypto support code to share it with future new PGP support 
> code
> -
>
> Key: JAMES-596
> URL: http://issues.apache.org/jira/browse/JAMES-596
> Project: James
>  Issue Type: New Feature
>  Components: Matchers/Mailets (bundled)
>Reporter: Vincenzo Gianferrari Pini
> Assigned To: Vincenzo Gianferrari Pini
>Priority: Minor
> Fix For: Trunk
>
>
> The current mailet code that does cryptographic activity is specialized for 
> SMIME. In order to support PGP, as requested by some people (Robert Burrel 
> Donkin), it would be nice to have it rearranged in order to share code as 
> much as possible.
> First of all let me recall the current code.
> There are two similar but not identically built "strains", one written by me, 
> and the other by Stefano. But from our point of view they are equivalent.
> My strain is the SMIMESign mailet that extends SMIMEAbstractSign; the split 
> between the two classes is just to allow for some possible massaging of the 
> message before the signature (the "explanation text" in this case).
> Stefano's strain is composed of the SMIMECheckSignature and SMIMEDecrypt 
> mailet, plus the IsSMIMEEncrypted, IsSMIMESigned and IsX509CertificateSubject 
> matchers.
> SMIMEAbstractSign (and SMIMEDecrypt) uses *for all the SMIME related work* 
> the org.apache.james.security.KeyHolder helper class; similarly 
> SMIMECheckSignature uses the org.apache.james.security.KeyStoreHolder helper 
> class.
> The approach I'm thinking about is the following:
> 1) Create an *interface* named KeyHolder with all the needed (and not SMIME 
> dependent) methods.
> 2) Rename the current KeyHolder class to SMIMEKeyHolder, and have it 
> implement the KeyHolder interface doing the SMIME implementation.
> 3) Create a new PGPKeyHolder implementing KeyHolder interface doing the PGP 
> work. My assumption is that *there is a total equivalence* between the SMIME 
> and PGP required/desired functionalities, captured by the KeyHolder interface.
> 4) Have SMIMEAbstractSign instantiate either SMIMEKeyHolder or PGPKeyHolder 
> as the KeyHolder object that will be used, based on the value of a new 
>  attribute, that would be either  
> org.apache.james.security.SMIMEKeyHolder or  
> org.apache.james.security.PGPKeyHolder  .
> 5) Rename SMIMESign to Sign, that will become the concrete sign malet driven 
> by the  attribute.
> 6) Create two new and very simple SMIMESign and PGPSign mailets, whose only 
> job would be to force the  attribute to the right one.
> An equivalent job could and should be done for Stefano's mailets.
> The PGP equivalents of Stefano's matchers should be written from scratch.
> I have already done part of the work. If nobody has anything to say against 
> this approach, I will start committing to trunk in the next few days.  Robert 
> after that will write the PGP specific code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jSPF-0.9b3 was released

2006-09-24 Thread Norman Maurer

Hi guys,

just want to let you know that we finally release the third beta of our
pure java spf implementation called jSPF. You can grab the release from:
http://people.apache.org/dist/james/jspf/

This release pass all YAML tests  published by openspf.org (still under 
development). So it should be fully RFC 4408 conform.


For more information see:
http://james.apache.org/jspf/

Any feedback is welcome.


bye
Norman

Ps: The website should be updated soon.



signature.asc
Description: PGP signature
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

[jira] Commented: (JAMES-596) Reorganize SMIME crypto support code to share it with future new PGP support code

2006-09-24 Thread Robert Burrell Donkin (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-596?page=comments#action_12437192 ] 

Robert Burrell Donkin commented on JAMES-596:
-

Classic inline PGP is known to be a tough problem. There are known issues with 
parsing messages and with implementations on some older clients (such outlook). 
This approach has many significant differences from SMIME.

RFC 3156 OpenPGP/MIME describes a cleaner, modern approach using MIME. It 
builds on the work done using certificates using SMIME and is congruent with 
it. 

I propose to add only RFC 3156 OpenPGP/MIME support. 

> Reorganize SMIME crypto support code to share it with future new PGP support 
> code
> -
>
> Key: JAMES-596
> URL: http://issues.apache.org/jira/browse/JAMES-596
> Project: James
>  Issue Type: New Feature
>  Components: Matchers/Mailets (bundled)
>Reporter: Vincenzo Gianferrari Pini
> Assigned To: Vincenzo Gianferrari Pini
>Priority: Minor
> Fix For: Trunk
>
>
> The current mailet code that does cryptographic activity is specialized for 
> SMIME. In order to support PGP, as requested by some people (Robert Burrel 
> Donkin), it would be nice to have it rearranged in order to share code as 
> much as possible.
> First of all let me recall the current code.
> There are two similar but not identically built "strains", one written by me, 
> and the other by Stefano. But from our point of view they are equivalent.
> My strain is the SMIMESign mailet that extends SMIMEAbstractSign; the split 
> between the two classes is just to allow for some possible massaging of the 
> message before the signature (the "explanation text" in this case).
> Stefano's strain is composed of the SMIMECheckSignature and SMIMEDecrypt 
> mailet, plus the IsSMIMEEncrypted, IsSMIMESigned and IsX509CertificateSubject 
> matchers.
> SMIMEAbstractSign (and SMIMEDecrypt) uses *for all the SMIME related work* 
> the org.apache.james.security.KeyHolder helper class; similarly 
> SMIMECheckSignature uses the org.apache.james.security.KeyStoreHolder helper 
> class.
> The approach I'm thinking about is the following:
> 1) Create an *interface* named KeyHolder with all the needed (and not SMIME 
> dependent) methods.
> 2) Rename the current KeyHolder class to SMIMEKeyHolder, and have it 
> implement the KeyHolder interface doing the SMIME implementation.
> 3) Create a new PGPKeyHolder implementing KeyHolder interface doing the PGP 
> work. My assumption is that *there is a total equivalence* between the SMIME 
> and PGP required/desired functionalities, captured by the KeyHolder interface.
> 4) Have SMIMEAbstractSign instantiate either SMIMEKeyHolder or PGPKeyHolder 
> as the KeyHolder object that will be used, based on the value of a new 
>  attribute, that would be either  
> org.apache.james.security.SMIMEKeyHolder or  
> org.apache.james.security.PGPKeyHolder  .
> 5) Rename SMIMESign to Sign, that will become the concrete sign malet driven 
> by the  attribute.
> 6) Create two new and very simple SMIMESign and PGPSign mailets, whose only 
> job would be to force the  attribute to the right one.
> An equivalent job could and should be done for Stefano's mailets.
> The PGP equivalents of Stefano's matchers should be written from scratch.
> I have already done part of the work. If nobody has anything to say against 
> this approach, I will start committing to trunk in the next few days.  Robert 
> after that will write the PGP specific code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (JAMES-596) Reorganize SMIME crypto support code to share it with future new PGP support code

2006-09-24 Thread Robert Burrell Donkin (JIRA)
[ 
http://issues.apache.org/jira/browse/JAMES-596?page=comments#action_12437191 ] 

Robert Burrell Donkin commented on JAMES-596:
-

JAMES-525 also covers OpenPGP

> Reorganize SMIME crypto support code to share it with future new PGP support 
> code
> -
>
> Key: JAMES-596
> URL: http://issues.apache.org/jira/browse/JAMES-596
> Project: James
>  Issue Type: New Feature
>  Components: Matchers/Mailets (bundled)
>Reporter: Vincenzo Gianferrari Pini
> Assigned To: Vincenzo Gianferrari Pini
>Priority: Minor
> Fix For: Trunk
>
>
> The current mailet code that does cryptographic activity is specialized for 
> SMIME. In order to support PGP, as requested by some people (Robert Burrel 
> Donkin), it would be nice to have it rearranged in order to share code as 
> much as possible.
> First of all let me recall the current code.
> There are two similar but not identically built "strains", one written by me, 
> and the other by Stefano. But from our point of view they are equivalent.
> My strain is the SMIMESign mailet that extends SMIMEAbstractSign; the split 
> between the two classes is just to allow for some possible massaging of the 
> message before the signature (the "explanation text" in this case).
> Stefano's strain is composed of the SMIMECheckSignature and SMIMEDecrypt 
> mailet, plus the IsSMIMEEncrypted, IsSMIMESigned and IsX509CertificateSubject 
> matchers.
> SMIMEAbstractSign (and SMIMEDecrypt) uses *for all the SMIME related work* 
> the org.apache.james.security.KeyHolder helper class; similarly 
> SMIMECheckSignature uses the org.apache.james.security.KeyStoreHolder helper 
> class.
> The approach I'm thinking about is the following:
> 1) Create an *interface* named KeyHolder with all the needed (and not SMIME 
> dependent) methods.
> 2) Rename the current KeyHolder class to SMIMEKeyHolder, and have it 
> implement the KeyHolder interface doing the SMIME implementation.
> 3) Create a new PGPKeyHolder implementing KeyHolder interface doing the PGP 
> work. My assumption is that *there is a total equivalence* between the SMIME 
> and PGP required/desired functionalities, captured by the KeyHolder interface.
> 4) Have SMIMEAbstractSign instantiate either SMIMEKeyHolder or PGPKeyHolder 
> as the KeyHolder object that will be used, based on the value of a new 
>  attribute, that would be either  
> org.apache.james.security.SMIMEKeyHolder or  
> org.apache.james.security.PGPKeyHolder  .
> 5) Rename SMIMESign to Sign, that will become the concrete sign malet driven 
> by the  attribute.
> 6) Create two new and very simple SMIMESign and PGPSign mailets, whose only 
> job would be to force the  attribute to the right one.
> An equivalent job could and should be done for Stefano's mailets.
> The PGP equivalents of Stefano's matchers should be written from scratch.
> I have already done part of the work. If nobody has anything to say against 
> this approach, I will start committing to trunk in the next few days.  Robert 
> after that will write the PGP specific code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]