KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jsmtpd > core > common > acl > IACL


1 /*
2  *
3  * Jsmtpd, Java SMTP daemon
4  * Copyright (C) 2005 Jean-Francois POUX, jf.poux@laposte.net
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * 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
45     /** Is it a valid email adress to relay ? eg user and domain*/
46     public boolean isValidAddress(EmailAddress address);
47
48     /** Is the email in wildcard, eg for a given domain, *@domain.com*/
49     public boolean isValidAddressWildCard(EmailAddress e);
50
51     /** Is the email in our domains, without wildcard on domain */
52     public boolean isValidAddressStandardUser(EmailAddress e);
53
54     /** Is this domain fully relayed ?*/
55     //public boolean isValidDomain(String domain);
56
/** Relayed host, open relay for theses hosts */
57     public boolean isValidRelay(String JavaDoc hostIP);
58     
59 }
Popular Tags