Created attachment 249129 [details] patch file for h/md5.h inc command in japanese/mh fails to connect to APOP server, since the definition of UINT4 may not be correct in h/md5.h for 64 bit OS. The attached patch may fix the problem.
Hello. Thanks for your report! I've reproduced the same problem on my amd64 environment. * Without the patch $ uname -srm FreeBSD 14.0-RELEASE-p5 amd64 $ inc -apop -user bena -host localhost Password (localhost:bena): inc: -ERR [AUTH] authentication failure $ qpopper(8) says: | Mar 25 16:34:16 aquarius-vm qpopper[2688]: Debugging turned on (-d) [pop_init.c:824] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: (v4.1.0) Servicing request from "localhost" at 127.0.0.1 [pop_init.c:1422] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: before TLS; tls_support==0 [popper.c:199] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: Skipped TLS Init [popper.c:223] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: (v4.1.0) Intro [popper.c:273] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: +OK Qpopper (version 4.1.0) at aquarius-vm.sign.local starting. <2688.1711352056@aquarius-vm.sign.local> [popper.c:286] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: Qpopper ready for input from (null) at localhost [127.0.0.1] [popper.c:320] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: Received (42): "APOP bena b22a9ce93c7af8d4bd0ff102de926ca2" [pop_get_command.c:105] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: apop "bena" [pop_apop.c:214] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: ...checknonauthfile didn't match user bena in file /usr/local/etc/qpopper/popusers [pop_pass.c:232] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: home (10): '/home/bena' [pop_apop.c:233] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: bena at localhost (127.0.0.1): -ERR [AUTH] authentication failure [pop_apop.c:369] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: apop returned 0; CurrentState now halt [popper.c:364] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: +OK Pop server at aquarius-vm.sign.local signing off. [popper.c:386] | Mar 25 16:34:16 aquarius-vm qpopper[2688]: (v4.1.0) Ending request from "bena" at (localhost) 127.0.0.1 [popper.c:412] * With the patch inc(1) works correctly with APOP. $ inc -apop -user bena -host localhost Password (localhost:bena): inc: no mail to incorporate $ qpopper(8) says: | Mar 25 16:35:12 aquarius-vm qpopper[2789]: Debugging turned on (-d) [pop_init.c:824] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: (v4.1.0) Servicing request from "localhost" at 127.0.0.1 [pop_init.c:1422] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: before TLS; tls_support==0 [popper.c:199] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: Skipped TLS Init [popper.c:223] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: (v4.1.0) Intro [popper.c:273] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: +OK Qpopper (version 4.1.0) at aquarius-vm.sign.local starting. <2789.1711352112@aquarius-vm.sign.local> [popper.c:286] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: Qpopper ready for input from (null) at localhost [127.0.0.1] [popper.c:320] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: Received (42): "APOP bena 1a02a9120ba982e1e148029e3b51cfe7" [pop_get_command.c:105] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: apop "bena" [pop_apop.c:214] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: ...checknonauthfile didn't match user bena in file /usr/local/etc/qpopper/popusers [pop_pass.c:232] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: home (10): '/home/bena' [pop_apop.c:233] | Mar 25 16:35:12 aquarius-vm qpopper[2789]: APOP authentication ok for "bena" [pop_apop.c:373] (snip) * Rewrite the patch For more portability, I rewrite the patch like this: --- h/md5.h.orig 1999-02-09 11:30:00 UTC +++ h/md5.h @@ -20,11 +20,15 @@ typedef unsigned short int UINT2; typedef unsigned short int UINT2; /* UINT4 defines a four byte word */ +#if 0 #ifndef __alpha typedef unsigned long int UINT4; #else typedef unsigned int UINT4; #endif +#endif +#include <sys/types.h> +typedef uint32_t UINT4; /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it I've tested the new patch on 14.0-RELEASE/amd64, 14.0-RELEASE/i386, and 15-CURRENT/amd64 environment. It works fine.
Created attachment 249697 [details] git diff for japanese/mh * Add files/patch-h_md5.h * Bump PORTREVISION
Created attachment 249698 [details] poudriere testport log on 15-CURRENT (with the new patch)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ab71398319d2b363cc2a89d5fe7b717a0604f31d commit ab71398319d2b363cc2a89d5fe7b717a0604f31d Author: MANTANI Nobutaka <nobutaka@FreeBSD.org> AuthorDate: 2024-08-17 18:11:32 +0000 Commit: MANTANI Nobutaka <nobutaka@FreeBSD.org> CommitDate: 2024-08-17 18:11:32 +0000 japanese/mh: Fix APOP authentication breakage PR: 277664 Reported by: Shigeharu TAKENO <shige@iee.niit.ac.jp> Approved by: WATANABE Kazuhiro <CQG00620@nifty.ne.jp> (maintainer) MFH: 2024Q3 japanese/mh/Makefile | 2 +- japanese/mh/files/patch-h_md5.h (new) | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-)
A commit in branch 2024Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=12aa25a59b0df21c9b055cd9ff870bebad53ccdb commit 12aa25a59b0df21c9b055cd9ff870bebad53ccdb Author: MANTANI Nobutaka <nobutaka@FreeBSD.org> AuthorDate: 2024-08-17 18:11:32 +0000 Commit: MANTANI Nobutaka <nobutaka@FreeBSD.org> CommitDate: 2024-08-17 18:49:41 +0000 japanese/mh: Fix APOP authentication breakage PR: 277664 Reported by: Shigeharu TAKENO <shige@iee.niit.ac.jp> Approved by: WATANABE Kazuhiro <CQG00620@nifty.ne.jp> (maintainer) MFH: 2024Q3 (cherry picked from commit ab71398319d2b363cc2a89d5fe7b717a0604f31d) japanese/mh/Makefile | 2 +- japanese/mh/files/patch-h_md5.h (new) | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-)