Re: bounce mail messages
With attachment tag begin 'none', you shouldn't have the original mail attached to the bounce mail. Can you try with attachError set to false? If it doesn't work out, you will have to debug. I do this ususally in eclipse and it's pretty powerful. The logic resides in AbstractRedirect (line 1189) Thx, Eric On 05/01/2013 17:43, Rajender Vallapureddy wrote: Hi Eric, Thank you for your help. I did as you suggested. I am getting the bounce mail, but also the original mail too. Following is my skeleton code of my mailet. public class CustomMailMailet extends AbstractNotify { @Override public void service(Mail mail) throws MessagingException { if(condition fails) { super.service(mail); } } } Following is the my configuration in the mailetcontainer.conf true mail from non webmail client denied bounce none true true Please guide me how can i get the bounce message only instead of the bounce message and the original message. Thank you in advance, Regards, Rajender On Sat, Jan 5, 2013 at 8:51 PM, Eric Charles wrote: Well, why don't you start from the existing Bounce mailet [1] (which extends AbstractNotify) rather than wrapping the MailetContext? Thx, Eric [1] https://svn.apache.org/repos/asf/james/server/trunk/mailets/src/main/java/org/apache/james/transport/mailets/Bounce.java On 05/01/2013 15:44, Rajender Vallapureddy wrote: Hi Eric, I am writing a custom mailet and based on the condition, I might have to deny sending mail message and bounce it. My bounce method is getting called, but unable to bounce the mail message. I have written a helper class and implemented my bounce method. Following is the code. within my mailet I am calling the method bounce mailetcntxtwrapper = new MailetContextWrapper(); mailetcntxtwrapper.bounce(mail, "Denied access from this message", new MailAddress(username)); public class MailetContextWrapper implements MailetContext { @Override public void bounce(Mail mail, String message, MailAddress bouncer) throws MessagingException { if(mail == null) { System.out.println("Mail is null"); } if (mail.getSender() == null) { if (log.isInfoEnabled()) log.info("Mail to be bounced contains a null (<>) reverse path. No bounce will be sent."); return; } else { // Bounce message goes to the reverse path, not to the Reply-To // address if (log.isInfoEnabled()) log.info("Processing a bounce request for a message with a reverse path of " + mail.getSender().toString()); } MailImpl reply = rawBounce(mail, message); // Change the sender... reply.getMessage().setFrom(bouncer.toInternetAddress()); reply.getMessage().saveChanges(); // Send it off ... with null reverse-path reply.setSender(null); sendMail(reply); LifecycleUtil.dispose(reply); } /** * Generates a bounce mail that is a bounce of the original message. * * @param bounceText the text to be prepended to the message to describe the bounce * condition * @return the bounce mail * @throws MessagingException if the bounce mail could not be created */ private MailImpl rawBounce(Mail mail, String bounceText) throws MessagingException { System.out.println("rawbound method called"); // This sends a message to the james component that is a bounce of the // sent message MimeMessage original = mail.getMessage(); MimeMessage reply = (MimeMessage) original.reply(false); reply.setSubject("Re: " + original.getSubject()); reply.setSentDate(new Date()); Collection recipients = new HashSet(); recipients.add(mail.getSender()); InternetAddress addr[] = {new InternetAddress(mail.getSender().toString())}; reply.setRecipients(Message.RecipientType.TO, addr); reply.setFrom(new InternetAddress(mail.getRecipients().iterator().next().toString())); reply.setText(bounceText); reply.setHeader(RFC2822Headers.MESSAGE_ID, "replyTo-" + mail.getName()); return new MailImpl("replyTo-" + mail.getName(), new MailAddress(mail.getRecipients().iterator().next().toString()), recipients, reply); } } Please guide me to get my custom bounce working. Also I want to make sure that once the bounce happens, the mail is not processed any further. What configuration should I be looking at within the mailet configuration. Appreciate your help :) Thank you, Regards, Rajender - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional c
Re: bounce mail messages
Hi Eric, Thank you for your help. I did as you suggested. I am getting the bounce mail, but also the original mail too. Following is my skeleton code of my mailet. public class CustomMailMailet extends AbstractNotify { @Override public void service(Mail mail) throws MessagingException { if(condition fails) { super.service(mail); } } } Following is the my configuration in the mailetcontainer.conf true mail from non webmail client denied bounce none true true Please guide me how can i get the bounce message only instead of the bounce message and the original message. Thank you in advance, Regards, Rajender On Sat, Jan 5, 2013 at 8:51 PM, Eric Charles wrote: > Well, why don't you start from the existing Bounce mailet [1] (which extends > AbstractNotify) rather than wrapping the MailetContext? > > Thx, Eric > > [1] > https://svn.apache.org/repos/asf/james/server/trunk/mailets/src/main/java/org/apache/james/transport/mailets/Bounce.java > > > On 05/01/2013 15:44, Rajender Vallapureddy wrote: >> >> Hi Eric, >> >> I am writing a custom mailet and based on the condition, I might have >> to deny sending mail message and bounce it. >> >> My bounce method is getting called, but unable to bounce the mail message. >> >> I have written a helper class and implemented my bounce method. >> >> Following is the code. >> >> within my mailet I am calling the method bounce >> >> mailetcntxtwrapper = new MailetContextWrapper(); >> mailetcntxtwrapper.bounce(mail, "Denied access from this message", new >> MailAddress(username)); >> >> >> public class MailetContextWrapper implements MailetContext { >> >> @Override >> public void bounce(Mail mail, String message, MailAddress bouncer) >> throws MessagingException { >> if(mail == null) { >> System.out.println("Mail is null"); >> } >> >> if (mail.getSender() == null) { >> if (log.isInfoEnabled()) >> log.info("Mail to be bounced contains a null (<>) >> reverse path. No bounce will be sent."); >> return; >> } else { >> // Bounce message goes to the reverse path, not to the >> Reply-To >> // address >> if (log.isInfoEnabled()) >> log.info("Processing a bounce request for a message >> with a reverse path of " + mail.getSender().toString()); >> } >> >> MailImpl reply = rawBounce(mail, message); >> // Change the sender... >> reply.getMessage().setFrom(bouncer.toInternetAddress()); >> reply.getMessage().saveChanges(); >> // Send it off ... with null reverse-path >> reply.setSender(null); >> sendMail(reply); >> LifecycleUtil.dispose(reply); >> } >> >> /** >> * Generates a bounce mail that is a bounce of the original message. >> * >> * @param bounceText the text to be prepended to the message to >> describe the bounce >> * condition >> * @return the bounce mail >> * @throws MessagingException if the bounce mail could not be created >> */ >> private MailImpl rawBounce(Mail mail, String bounceText) throws >> MessagingException { >> System.out.println("rawbound method called"); >> // This sends a message to the james component that is a bounce of >> the >> // sent message >> MimeMessage original = mail.getMessage(); >> MimeMessage reply = (MimeMessage) original.reply(false); >> reply.setSubject("Re: " + original.getSubject()); >> reply.setSentDate(new Date()); >> Collection recipients = new HashSet(); >> recipients.add(mail.getSender()); >> InternetAddress addr[] = {new >> InternetAddress(mail.getSender().toString())}; >> reply.setRecipients(Message.RecipientType.TO, addr); >> reply.setFrom(new >> InternetAddress(mail.getRecipients().iterator().next().toString())); >> reply.setText(bounceText); >> reply.setHeader(RFC2822Headers.MESSAGE_ID, "replyTo-" + >> mail.getName()); >> return new MailImpl("replyTo-" + mail.getName(), new >> MailAddress(mail.getRecipients().iterator().next().toString()), >> recipients, reply); >> } >> >> } >> >> Please guide me to get my custom bounce working. Also I want to make >> sure that once the bounce happens, the mail is not processed any >> further. What configuration should I be looking at within the mailet >> configuration. >> >> Appreciate your help :) >> >> Thank you, >> Regards, >> Rajender >> >> - >> To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org >> For additional commands, e-mail: server-dev-h...@james.apache.org >> > >
Re: bounce mail messages
Well, why don't you start from the existing Bounce mailet [1] (which extends AbstractNotify) rather than wrapping the MailetContext? Thx, Eric [1] https://svn.apache.org/repos/asf/james/server/trunk/mailets/src/main/java/org/apache/james/transport/mailets/Bounce.java On 05/01/2013 15:44, Rajender Vallapureddy wrote: Hi Eric, I am writing a custom mailet and based on the condition, I might have to deny sending mail message and bounce it. My bounce method is getting called, but unable to bounce the mail message. I have written a helper class and implemented my bounce method. Following is the code. within my mailet I am calling the method bounce mailetcntxtwrapper = new MailetContextWrapper(); mailetcntxtwrapper.bounce(mail, "Denied access from this message", new MailAddress(username)); public class MailetContextWrapper implements MailetContext { @Override public void bounce(Mail mail, String message, MailAddress bouncer) throws MessagingException { if(mail == null) { System.out.println("Mail is null"); } if (mail.getSender() == null) { if (log.isInfoEnabled()) log.info("Mail to be bounced contains a null (<>) reverse path. No bounce will be sent."); return; } else { // Bounce message goes to the reverse path, not to the Reply-To // address if (log.isInfoEnabled()) log.info("Processing a bounce request for a message with a reverse path of " + mail.getSender().toString()); } MailImpl reply = rawBounce(mail, message); // Change the sender... reply.getMessage().setFrom(bouncer.toInternetAddress()); reply.getMessage().saveChanges(); // Send it off ... with null reverse-path reply.setSender(null); sendMail(reply); LifecycleUtil.dispose(reply); } /** * Generates a bounce mail that is a bounce of the original message. * * @param bounceText the text to be prepended to the message to describe the bounce * condition * @return the bounce mail * @throws MessagingException if the bounce mail could not be created */ private MailImpl rawBounce(Mail mail, String bounceText) throws MessagingException { System.out.println("rawbound method called"); // This sends a message to the james component that is a bounce of the // sent message MimeMessage original = mail.getMessage(); MimeMessage reply = (MimeMessage) original.reply(false); reply.setSubject("Re: " + original.getSubject()); reply.setSentDate(new Date()); Collection recipients = new HashSet(); recipients.add(mail.getSender()); InternetAddress addr[] = {new InternetAddress(mail.getSender().toString())}; reply.setRecipients(Message.RecipientType.TO, addr); reply.setFrom(new InternetAddress(mail.getRecipients().iterator().next().toString())); reply.setText(bounceText); reply.setHeader(RFC2822Headers.MESSAGE_ID, "replyTo-" + mail.getName()); return new MailImpl("replyTo-" + mail.getName(), new MailAddress(mail.getRecipients().iterator().next().toString()), recipients, reply); } } Please guide me to get my custom bounce working. Also I want to make sure that once the bounce happens, the mail is not processed any further. What configuration should I be looking at within the mailet configuration. Appreciate your help :) Thank you, Regards, Rajender - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
Re: opening database connection in custom mailet
Hi, You should be able to use the jpa entityManagerFactory by defining a field in your mailet @PersistenceUnit private EntityManagerFactory entityManagerFactory; Invoke in your code to get an entityManager: EntityManager entityManager = entityManagerFactory.createEntityManager(); This will be configured based on the james-database.properties file. From there, it's plain JPA, where plain JDBC is also supported (entityManager.createNativeQuery). Thx, Eric On 05/01/2013 15:35, Rajender Vallapureddy wrote: Hi Eric, I have a requirement where I need to open database connection within my custom mailet. Is there any connection API within james that I can use and make queries to the database. Would appreciate your help :) Thank you, Regards, Rajender - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1429302 - in /james/postage/trunk: pom.xml src/main/java/org/apache/james/postage/configuration/ConfigurationLoader.java
Author: eric Date: Sat Jan 5 15:01:53 2013 New Revision: 1429302 URL: http://svn.apache.org/viewvc?rev=1429302&view=rev Log: Fix compilation failure due to pom and new commons-configuration (POSTAGE-25) Modified: james/postage/trunk/pom.xml james/postage/trunk/src/main/java/org/apache/james/postage/configuration/ConfigurationLoader.java Modified: james/postage/trunk/pom.xml URL: http://svn.apache.org/viewvc/james/postage/trunk/pom.xml?rev=1429302&r1=1429301&r2=1429302&view=diff == --- james/postage/trunk/pom.xml (original) +++ james/postage/trunk/pom.xml Sat Jan 5 15:01:53 2013 @@ -90,44 +90,38 @@ org.apache.james james-server-protocols-smtp - test test-jar ${version.james-server} org.apache.james james-server-filesystem-api - test test-jar ${version.james-server} org.apache.james james-server-protocols-library -test test-jar ${version.james-server} org.apache.james james-server-data-api -test test-jar ${version.james-server} org.apache.james james-server-queue-api -test test-jar ${version.james-server} - org.apache.james - james-server-data-library - test - test-jar - ${version.james-server} +org.apache.james +james-server-data-library +test-jar +${version.james-server} Modified: james/postage/trunk/src/main/java/org/apache/james/postage/configuration/ConfigurationLoader.java URL: http://svn.apache.org/viewvc/james/postage/trunk/src/main/java/org/apache/james/postage/configuration/ConfigurationLoader.java?rev=1429302&r1=1429301&r2=1429302&view=diff == --- james/postage/trunk/src/main/java/org/apache/james/postage/configuration/ConfigurationLoader.java (original) +++ james/postage/trunk/src/main/java/org/apache/james/postage/configuration/ConfigurationLoader.java Sat Jan 5 15:01:53 2013 @@ -17,19 +17,18 @@ * under the License. * / - package org.apache.james.postage.configuration; -import org.apache.commons.configuration.Configuration; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.james.postage.user.UserList; - import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import org.apache.commons.configuration.Configuration; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.james.postage.user.UserList; + /** * generates named PostageConfigurations */ @@ -37,18 +36,18 @@ public class ConfigurationLoader { private static Log log = LogFactory.getLog(ConfigurationLoader.class); - public Map create(Configuration configuration) { +public Map create(Configuration configuration) { log.debug("reading configuration."); Map postageConfigurations = new LinkedHashMap(); -List scenariosIds = configuration.getList("scenario[@id]"); +List scenariosIds = configuration.getList("scenario[@id]"); log.debug("scenarios contained in configuration: " + scenariosIds.size()); -Iterator scenarioIter = scenariosIds.iterator(); +Iterator scenarioIter = scenariosIds.iterator(); int scenarioCount = 0; while (scenarioIter.hasNext()) { -String scenarioId = scenarioIter.next(); +String scenarioId = (String) scenarioIter.next(); if (postageConfigurations.containsKey(scenarioId)) { log.error("found in configuration more than one scenario which is named: " + scenarioId); @@ -59,37 +58,52 @@ public class ConfigurationLoader { String scenario = getIndexedPropertyName("scenario", scenarioCount); - postageConfiguration.setDurationMinutes(configuration.getInt(getAttributedPropertyName(scenario, "runtimeMinutes"))); + postageConfiguration.setDurationMinutes(configuration.getInt(getAttributedPropertyName(scenario, +"runtimeMinutes"))); addDescription(postageConfiguration, configuration.subset(scenario + ".description")); String scenarioInternalUsers = scenario + ".users.internal"; -UserList internals = new UserList(configuration.getInt(getAttributedPropertyName(scenarioInternalUsers, "count")), - configuration.getString(getAttributedPropertyName(scenarioInternalUse
[jira] [Resolved] (POSTAGE-25) Fix compilation failure due to pom and new commons-configuration
[ https://issues.apache.org/jira/browse/POSTAGE-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Charles resolved POSTAGE-25. - Resolution: Fixed Fix Version/s: 0.1 Fixed > Fix compilation failure due to pom and new commons-configuration > > > Key: POSTAGE-25 > URL: https://issues.apache.org/jira/browse/POSTAGE-25 > Project: James Postage > Issue Type: Bug >Affects Versions: 0.1 >Reporter: Eric Charles >Assignee: Eric Charles > Fix For: 0.1 > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Created] (POSTAGE-25) Fix compilation failure due to pom and new commons-configuration
Eric Charles created POSTAGE-25: --- Summary: Fix compilation failure due to pom and new commons-configuration Key: POSTAGE-25 URL: https://issues.apache.org/jira/browse/POSTAGE-25 Project: James Postage Issue Type: Bug Affects Versions: 0.1 Reporter: Eric Charles Assignee: Eric Charles -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
bounce mail messages
Hi Eric, I am writing a custom mailet and based on the condition, I might have to deny sending mail message and bounce it. My bounce method is getting called, but unable to bounce the mail message. I have written a helper class and implemented my bounce method. Following is the code. within my mailet I am calling the method bounce mailetcntxtwrapper = new MailetContextWrapper(); mailetcntxtwrapper.bounce(mail, "Denied access from this message", new MailAddress(username)); public class MailetContextWrapper implements MailetContext { @Override public void bounce(Mail mail, String message, MailAddress bouncer) throws MessagingException { if(mail == null) { System.out.println("Mail is null"); } if (mail.getSender() == null) { if (log.isInfoEnabled()) log.info("Mail to be bounced contains a null (<>) reverse path. No bounce will be sent."); return; } else { // Bounce message goes to the reverse path, not to the Reply-To // address if (log.isInfoEnabled()) log.info("Processing a bounce request for a message with a reverse path of " + mail.getSender().toString()); } MailImpl reply = rawBounce(mail, message); // Change the sender... reply.getMessage().setFrom(bouncer.toInternetAddress()); reply.getMessage().saveChanges(); // Send it off ... with null reverse-path reply.setSender(null); sendMail(reply); LifecycleUtil.dispose(reply); } /** * Generates a bounce mail that is a bounce of the original message. * * @param bounceText the text to be prepended to the message to describe the bounce * condition * @return the bounce mail * @throws MessagingException if the bounce mail could not be created */ private MailImpl rawBounce(Mail mail, String bounceText) throws MessagingException { System.out.println("rawbound method called"); // This sends a message to the james component that is a bounce of the // sent message MimeMessage original = mail.getMessage(); MimeMessage reply = (MimeMessage) original.reply(false); reply.setSubject("Re: " + original.getSubject()); reply.setSentDate(new Date()); Collection recipients = new HashSet(); recipients.add(mail.getSender()); InternetAddress addr[] = {new InternetAddress(mail.getSender().toString())}; reply.setRecipients(Message.RecipientType.TO, addr); reply.setFrom(new InternetAddress(mail.getRecipients().iterator().next().toString())); reply.setText(bounceText); reply.setHeader(RFC2822Headers.MESSAGE_ID, "replyTo-" + mail.getName()); return new MailImpl("replyTo-" + mail.getName(), new MailAddress(mail.getRecipients().iterator().next().toString()), recipients, reply); } } Please guide me to get my custom bounce working. Also I want to make sure that once the bounce happens, the mail is not processed any further. What configuration should I be looking at within the mailet configuration. Appreciate your help :) Thank you, Regards, Rajender - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
opening database connection in custom mailet
Hi Eric, I have a requirement where I need to open database connection within my custom mailet. Is there any connection API within james that I can use and make queries to the database. Would appreciate your help :) Thank you, Regards, Rajender - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Resolved] (JAMES-1460) Simplify pom and update some dependencies
[ https://issues.apache.org/jira/browse/JAMES-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ioan Eugen Stan resolved JAMES-1460. Resolution: Fixed > Simplify pom and update some dependencies > - > > Key: JAMES-1460 > URL: https://issues.apache.org/jira/browse/JAMES-1460 > Project: James Server > Issue Type: Sub-task > Components: Build System >Affects Versions: 3.0-beta4 >Reporter: Ioan Eugen Stan >Assignee: Ioan Eugen Stan > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Commented] (JAMES-1460) Simplify pom and update some dependencies
[ https://issues.apache.org/jira/browse/JAMES-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13544704#comment-13544704 ] Ioan Eugen Stan commented on JAMES-1460: Made the build run 'with-assembly' profile during release:perform > Simplify pom and update some dependencies > - > > Key: JAMES-1460 > URL: https://issues.apache.org/jira/browse/JAMES-1460 > Project: James Server > Issue Type: Sub-task > Components: Build System >Affects Versions: 3.0-beta4 >Reporter: Ioan Eugen Stan >Assignee: Ioan Eugen Stan > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Commented] (JAMES-1460) Simplify pom and update some dependencies
[ https://issues.apache.org/jira/browse/JAMES-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13544697#comment-13544697 ] Ioan Eugen Stan commented on JAMES-1460: JAMES-1460 Updated dependencies and other fixes * derby 10.9.1.0 * geronimo-spec: 1.1.1 * commons-daemon: 1.0.10 * commons-pool: 1.6 * commons-configuration: 1.9 * commons-net: 3.2 * commons-beanutils: 1.8.3 * commons-io: 2.4 * jmock: 2.6.0 * log4j: 1.2.17 * openjpa: 2.2.1 * tika-parserts: 1.2 * xbean-spring: 3.12 * osgi-core: 5.0.0 * slf4j: 1.7.2 * jackrabbit: 2.5.2 * junit: 4.11 * activemq: 5.7.0 * camel: 2.10.3 * hadoop: 1.1.1 > Simplify pom and update some dependencies > - > > Key: JAMES-1460 > URL: https://issues.apache.org/jira/browse/JAMES-1460 > Project: James Server > Issue Type: Sub-task > Components: Build System >Affects Versions: 3.0-beta4 >Reporter: Ioan Eugen Stan >Assignee: Ioan Eugen Stan > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1429276 [2/2] - in /james/server/trunk: ./ container-spring/ container-spring/src/main/java/org/apache/james/container/spring/bean/factory/mailrepositorystore/ data/data-file/src/main/jav
Modified: james/server/trunk/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidRcptMX.java URL: http://svn.apache.org/viewvc/james/server/trunk/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidRcptMX.java?rev=1429276&r1=1429275&r2=1429276&view=diff == --- james/server/trunk/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidRcptMX.java (original) +++ james/server/trunk/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidRcptMX.java Sat Jan 5 13:09:12 2013 @@ -19,14 +19,6 @@ package org.apache.james.smtpserver.fastfail; -import java.net.UnknownHostException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import javax.annotation.Resource; - import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.ConfigurationException; import org.apache.james.dnsservice.api.DNSService; @@ -43,13 +35,21 @@ import org.apache.james.protocols.smtp.h import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Resource; +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; + /** * This class can be used to reject email with bogus MX which is send from a * authorized user or an authorized network. */ public class ValidRcptMX implements InitializingLifecycleAwareProtocolHandler, RcptHook { -/** This log is the fall back shared by all instances */ +/** + * This log is the fall back shared by all instances + */ private static final Logger FALLBACK_LOG = LoggerFactory.getLogger(ValidRcptMX.class); /** @@ -67,9 +67,8 @@ public class ValidRcptMX implements Init /** * Sets the service log. * Where available, a context sensitive log should be used. - * - * @param log - *not null + * + * @param log not null */ public void setLog(Logger log) { this.serviceLog = log; @@ -77,7 +76,7 @@ public class ValidRcptMX implements Init /** * Gets the DNS service. - * + * * @return the dnsService */ public final DNSService getDNSService() { @@ -86,9 +85,8 @@ public class ValidRcptMX implements Init /** * Sets the DNS service. - * - * @param dnsService - *the dnsService to set + * + * @param dnsService the dnsService to set */ @Resource(name = "dnsservice") public final void setDNSService(DNSService dnsService) { @@ -98,11 +96,9 @@ public class ValidRcptMX implements Init /** * Set the banned networks - * - * @param networks - *Collection of networks - * @param dnsServer - *The DNSServer + * + * @param networks Collection of networks + * @param dnsServer The DNSServer */ public void setBannedNetworks(Collection networks, DNSService dnsServer) { bNetwork = new NetMatcher(networks, dnsServer) { @@ -112,10 +108,6 @@ public class ValidRcptMX implements Init }; } -/** - * @see org.apache.james.protocols.smtp.hook.RcptHook#doRcpt(org.apache.james.protocols.smtp.SMTPSession, - * org.apache.mailet.MailAddress, org.apache.mailet.MailAddress) - */ public HookResult doRcpt(SMTPSession session, MailAddress sender, MailAddress rcpt) { String domain = rcpt.getDomain(); @@ -150,18 +142,15 @@ public class ValidRcptMX implements Init return new HookResult(HookReturnCode.DECLINED); } -@SuppressWarnings("unchecked") @Override public void init(Configuration config) throws ConfigurationException { -List networks = config.getList("invalidMXNetworks"); +String[] networks = config.getStringArray("invalidMXNetworks"); -if (networks.isEmpty() == false) { +if (networks.length == 0) { Collection bannedNetworks = new ArrayList(); - -for (int i = 0; i < networks.size(); i++) { -String network = networks.get(i); +for (String network : networks) { bannedNetworks.add(network.trim()); } Modified: james/server/trunk/queue/queue-activemq/pom.xml URL: http://svn.apache.org/viewvc/james/server/trunk/queue/queue-activemq/pom.xml?rev=1429276&r1=1429275&r2=1429276&view=diff == --- james/server/trunk/queue/queue-activemq/pom.xml (original) +++ james/server/trunk/queue/queue-activemq/pom.xml Sat Jan 5 13:09:12 2013 @@ -94,6 +94,11 @@ org.slf4j slf4j-api + + org.slf4j + slf4j-simple + test + org.apache.geronim
[jira] [Resolved] (PROTOCOLS-103) Make OSGi bundles out of protocols
[ https://issues.apache.org/jira/browse/PROTOCOLS-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ioan Eugen Stan resolved PROTOCOLS-103. --- Resolution: Fixed > Make OSGi bundles out of protocols > -- > > Key: PROTOCOLS-103 > URL: https://issues.apache.org/jira/browse/PROTOCOLS-103 > Project: James Protocols > Issue Type: Sub-task > Components: api, imap, lmtp, pop3, smtp >Affects Versions: 1.6.3 >Reporter: Ioan Eugen Stan >Assignee: Ioan Eugen Stan > Fix For: 1.6.3 > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1429258 - in /james/protocols/trunk: api/pom.xml imap/pom.xml lmtp/pom.xml netty/pom.xml pom.xml pop3/pom.xml smtp/pom.xml
Author: ieugen Date: Sat Jan 5 10:55:27 2013 New Revision: 1429258 URL: http://svn.apache.org/viewvc?rev=1429258&view=rev Log: PROTOCOLS-103 Created OSGi bundles Modified: james/protocols/trunk/api/pom.xml james/protocols/trunk/imap/pom.xml james/protocols/trunk/lmtp/pom.xml james/protocols/trunk/netty/pom.xml james/protocols/trunk/pom.xml james/protocols/trunk/pop3/pom.xml james/protocols/trunk/smtp/pom.xml Modified: james/protocols/trunk/api/pom.xml URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/pom.xml?rev=1429258&r1=1429257&r2=1429258&view=diff == --- james/protocols/trunk/api/pom.xml (original) +++ james/protocols/trunk/api/pom.xml Sat Jan 5 10:55:27 2013 @@ -29,8 +29,9 @@ org.apache.james.protocols protocols-api +bundle -Apache James Protocols API +Apache James :: Protocols :: API @@ -48,49 +49,4 @@ - - - -org.apache.maven.plugins -maven-jar-plugin - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - true - true - - - - - - -test-jar - - - - - -org.apache.felix -maven-bundle-plugin - - -bundle-manifest -process-classes - -manifest - - - -true - - - org.apache.james.protocols.api.* -*;scope=runtime - - - - - \ No newline at end of file Modified: james/protocols/trunk/imap/pom.xml URL: http://svn.apache.org/viewvc/james/protocols/trunk/imap/pom.xml?rev=1429258&r1=1429257&r2=1429258&view=diff == --- james/protocols/trunk/imap/pom.xml (original) +++ james/protocols/trunk/imap/pom.xml Sat Jan 5 10:55:27 2013 @@ -29,8 +29,9 @@ org.apache.james.protocols protocols-imap +bundle -Apache James Protocols IMAP +Apache James :: Protocols :: IMAP @@ -99,49 +100,4 @@ - - - -org.apache.maven.plugins -maven-jar-plugin - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - true - true - - - - - - -test-jar - - - - - -org.apache.felix -maven-bundle-plugin - - -bundle-manifest -process-classes - -manifest - - - -true - - - org.apache.james.protocols.imap.* -*;scope=runtime - - - - - \ No newline at end of file Modified: james/protocols/trunk/lmtp/pom.xml URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/pom.xml?rev=1429258&r1=1429257&r2=1429258&view=diff == --- james/protocols/trunk/lmtp/pom.xml (original) +++ james/protocols/trunk/lmtp/pom.xml Sat Jan 5 10:55:27 2013 @@ -29,8 +29,9 @@ org.apache.james.protocols protocols-lmtp +bundle -Apache James Protocols LMTP +Apache James :: Protocols :: LMTP @@ -70,49 +71,4 @@ - - - -org.apache.maven.plugins -maven-jar-plugin - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - true - true - - - - - - -
[jira] [Resolved] (PROTOCOLS-102) Update dependencies to newer versions
[ https://issues.apache.org/jira/browse/PROTOCOLS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ioan Eugen Stan resolved PROTOCOLS-102. --- Resolution: Fixed > Update dependencies to newer versions > -- > > Key: PROTOCOLS-102 > URL: https://issues.apache.org/jira/browse/PROTOCOLS-102 > Project: James Protocols > Issue Type: Sub-task > Components: api, imap, lmtp, netty, pop3, sieve, smtp >Affects Versions: 1.6.3 >Reporter: Ioan Eugen Stan >Assignee: Ioan Eugen Stan > Fix For: 1.6.3 > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Commented] (PROTOCOLS-102) Update dependencies to newer versions
[ https://issues.apache.org/jira/browse/PROTOCOLS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13544655#comment-13544655 ] Ioan Eugen Stan commented on PROTOCOLS-102: --- PROTOCOLS-102 Bumped version numbers * commons-net 3.2 * commons-lang 2.6 * mime4j 0.7.2 * commons-collection 3.2.1 * commons-codec 1.7 https://svn.apache.org/repos/asf/james/protocols/trunk@1429245 > Update dependencies to newer versions > -- > > Key: PROTOCOLS-102 > URL: https://issues.apache.org/jira/browse/PROTOCOLS-102 > Project: James Protocols > Issue Type: Sub-task > Components: api, imap, lmtp, netty, pop3, sieve, smtp >Affects Versions: 1.6.3 >Reporter: Ioan Eugen Stan >Assignee: Ioan Eugen Stan > Fix For: 1.6.3 > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1429245 - in /james/protocols/trunk: .gitignore api/pom.xml imap/pom.xml lmtp/pom.xml netty/pom.xml pom.xml pop3/pom.xml smtp/pom.xml
Author: ieugen Date: Sat Jan 5 10:23:29 2013 New Revision: 1429245 URL: http://svn.apache.org/viewvc?rev=1429245&view=rev Log: PROTOCOLS-102 Bumped version numbers * commons-net 3.2 * commons-lang 2.6 * mime4j 0.7.2 * commons-collection 3.2.1 * commons-codec 1.7 Added: james/protocols/trunk/.gitignore Modified: james/protocols/trunk/api/pom.xml james/protocols/trunk/imap/pom.xml james/protocols/trunk/lmtp/pom.xml james/protocols/trunk/netty/pom.xml james/protocols/trunk/pom.xml james/protocols/trunk/pop3/pom.xml james/protocols/trunk/smtp/pom.xml Added: james/protocols/trunk/.gitignore URL: http://svn.apache.org/viewvc/james/protocols/trunk/.gitignore?rev=1429245&view=auto == --- james/protocols/trunk/.gitignore (added) +++ james/protocols/trunk/.gitignore Sat Jan 5 10:23:29 2013 @@ -0,0 +1,3 @@ +.idea/ +target +*.iml Modified: james/protocols/trunk/api/pom.xml URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/pom.xml?rev=1429245&r1=1429244&r2=1429245&view=diff == --- james/protocols/trunk/api/pom.xml (original) +++ james/protocols/trunk/api/pom.xml Sat Jan 5 10:23:29 2013 @@ -1,4 +1,4 @@ - + -http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 james-project org.apache.james 1.8.1 - + protocols @@ -45,18 +46,22 @@ imap - - scm:svn:http://svn.apache.org/repos/asf/james/protocols/trunk - scm:svn:https://svn.apache.org/repos/asf/james/protocols/trunk - http://svn.apache.org/viewcvs.cgi/james/protocols/trunk?root=Apache-SVN - - - - -server-trunk-website - scpexe://people.apache.org/www/james.apache.org/protocols/ - - + +1.6 +UTF-8 +3.3.1.Final +0.7.2 +0.5-SNAPSHOT +3.2 +2.6 +1.7 +3.2.1 +2.5.1 +1.0.0 +4.10 +1.8.3 +1.6.3 + @@ -100,59 +105,59 @@ org.slf4j slf4j-api -1.6.3 +${slf4j.version} compile true - + org.slf4j slf4j-simple -1.6.3 +${slf4j.version} test commons-codec commons-codec -1.5 +${commons-codec.version} commons-lang commons-lang -${version.commons-lang} +${commons-lang.version} - + io.netty netty -3.3.1.Final +${netty.version} org.apache.james apache-james-mailbox-api -${version.mailbox} +${mailbox.version} org.apache.james apache-james-mailbox-api -${version.mailbox} +${mailbox.version} test-jar test - + org.apache.james apache-mime4j-core -${version.apache-mime4j} +${apache-mime4j.version} org.apache.james apache-mime4j-dom -${version.apache-mime4j} +${apache-mime4j.version} - -org.apache.felix -maven-bundle-plugin -2.3.4 - - - org.apache.maven.plugins @@ -226,14 +221,18 @@ - - -1.5 -UTF-8 -2.4 -3.2.1 -0.7 -0.5-SNAPSHOT -2.5.1 - + + + scm:svn:http://svn.apache.org/repos/asf/james/protocols/trunk + scm:svn:https://svn.apache.org/repos/asf/james/protocols/trunk + http://svn.apache.org/viewcvs.cgi/james/protocols/trunk?root=Apache-SVN + + + + +server-trunk-website + scpexe://people.apache.org/www/james.apache.org/protocols/ + + + Modified: james/proto
[jira] [Created] (PROTOCOLS-102) Update dependencies to newer versions
Ioan Eugen Stan created PROTOCOLS-102: - Summary: Update dependencies to newer versions Key: PROTOCOLS-102 URL: https://issues.apache.org/jira/browse/PROTOCOLS-102 Project: James Protocols Issue Type: Sub-task Components: api, imap, lmtp, netty, pop3, sieve, smtp Affects Versions: 1.6.3 Reporter: Ioan Eugen Stan Assignee: Ioan Eugen Stan Fix For: 1.6.3 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Created] (PROTOCOLS-103) Make OSGi bundles out of protocols
Ioan Eugen Stan created PROTOCOLS-103: - Summary: Make OSGi bundles out of protocols Key: PROTOCOLS-103 URL: https://issues.apache.org/jira/browse/PROTOCOLS-103 Project: James Protocols Issue Type: Sub-task Affects Versions: 1.6.3 Reporter: Ioan Eugen Stan Assignee: Ioan Eugen Stan Fix For: 1.6.3 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Updated] (PROTOCOLS-101) OSGi Love
[ https://issues.apache.org/jira/browse/PROTOCOLS-101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ioan Eugen Stan updated PROTOCOLS-101: -- Issue Type: Task (was: Bug) > OSGi Love > - > > Key: PROTOCOLS-101 > URL: https://issues.apache.org/jira/browse/PROTOCOLS-101 > Project: James Protocols > Issue Type: Task > Components: api, imap, lmtp, pop3, smtp >Affects Versions: 1.6.3 >Reporter: Ioan Eugen Stan >Assignee: Ioan Eugen Stan > Fix For: 1.6.3 > > > Make protocols love OSGi -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Created] (PROTOCOLS-101) OSGi Love
Ioan Eugen Stan created PROTOCOLS-101: - Summary: OSGi Love Key: PROTOCOLS-101 URL: https://issues.apache.org/jira/browse/PROTOCOLS-101 Project: James Protocols Issue Type: Bug Components: api, imap, lmtp, pop3, smtp Affects Versions: 1.6.3 Reporter: Ioan Eugen Stan Assignee: Ioan Eugen Stan Fix For: 1.6.3 Make protocols love OSGi -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org