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.jsmtpd.core.common.PluginInitException;
24: import org.jsmtpd.core.common.filter.FilterTreeFailureException;
25: import org.jsmtpd.core.common.filter.FilterTreeSuccesException;
26: import org.jsmtpd.core.common.filter.IFilter;
27: import org.jsmtpd.core.mail.Email;
28:
29: /**
30: * Causes the immediate failure of a path in the filter tree
31: * @author Jean-Francois POUX
32: */
33: public class ChainReject implements IFilter {
34:
35: /* (non-Javadoc)
36: * @see org.jsmtpd.core.common.filter.IFilter#doFilter(org.jsmtpd.core.mail.Email)
37: */
38: public boolean doFilter(Email input)
39: throws FilterTreeFailureException,
40: FilterTreeSuccesException {
41: throw new FilterTreeFailureException();
42: }
43:
44: /* (non-Javadoc)
45: * @see org.jsmtpd.core.common.IGenericPlugin#getPluginName()
46: */
47: public String getPluginName() {
48: return "Chain Failure: Filter tree chain failur";
49: }
50:
51: /* (non-Javadoc)
52: * @see org.jsmtpd.core.common.IGenericPlugin#initPlugin()
53: */
54: public void initPlugin() throws PluginInitException {
55:
56: }
57:
58: /* (non-Javadoc)
59: * @see org.jsmtpd.core.common.IGenericPlugin#shutdownPlugin()
60: */
61: public void shutdownPlugin() {
62:
63: }
64:
65: }
|