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.core.common.acl;
22:
23: import org.jsmtpd.core.common.IGenericPlugin;
24: import org.jsmtpd.core.mail.EmailAddress;
25:
26: /**
27: * <b>Pluggin interface for input filtering</b><br><br>
28: * Implement this interface to provide your custom acces control list.<br>
29: * Then, change AclPluggin to match the name of your class,
30: * it will be automaticly loaded upon server startup.<br>
31: * <br>
32: * <b>Warning</b> : One instance of your ACL will be created. It will be
33: * accessed for multiple threads. Think it thread safe.<br>
34: * Methods are not marked synchronized, as basic implementations may
35: * not need to care about thread concurency.<br>
36: * <br>
37: * All host names are FQDN, the server will resolve to ip adresses when needed.
38: *
39: * @author Jean-Francois POUX
40: *
41: */
42: public interface IACL extends IGenericPlugin {
43:
44: /** Is it a valid email adress to relay ? eg user and domain*/
45: public boolean isValidAddress(EmailAddress address);
46:
47: /** Is the email in wildcard, eg for a given domain, *@domain.com*/
48: public boolean isValidAddressWildCard(EmailAddress e);
49:
50: /** Is the email in our domains, without wildcard on domain */
51: public boolean isValidAddressStandardUser(EmailAddress e);
52:
53: /** Is this domain fully relayed ?*/
54: //public boolean isValidDomain(String domain);
55: /** Relayed host, open relay for theses hosts */
56: public boolean isValidRelay(String hostIP);
57:
58: }
|