diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2013-01-26 09:50:23 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2013-01-26 09:50:23 +0000 |
commit | 3f6ab773de6afd5c1dabbf9091dfd1fb2e84ccef (patch) | |
tree | 9d0e03321a60debea0fd2d8d1cba71ec4d6c2095 /usr.sbin | |
parent | 30387d8e496eda33c042937ce44c13fe2289e4f9 (diff) |
no longer used
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/filter_api.h | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/usr.sbin/smtpd/filter_api.h b/usr.sbin/smtpd/filter_api.h deleted file mode 100644 index 453a620d90a..00000000000 --- a/usr.sbin/smtpd/filter_api.h +++ /dev/null @@ -1,110 +0,0 @@ -/* $OpenBSD: filter_api.h,v 1.5 2012/11/23 13:54:12 eric Exp $ */ - -/* - * Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <sys/socket.h> - -#include <netdb.h> - -#define FILTER_API_VERSION 50 - -#define MAX_LINE_SIZE 2048 -#define MAX_LOCALPART_SIZE 64 -#define MAX_DOMAINPART_SIZE 255 - -enum filter_status { - STATUS_IGNORE, - STATUS_REJECT, - STATUS_ACCEPT, - STATUS_WAITING -}; - -enum filter_type { - FILTER_CONNECT = 0x001, - FILTER_HELO = 0x002, - FILTER_EHLO = 0x004, - FILTER_MAIL = 0x008, - FILTER_RCPT = 0x010, - FILTER_DATALINE = 0x020, - FILTER_QUIT = 0x040, - FILTER_CLOSE = 0x080, - FILTER_RSET = 0x100, -}; - -struct filter_connect { - char hostname[MAXHOSTNAMELEN]; - struct sockaddr_storage hostaddr; -}; - -struct filter_helo { - char helohost[MAXHOSTNAMELEN]; -}; - -struct filter_mail { - char user[MAX_LOCALPART_SIZE]; - char domain[MAX_DOMAINPART_SIZE]; -}; - -struct filter_rcpt { - char user[MAX_LOCALPART_SIZE]; - char domain[MAX_DOMAINPART_SIZE]; -}; - -struct filter_dataline { - char line[MAX_LINE_SIZE]; -}; - -union filter_union { - struct filter_connect connect; - struct filter_helo helo; - struct filter_mail mail; - struct filter_rcpt rcpt; - struct filter_dataline dataline; -}; - -struct filter_msg { - uint64_t id; /* set by smtpd(8) */ - uint64_t cl_id; /* set by smtpd(8) */ - int8_t code; - uint8_t version; - enum filter_type type; - union filter_union u; -}; - -/**/ -void filter_init(void); -void filter_loop(void); - -void filter_register_connect_callback(enum filter_status - (*)(uint64_t, struct filter_connect *, void *), void *); -void filter_register_helo_callback(enum filter_status - (*)(uint64_t, struct filter_helo *, void *), void *); -void filter_register_ehlo_callback(enum filter_status - (*)(uint64_t, struct filter_helo *, void *), void *); -void filter_register_mail_callback(enum filter_status - (*)(uint64_t, struct filter_mail *, void *), void *); -void filter_register_rcpt_callback(enum filter_status - (*)(uint64_t, struct filter_rcpt *, void *), void *); -void filter_register_dataline_callback(enum filter_status - (*)(uint64_t, struct filter_dataline *, void *), void *); -void filter_register_quit_callback(enum filter_status - (*)(uint64_t, void *), void *); -void filter_register_close_callback(enum filter_status - (*)(uint64_t, void *), void *); -void filter_register_rset_callback(enum filter_status - (*)(uint64_t, void *), void *); - |