1 package org.columba.mail.spam.spamassassin; 2 import java.io.File ; 3 import java.net.MalformedURLException ; 4 import java.net.URL ; 5 6 import org.columba.core.base.OSInfo; 7 import org.columba.core.gui.externaltools.AbstractExternalToolsPlugin; 8 9 10 13 public class SpamAssassinExternalToolPlugin extends AbstractExternalToolsPlugin { 14 protected static URL websiteURL; 15 16 static { 17 try { 18 websiteURL = new URL ("http://www.spamassassin.org/"); 19 } catch (MalformedURLException mue) { 20 } 21 } 23 24 File defaultLinux = new File ("/usr/bin/spamassassin"); 25 File defaultLocalLinux = new File ("/usr/local/bin/spamassassin"); 26 27 public SpamAssassinExternalToolPlugin() { 28 super(); 29 } 30 31 public String getDescription() { 32 return "<html><body><p>spamassassin - mail filter to identify spam using text analysis</p></body></html>"; 33 } 34 35 public URL getWebsite() { 36 return websiteURL; 37 } 38 39 public File locate() { 40 44 if (OSInfo.isLinux() || OSInfo.isSolaris()) { 45 if (defaultLinux.exists()) { 46 return defaultLinux; 47 } else if (defaultLocalLinux.exists()) { 48 return defaultLocalLinux; 49 } 50 } 51 52 return null; 53 } 54 } 55 | Popular Tags |