From c2e4e19e14c9f497aeb007165483e2a7bbc993f5 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 19 Feb 2001 22:51:40 +0000 Subject: Abstract out some protocol properties. svn path=/trunk/; revision=3129 --- fetchmail.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'fetchmail.h') diff --git a/fetchmail.h b/fetchmail.h index 1bbf7db3..e78e2121 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -15,6 +15,15 @@ #define P_ETRN 7 #define P_ODMR 8 +/* + * We need to distinguish between mailbox and mailbag protocols. + * Under a mailbox protocol wwe're pulling mail for a speecific user + * and the transaction must be authenticated. Under a mailbag protocol + * we're fetching mail for an entire domain; the client and server + * authenticate to each other but no per-user authentication is needed. + */ +#define MAILBOX_PROTOCOL(ctl) ((ctl)->server.protocol < P_ETRN) + #if INET6_ENABLE #define SMTP_PORT "smtp" #define KPOP_PORT "kpop" @@ -37,7 +46,7 @@ #define A_SSH 5 /* authentication at session level */ /* some protocols (KERBEROS, GSSAPI, SSH) don't require a password */ -#define NO_PASSWORD(ctl) ((ctl)->server.authenticate > A_PASSWORD || (ctl)->server.protocol >= P_ETRN) +#define NO_PASSWORD(ctl) ((ctl)->server.authenticate > A_PASSWORD || !MAILBOX_PROTOCOL(ctl)) /* * Definitions for buffer sizes. We get little help on setting maxima -- cgit v1.2.3