summaryrefslogtreecommitdiff
path: root/clients/zmailnotify
diff options
context:
space:
mode:
authorGravatar Lucien Van Elsen <lwvanels@mit.edu>1992-02-15 18:14:27 +0000
committerGravatar Lucien Van Elsen <lwvanels@mit.edu>1992-02-15 18:14:27 +0000
commitfcca691707e68bbd3c47b094de114762e6c3088c (patch)
tree142ac1723e0130ed2fe5a217c9143e669d752d5a /clients/zmailnotify
parent7d97c2a57318a052d5bd8160cf08ec9736f65acf (diff)
use POP3 TOP command instead of RETR if HAVE_POP3_TOP is defined;
reduces load on server by not getting whole message just for subject lines.
Diffstat (limited to 'clients/zmailnotify')
-rw-r--r--clients/zmailnotify/zmailnotify.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/clients/zmailnotify/zmailnotify.c b/clients/zmailnotify/zmailnotify.c
index f3f6049..3eb4f75 100644
--- a/clients/zmailnotify/zmailnotify.c
+++ b/clients/zmailnotify/zmailnotify.c
@@ -287,7 +287,7 @@ void get_message(i)
int i;
{
int mbx_write();
- if (pop_retr(i, mbx_write, 0) != OK)
+ if (pop_scan(i, mbx_write, 0) != OK)
fatal_pop_err ();
}
@@ -527,12 +527,16 @@ int *nmsgs, *nbytes;
}
}
-pop_retr(msgno, action, arg)
+pop_scan(msgno, action, arg)
int (*action)();
{
char buf[4096];
+#ifdef HAVE_POP3_TOP
+ (void) sprintf(buf, "TOP %d 0", msgno);
+#else
(void) sprintf(buf, "RETR %d", msgno);
+#endif
if (putline(buf, Errmsg, sfo) == NOTOK) return(NOTOK);
if (getline(buf, sizeof buf, sfi) != OK) {
@@ -632,7 +636,7 @@ FILE *f;
/*ARGSUSED*/
mbx_write(line, dummy)
char *line;
-int dummy; /* for consistency with pop_retr */
+int dummy; /* for consistency with pop_scan */
{
if (mailptr) {
mailptr = realloc(mailptr,(unsigned)(strlen(mailptr)+strlen(line)+2));