From 43b83fd767cb4979cd4bdc7610ecddd007f559fb Mon Sep 17 00:00:00 2001 From: Manvendra Bhangui Date: Mon, 5 Feb 2024 09:40:17 +0530 Subject: [PATCH] fixed date field in Received header --- indimail-mta-x/doc/ChangeLog | 4 ++- indimail-mta-x/qmail-queue.c | 9 ++++-- indimail-mta-x/received.c | 58 ++++++++++++++++++------------------ 3 files changed, 38 insertions(+), 33 deletions(-) diff --git a/indimail-mta-x/doc/ChangeLog b/indimail-mta-x/doc/ChangeLog index 3ae4f0d2b8..876ab0800c 100644 --- a/indimail-mta-x/doc/ChangeLog +++ b/indimail-mta-x/doc/ChangeLog @@ -50,12 +50,14 @@ Release @version@-@release@ Start 02/01/2024 End XX/XX/XXXX - 23/01/2024 22. include buffer_defs.h for buffer size definitions (inspired by Erwin Hoffman). -- 31/02/2025 +- 31/01/2025 23. queue-fix.c: exit if file type (regular, dir, fifo) is different from expected 24. queue-fix.c: exit if not running as root 25. svctool.in: link BIGTODO in ezmlm/global_vars to control/global_vars/BIGTODO +- 05/02/2025 +26. received.c, qmail-queue.c: fixed data field in Received header * Mon Jan 01 2024 18:55:50 +0000 Manvendra Bhangui 3.0.6-1.1%{?dist} Release 3.0.6-1.1 Start 25/10/2023 End 01/01/2024 diff --git a/indimail-mta-x/qmail-queue.c b/indimail-mta-x/qmail-queue.c index c7046cdd72..454e54550d 100644 --- a/indimail-mta-x/qmail-queue.c +++ b/indimail-mta-x/qmail-queue.c @@ -1,5 +1,5 @@ /* - * $Id: qmail-queue.c,v 1.93 2024-01-23 01:23:08+05:30 Cprogrammer Exp mbhangui $ + * $Id: qmail-queue.c,v 1.94 2024-02-05 09:38:54+05:30 Cprogrammer Exp mbhangui $ */ #include #include @@ -278,7 +278,7 @@ receivedfmt(char *s, int fastqueue) if (s) s += i; } - i = fmt_str(s, ");\n "); + i = fmt_str(s, "); "); len += i; if (s) s += i; @@ -1191,7 +1191,7 @@ main() void getversion_qmail_queue_c() { - static char *x = "$Id: qmail-queue.c,v 1.93 2024-01-23 01:23:08+05:30 Cprogrammer Exp mbhangui $"; + static char *x = "$Id: qmail-queue.c,v 1.94 2024-02-05 09:38:54+05:30 Cprogrammer Exp mbhangui $"; x = sccsidmakeargsh; x++; @@ -1199,6 +1199,9 @@ getversion_qmail_queue_c() #endif /* * $Log: qmail-queue.c,v $ + * Revision 1.94 2024-02-05 09:38:54+05:30 Cprogrammer + * fixed date field in Received header + * * Revision 1.93 2024-01-23 01:23:08+05:30 Cprogrammer * include buffer_defs.h for buffer size definitions * diff --git a/indimail-mta-x/received.c b/indimail-mta-x/received.c index 7261bce20a..0cd02af3ac 100644 --- a/indimail-mta-x/received.c +++ b/indimail-mta-x/received.c @@ -1,29 +1,5 @@ /* - * $Log: received.c,v $ - * Revision 1.10 2023-10-07 01:26:00+05:30 Cprogrammer - * added parameter hide to hide IP, Host in received headers - * - * Revision 1.9 2023-01-16 23:13:08+05:30 Cprogrammer - * folded received line to put date below - * - * Revision 1.8 2022-10-22 13:08:35+05:30 Cprogrammer - * added program identifier to Received header - * - * Revision 1.7 2021-09-11 19:02:01+05:30 Cprogrammer - * skip remotehost in received headers when value is unknown - * - * Revision 1.6 2020-07-08 09:15:22+05:30 Cprogrammer - * added square brackets in the list of safe characters - * - * Revision 1.5 2004-10-22 20:29:55+05:30 Cprogrammer - * added RCS id - * - * Revision 1.4 2004-09-22 22:26:51+05:30 Cprogrammer - * added underscore to list of safe characters - * - * Revision 1.3 2004-07-17 21:22:34+05:30 Cprogrammer - * added RCS log - * + * $Id: received.c,v 1.9 2024-02-05 09:32:58+05:30 Cprogrammer Exp mbhangui $ */ #include #include @@ -63,8 +39,7 @@ safeput(struct qmail *qqt, char *s) /* * "Received: from relay1.uu.net (HELO uunet.uu.net) (7@192.48.96.5)\n" - * " by silverton.berkeley.edu with SMTP;" - * " 26 Sep 1995 04:46:54 -0000\n" + * " by silverton.berkeley.edu with SMTP; 26 Sep 1995 04:46:54 -0000\n" */ void @@ -103,7 +78,7 @@ received(struct qmail *qqt, char *program, char *protocol, char *local, char *re } qmail_puts(qqt, " with "); qmail_puts(qqt, protocol); - qmail_puts(qqt, ";\n "); + qmail_puts(qqt, "; "); datetime_tai(&dt, now()); qmail_put(qqt, buf, date822fmt(buf, &dt)); } @@ -111,7 +86,32 @@ received(struct qmail *qqt, char *program, char *protocol, char *local, char *re void getversion_received_c() { - static char *x = "$Id: received.c,v 1.10 2023-10-07 01:26:00+05:30 Cprogrammer Exp mbhangui $"; + static char *x = "$Id: received.c,v 1.9 2024-02-05 09:32:58+05:30 Cprogrammer Exp mbhangui $"; x++; } + +/* + * $Log: received.c,v $ + * Revision 1.9 2024-02-05 09:32:58+05:30 Cprogrammer + * added parameter hide to hide IP, Host in received headers + * + * Revision 1.8 2022-10-22 13:08:35+05:30 Cprogrammer + * added program identifier to Received header + * + * Revision 1.7 2021-09-11 19:02:01+05:30 Cprogrammer + * skip remotehost in received headers when value is unknown + * + * Revision 1.6 2020-07-08 09:15:22+05:30 Cprogrammer + * added square brackets in the list of safe characters + * + * Revision 1.5 2004-10-22 20:29:55+05:30 Cprogrammer + * added RCS id + * + * Revision 1.4 2004-09-22 22:26:51+05:30 Cprogrammer + * added underscore to list of safe characters + * + * Revision 1.3 2004-07-17 21:22:34+05:30 Cprogrammer + * added RCS log + * + */