[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #16 from Andrew Aitchison --- Created attachment 1438 --> https://bugs.exim.org/attachment.cgi?id=1438=edit Mention exim_msgdate in ChangeLog and NewStuff Mention exim_msgdate in ChangeLog and NewStuff -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 Jeremy Harris changed: What|Removed |Added Version|4.97|4.96 Target Milestone|Exim 4.96 |Exim 4.97 -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 Jeremy Harris changed: What|Removed |Added Version|4.96+ |4.97 -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 Jeremy Harris changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #15 from Jeremy Harris --- Thanks. Committed as 7b5fe03f9c6c. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #14 from Andrew Aitchison --- > --- Comment #12 from Jeremy Harris --- > Looking good. One issue in timezone handling: > > $eximdir/exim_msgdate -C /data/jgh/git/exim/test/test-config > 1pEPHo-005xgk-2e > 2023-01-08 06:36:04.082000 GMT > $ TZ=PDT eximdir/exim_msgdate -C /data/jgh/git/exim/test/test-config > 1pEPHo-005xgk-2e > 2023-01-08 06:36:04.082000 PDT Do you have a PDT zoneinfo file ? I don't but do have PST8PDT, and $ TZ=PST8PDT ~eximtest/git/Exim/exim/src/build-Linux-x86_64/exim_msgdate 1pEPHo-005xgk-2e 2023-01-07 22:36:04.082000 PST This is going to bite other users, so I check that the environment variables in man tzset are sane. With patch 1437 (as well as 1436) I now get $ TZ=PDT ~eximtest/git/Exim/exim/src/build-Linux-x86_64/exim_msgdate 1pEPHo-005xgk-2e Cannot read timezone file /usr/share/zoneinfo/PDT (from TZDIR/TZ) 'man tzset' may help. 2023-01-08 06:36:04.082000 PDT -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #13 from Andrew Aitchison --- Created attachment 1437 --> https://bugs.exim.org/attachment.cgi?id=1437=edit timezone.sanity.patch -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #12 from Jeremy Harris --- Looking good. One issue in timezone handling: $eximdir/exim_msgdate -C /data/jgh/git/exim/test/test-config 1pEPHo-005xgk-2e 2023-01-08 06:36:04.082000 GMT $ TZ=PDT eximdir/exim_msgdate -C /data/jgh/git/exim/test/test-config 1pEPHo-005xgk-2e 2023-01-08 06:36:04.082000 PDT $ -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 Andrew Aitchison changed: What|Removed |Added Attachment #1435|0 |1 is obsolete|| --- Comment #11 from Andrew Aitchison --- Created attachment 1436 --> https://bugs.exim.org/attachment.cgi?id=1436=edit Revised complete patch against current exim master I think this is complete now. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 John Jetmore changed: What|Removed |Added CC||j...@pobox.com --- Comment #9 from John Jetmore --- (In reply to Jeremy Harris from comment #8) > (In reply to Andrew Aitchison from comment #7) > > > Also, do we know the name of the exim executable at make time ? > > I think $(BIN_DIRECTORY) gives us the path, but Debian and Ubuntu change the > > name to exim4. > > Sigh, good point. Maybe yet another build-config item, to handle such > bloody-awkward distros (Exim version 3 was twenty years ago, dammit). > But given the below, moot. I perked up at this because I thought it was a perl question I could help with but I now realize it's not. Apologies if I am addressing a different issue than what is asked. I think what you are saying is "exim_msgdate needs to call exim, which it refers to as 'BIN_DIRECTORY/exim', with BIN_DIRECTORY getting replaced by the build process. Therefore how does the build process handle distros that use a different binary name than exim4" Assuming I read that right, the correct answer is it's not the exim distro's problem. There are already tools like this (see exiqgrep.src), and they are handled by the packager who chooses to change the binary name, as is proper (see https://sources.debian.org/src/exim4/4.96-13/src/exiqgrep.src/ which refers to BIN_DIRECTORY/exim4) -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 Jasen Betts changed: What|Removed |Added CC||ja...@treshna.com --- Comment #10 from Jasen Betts --- Debian provides /usr/sbin/exim as a symlink to /usr/sbin/exim4. so you probably don't need to worry about exim4 because "exim" should work for most purposes. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #8 from Jeremy Harris --- (In reply to Andrew Aitchison from comment #7) > > It's using a hardwired config file path, at least in the testsuite. > > Noticing the -C the testharness gave it would be good; > > I've got that working, which confuses me. I had expected that to pass one of > the configs in test/confs/ It does; the one you supplied as confs/0700 - but the code picks up the -C option and ignores it. The hardcoded file is just after a commented-out "die". > > > but for production use - how about using `exim -bP localhost_number' > > as a default for no "-C foo" given? > > That makes some sense, but exim_msgtime has perl taint set, so I cannot > easily run a binary by name given as an argument. I was assuming exim in $PATH - but I don't know how perl taint restricts that. > Also, do we know the name of the exim executable at make time ? > I think $(BIN_DIRECTORY) gives us the path, but Debian and Ubuntu change the > name to exim4. Sigh, good point. Maybe yet another build-config item, to handle such bloody-awkward distros (Exim version 3 was twenty years ago, dammit). But given the below, moot. > It isn't working in attachment 1435 [details], but after a bug-fix, the > build now correctly writes the configfile list into the script and I can > search that for localhost_number. That'll be fine apart from the testsuite, which needs the -C value to take precedence. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #7 from Andrew Aitchison --- > It's using a hardwired config file path, at least in the testsuite. > Noticing the -C the testharness gave it would be good; I've got that working, which confuses me. I had expected that to pass one of the configs in test/confs/ > but for production use - how about using `exim -bP localhost_number' > as a default for no "-C foo" given? That makes some sense, but exim_msgtime has perl taint set, so I cannot easily run a binary by name given as an argument. Also, do we know the name of the exim executable at make time ? I think $(BIN_DIRECTORY) gives us the path, but Debian and Ubuntu change the name to exim4. It isn't working in attachment 1435, but after a bug-fix, the build now correctly writes the configfile list into the script and I can search that for localhost_number. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #5 from Andrew Aitchison --- Created attachment 1435 --> https://bugs.exim.org/attachment.cgi?id=1435=edit exim_msgdate utility Thought I might as well give you the patch. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #6 from Jeremy Harris --- - It's using a hardwired config file path, at least in the testsuite. Noticing the -C the testharness gave it would be good; but for production use - how about using `exim -bP localhost_number' as a default for no "-C foo" given? - I like single-char options where feasible, at least for common-use ones. Maybe "-z" as an alternate for --zulu, as sed bu exim_dumpdb? Also the help text should define the default. - On the name, I'm easy. exim_msgdate is as good as any. - Makefile/shell syntax - we'll run with that until we find a platform that can't handle it. - Are you OK with GPLv2-or-later? Needs an SPDX line. - Some verbiage in doc/doc-doc-book/spec.xfpt please. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #3 from Andrew Aitchison --- I have a patch ready to submit, but I am not sure what to call the utility. My working name is exim_msgdate but it should really have "msgid" in it. eximmsgiddate has doubled letters in the wrong places. Existing tools start with exi_ (exim_checkaccess exim_dbmbuild exim_dumpdb exim_fixdb exim_lock exim_msgdate eximstats exim_tidydb) exi (exicyclog exigrep exinext exipick exiqgrep exiqsumm exiwhat) or exim (eximstats) so perhaps exi_msgid_date ? I have had to use the new (to exim build) feature ${parameter:-word} in the make shell script of src/OS/Makefile-Base. What shells are used inside make on the various platforms ? set BASE_62=36 echo BASE_62 | sed -e "s?BASE_62?${BASE_62:-62}?" gives 36 on the shells I've tested (bash, dash = sh, ksh on Ubuntu 22:10 and bash and sh on RedHat 6!) but these are modern, posix-type shells. Can anyone test this on the other platforms on the build farm ? Use Or should I just submit the patch as it is ? -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #4 from Andrew Aitchison --- Oops. Accidentally submitted the previous comment prematurely. Part 2 should have included the suggestion: Use echo BASE_62 | sed -e "s?BASE_62?$${BASE_62:-62}?" with doubled $ if you test inside a Makefile. Still interested in thoughts on the utilitiy's name. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 --- Comment #2 from Jeremy Harris --- Hmm, yes, that will indeed make the testsuite awkward. That's the right set of lines to be bypassing in runtest. Options are parsed around line 3060. Add a bit in README about the optinn you invent. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 Andrew Aitchison changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #1 from Andrew Aitchison --- exim/test/runtest munges test output. Lines 496-499 say: # Dates and times are all turned into the same value - trying to turn # them into different ones cannot be done repeatedly because they are # real time stamps generated while running the test. The actual date and # time used was fixed when I first started running automatic Exim tests. ... which makes the test suite almost useless for this application, though we can still use it to test command line arguments. I may attempt to add an option to the test suite to disable this feature :-( -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 2956] util to convert message id to human-readable time
https://bugs.exim.org/show_bug.cgi?id=2956 Andrew Aitchison changed: What|Removed |Added CC||e...@aitchison.me.uk Assignee|unalloca...@exim.org|e...@aitchison.me.uk -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##