Author: noel
Date: Thu Aug 10 20:55:04 2006
New Revision: 430647
URL: http://svn.apache.org/viewvc?rev=430647&view=rev
Log:
JAMES-587. Move the command.onCommand call into an else block so that it isn't
executed when command is null. When command IS null, add the COMMAND property
to the map before calling xmlResources.getString(String,Map), so that the name
of the invalid command is reported in the bounce message.
Modified:
james/server/trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java
Modified:
james/server/trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java
URL:
http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java?rev=430647&r1=430646&r2=430647&view=diff
==============================================================================
---
james/server/trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java
(original)
+++
james/server/trunk/src/java/org/apache/james/transport/mailets/CommandListservManager.java
Thu Aug 10 20:55:04 2006
@@ -299,12 +299,17 @@
if (command == null) {
//don't recognize the command
- onError(mail,
- "unknown command",
- xmlResources.getString("command.not.understood",
getStandardProperties()));
+ Properties props = getStandardProperties();
+ props.setProperty("COMMAND", getCommandName(mailAddress));
+ onError(mail, "unknown command",
xmlResources.getString("command.not.understood", props));
+ } else {
+ command.onCommand(mail);
}
- command.onCommand(mail);
+ // onError or onCommand would have done the job, so regardless
+ // of which get rid of this e-mail. This is something that we
+ // should review, and decide if there is any reason to allow a
+ // passthrough.
mail.setState(Mail.GHOST);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]