diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2014-07-08 20:14:47 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2014-07-08 20:14:47 +0000 |
commit | dabb8bdea25ca10afe056d2acd84b6828bcff328 (patch) | |
tree | 8b7891a5e98d338040387b54e01db3bd30774eaa | |
parent | 699e3bc7dd53537f2d22f0dca8a458d927d59c90 (diff) |
get rid of mfa leftovers
-rw-r--r-- | usr.sbin/smtpd/pony.c | 3 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 28 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpctl.c | 6 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 8 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 28 |
5 files changed, 23 insertions, 50 deletions
diff --git a/usr.sbin/smtpd/pony.c b/usr.sbin/smtpd/pony.c index b61d29720fe..8da3f6bfd2a 100644 --- a/usr.sbin/smtpd/pony.c +++ b/usr.sbin/smtpd/pony.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pony.c,v 1.5 2014/05/01 15:50:20 reyk Exp $ */ +/* $OpenBSD: pony.c,v 1.6 2014/07/08 20:14:46 eric Exp $ */ /* * Copyright (c) 2014 Gilles Chehade <gilles@poolp.org> @@ -78,7 +78,6 @@ pony_imsg(struct mproc *p, struct imsg *imsg) case IMSG_SMTP_AUTHENTICATE: case IMSG_SMTP_SSL_INIT: case IMSG_SMTP_SSL_VERIFY: - case IMSG_MFA_SMTP_RESPONSE: case IMSG_SMTP_MESSAGE_COMMIT: case IMSG_SMTP_MESSAGE_CREATE: case IMSG_SMTP_MESSAGE_OPEN: diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 6f94ff7fd7a..c0e47f88218 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.213 2014/07/08 07:59:31 sobrado Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.214 2014/07/08 20:14:46 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -631,7 +631,7 @@ smtp_mfa_response(struct smtp_session *s, int msg, int status, uint32_t code, { struct ca_cert_req_msg req_ca_cert; - if (status == MFA_CLOSE) { + if (status == FILTER_CLOSE) { code = code ? code : 421; line = line ? line : "Temporary failure"; smtp_reply(s, "%d %s", code, line); @@ -643,7 +643,7 @@ smtp_mfa_response(struct smtp_session *s, int msg, int status, uint32_t code, switch (msg) { case IMSG_SMTP_REQ_CONNECT: - if (status != MFA_OK) { + if (status != FILTER_OK) { log_info("smtp-in: Disconnecting session %016" PRIx64 ": rejected by filter", s->id); smtp_free(s, "rejected by filter"); @@ -667,7 +667,7 @@ smtp_mfa_response(struct smtp_session *s, int msg, int status, uint32_t code, return; case IMSG_SMTP_REQ_HELO: - if (status != MFA_OK) { + if (status != FILTER_OK) { code = code ? code : 530; line = line ? line : "Hello rejected"; smtp_reply(s, "%d %s", code, line); @@ -699,7 +699,7 @@ smtp_mfa_response(struct smtp_session *s, int msg, int status, uint32_t code, return; case IMSG_SMTP_REQ_MAIL: - if (status != MFA_OK) { + if (status != FILTER_OK) { code = code ? code : 530; line = line ? line : "Sender rejected"; smtp_reply(s, "%d %s", code, line); @@ -714,7 +714,7 @@ smtp_mfa_response(struct smtp_session *s, int msg, int status, uint32_t code, return; case IMSG_SMTP_REQ_RCPT: - if (status != MFA_OK) { + if (status != FILTER_OK) { code = code ? code : 530; line = line ? line : "Recipient rejected"; smtp_reply(s, "%d %s", code, line); @@ -737,7 +737,7 @@ smtp_mfa_response(struct smtp_session *s, int msg, int status, uint32_t code, return; case IMSG_SMTP_REQ_DATA: - if (status != MFA_OK) { + if (status != FILTER_OK) { code = code ? code : 530; line = line ? line : "Message rejected"; smtp_reply(s, "%d %s", code, line); @@ -752,7 +752,7 @@ smtp_mfa_response(struct smtp_session *s, int msg, int status, uint32_t code, return; case IMSG_SMTP_REQ_EOM: - if (status != MFA_OK) { + if (status != FILTER_OK) { code = code ? code : 530; line = line ? line : "Message rejected"; smtp_reply(s, "%d %s", code, line); @@ -1920,37 +1920,37 @@ smtp_filter_disconnect(struct smtp_session *s) static void smtp_filter_connect(struct smtp_session *s, struct sockaddr *sa) { - smtp_mfa_response(s, IMSG_SMTP_REQ_CONNECT, MFA_OK, 0, NULL); + smtp_mfa_response(s, IMSG_SMTP_REQ_CONNECT, FILTER_OK, 0, NULL); } static void smtp_filter_eom(struct smtp_session *s) { - smtp_mfa_response(s, IMSG_SMTP_REQ_EOM, MFA_OK, 0, NULL); + smtp_mfa_response(s, IMSG_SMTP_REQ_EOM, FILTER_OK, 0, NULL); } static void smtp_filter_helo(struct smtp_session *s) { - smtp_mfa_response(s, IMSG_SMTP_REQ_HELO, MFA_OK, 0, NULL); + smtp_mfa_response(s, IMSG_SMTP_REQ_HELO, FILTER_OK, 0, NULL); } static void smtp_filter_mail(struct smtp_session *s) { - smtp_mfa_response(s, IMSG_SMTP_REQ_MAIL, MFA_OK, 0, NULL); + smtp_mfa_response(s, IMSG_SMTP_REQ_MAIL, FILTER_OK, 0, NULL); } static void smtp_filter_rcpt(struct smtp_session *s) { - smtp_mfa_response(s, IMSG_SMTP_REQ_RCPT, MFA_OK, 0, NULL); + smtp_mfa_response(s, IMSG_SMTP_REQ_RCPT, FILTER_OK, 0, NULL); } static void smtp_filter_data(struct smtp_session *s) { - smtp_mfa_response(s, IMSG_SMTP_REQ_DATA, MFA_OK, 0, NULL); + smtp_mfa_response(s, IMSG_SMTP_REQ_DATA, FILTER_OK, 0, NULL); } #define CASE(x) case x : return #x diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index 6abdf61b655..3a591d60921 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.122 2014/07/07 09:11:24 eric Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.123 2014/07/08 20:14:46 eric Exp $ */ /* * Copyright (c) 2013 Eric Faurot <eric@openbsd.org> @@ -1134,8 +1134,8 @@ str_to_trace(const char *str) return TRACE_IO; if (!strcmp(str, "smtp")) return TRACE_SMTP; - if (!strcmp(str, "mfa")) - return TRACE_MFA; + if (!strcmp(str, "filters")) + return TRACE_FILTERS; if (!strcmp(str, "mta")) return TRACE_MTA; if (!strcmp(str, "bounce")) diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index e1a2e7c5658..0070b7ff82c 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.228 2014/07/08 13:49:09 eric Exp $ */ +/* $OpenBSD: smtpd.c,v 1.229 2014/07/08 20:14:46 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -520,8 +520,8 @@ main(int argc, char *argv[]) else if (!strcmp(optarg, "mfa") || !strcmp(optarg, "filter") || !strcmp(optarg, "filters")) - verbose |= TRACE_MFA; - else if (!strcmp(optarg, "mta") || + verbose |= TRACE_FILTERS; + else if (!strcmp(optarg, "filters") || !strcmp(optarg, "transfer")) verbose |= TRACE_MTA; else if (!strcmp(optarg, "bounce") || @@ -1420,8 +1420,6 @@ imsg_to_str(int type) CASE(IMSG_MDA_KILL); CASE(IMSG_MDA_OPEN_MESSAGE); - CASE(IMSG_MFA_SMTP_RESPONSE); - CASE(IMSG_MTA_DELIVERY_OK); CASE(IMSG_MTA_DELIVERY_TEMPFAIL); CASE(IMSG_MTA_DELIVERY_PERMFAIL); diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index b9148c88e5c..5f80e9044f5 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.463 2014/07/08 15:45:32 eric Exp $ */ +/* $OpenBSD: smtpd.h,v 1.464 2014/07/08 20:14:46 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -591,7 +591,7 @@ struct smtpd { #define TRACE_IMSG 0x0002 #define TRACE_IO 0x0004 #define TRACE_SMTP 0x0008 -#define TRACE_MFA 0x0010 +#define TRACE_FILTERS 0x0010 #define TRACE_MTA 0x0020 #define TRACE_BOUNCE 0x0040 #define TRACE_SCHEDULER 0x0080 @@ -1002,12 +1002,6 @@ struct bounce_req_msg { struct delivery_bounce bounce; }; -enum mfa_resp_status { - MFA_OK, - MFA_FAIL, - MFA_CLOSE, -}; - enum dns_error { DNS_OK = 0, DNS_RETRY, @@ -1180,24 +1174,6 @@ void mda_postprivdrop(void); void mda_imsg(struct mproc *, struct imsg *); -/* mfa.c */ -pid_t mfa(void); -void mfa_ready(void); - - -/* mfa_session.c */ -void mfa_filter_prepare(void); -void mfa_filter_init(void); -void mfa_filter_connect(uint64_t, const struct sockaddr *, - const struct sockaddr *, const char *); -void mfa_filter_mailaddr(uint64_t, int, const struct mailaddr *); -void mfa_filter_line(uint64_t, int, const char *); -void mfa_filter_eom(uint64_t, int, size_t); -void mfa_filter(uint64_t, int); -void mfa_filter_event(uint64_t, int); -void mfa_build_fd_chain(uint64_t, int); - - /* mproc.c */ int mproc_fork(struct mproc *, const char*, char **); void mproc_init(struct mproc *, int); |