aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-19 22:51:40 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-19 22:51:40 +0000
commitc2e4e19e14c9f497aeb007165483e2a7bbc993f5 (patch)
treeb2984dbd7e8dcfd99340d331cc7551b7b945a9f1 /fetchmail.h
parent44662d84a40cd668c97e9aa821a6caeb9da9488a (diff)
downloadfetchmail-c2e4e19e14c9f497aeb007165483e2a7bbc993f5.tar.gz
fetchmail-c2e4e19e14c9f497aeb007165483e2a7bbc993f5.tar.bz2
fetchmail-c2e4e19e14c9f497aeb007165483e2a7bbc993f5.zip
Abstract out some protocol properties.
svn path=/trunk/; revision=3129
Diffstat (limited to 'fetchmail.h')
-rw-r--r--fetchmail.h11
1 files changed, 10 insertions, 1 deletions
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