01: /*
02: *
03: * Jsmtpd, Java SMTP daemon
04: * Copyright (C) 2005 Jean-Francois POUX, jf.poux@laposte.net
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License
08: * as published by the Free Software Foundation; either version 2
09: * of the License, or (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19: *
20: */
21: package org.jsmtpd.plugins.filters.builtin;
22:
23: import org.apache.commons.logging.Log;
24: import org.apache.commons.logging.LogFactory;
25: import org.jsmtpd.core.common.PluginInitException;
26: import org.jsmtpd.core.common.filter.IFilter;
27: import org.jsmtpd.core.mail.Email;
28:
29: /**
30: * @author Jean-Francois POUX
31: * Jsmtp
32: * Sample filter.
33: * Returns always true
34: *
35: * @see org.jsmtpd.core.common.filter.IFilter
36: */
37: public class TrueFilter implements IFilter {
38:
39: private Log log = LogFactory.getLog(TrueFilter.class);
40:
41: public boolean doFilter(Email input) {
42: return true;
43: }
44:
45: public String getPluginName() {
46:
47: return "TrueFilter: Always true debug filter plugin for jsmtpd";
48: }
49:
50: /* (non-Javadoc)
51: * @see smtpd.common.IGenericPlugin#initPlugin()
52: */
53: public void initPlugin() throws PluginInitException {
54: log.debug(getPluginName() + " initialized");
55: }
56:
57: /* (non-Javadoc)
58: * @see jsmtpd.common.IGenericPlugin#shutdownPlugin()
59: */
60: public void shutdownPlugin() {
61:
62: }
63:
64: }
|