diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | odmr.c | 13 |
2 files changed, 13 insertions, 1 deletions
@@ -9,6 +9,7 @@ * Patch to dusable use of STLS if auth passwd is specified. * Fix specfile generation to handle SSL correctly. * New Danish, Turkish, and Catalan translation files. +* Improved ODMR debug messages. fetchmail-6.1.0 (Sun Sep 22 18:31:23 EDT 2002), 21999 lines: @@ -48,6 +48,7 @@ static int odmr_getrange(int sock, struct query *ctl, const char *id, /* send ODMR and then run a reverse SMTP session */ { int ok, opts, smtp_sock; + int doing_smtp_data = 0; /* Are we in SMTP DATA state? */ char buf [MSGBUFSIZE+1]; struct idlist *qnp; /* pointer to Q names */ @@ -165,7 +166,7 @@ static int odmr_getrange(int sock, struct query *ctl, const char *id, break; SockWrite(smtp_sock, buf, n); - if (outlevel >= O_MONITOR) + if (outlevel >= O_MONITOR && !doing_smtp_data) report(stdout, "ODMR< %s", buf); } if (FD_ISSET(smtp_sock, &readfds)) @@ -177,6 +178,16 @@ static int odmr_getrange(int sock, struct query *ctl, const char *id, SockWrite(sock, buf, n); if (outlevel >= O_MONITOR) report(stdout, "ODMR> %s", buf); + + /* We are about to receive message data if the local MTA + * sends 354 (after receiving DATA) */ + if (!doing_smtp_data && !strncmp(buf, "354", 3)) + { + doing_smtp_data = 1; + report(stdout, "receiving message data\n"); + } + else if (doing_smtp_data) + doing_smtp_data = 0; } } SockClose(smtp_sock); |