shithub: front

Download patch

ref: 8d69e5afcd1fd047ba78cbf93f1ca225d6f92938
parent: 66d17e5256e3f8554b42c208572653253783e8d5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jul 12 13:05:23 EDT 2025

imap4d: make BYE message upper case (thanks saeed)

from saeeds original patch:

> this would fix python's imap4lib (and thus, rss2email)
> to communicate with out servers, it might break other stuff however.

patch amended:

- make it uppersase also in bye() function
- add space after BYE response (some clients appear to have issues otherwise)

--- a/sys/src/cmd/upas/imap4d/imap4d.c
+++ b/sys/src/cmd/upas/imap4d/imap4d.c
@@ -365,7 +365,7 @@
 	va_list arg;
 
 	va_start(arg, fmt);
-	Bprint(&bout, "* bye ");
+	Bprint(&bout, "* BYE ");
 	Bvprint(&bout, fmt, arg);
 	Bprint(&bout, "\r\n");
 	Bflush(&bout);
@@ -993,8 +993,9 @@
 		closebox(selected, 1);
 		selected = nil;
 	}
-	Bprint(&bout, "* bye\r\n");
+	Bprint(&bout, "* BYE \r\n");
 	Bprint(&bout, "%s OK %s completed\r\n", tg, cmd);
+	Bflush(&bout);
 	exits(0);
 }
 
--