aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.h
diff options
context:
space:
mode:
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