From: "Massimo S." Received: from [192.168.100.201] (HELO mail.2rosenthals.com) by 2rosenthals.com (CommuniGate Pro SMTP 5.4.10) with ESMTP id 11075096 for ecs-isp@2rosenthals.com; Fri, 11 Oct 2024 19:41:17 -0400 Received: from secmgr-va.2rosenthals.com ([50.73.8.217]:49890 helo=mail2.2rosenthals.com) by mail.2rosenthals.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1szPFa-000000001h4-1t20 for ecs-isp@2rosenthals.com; Fri, 11 Oct 2024 19:40:51 -0400 Received: from mail2.quasarbbs.net ([80.86.52.115]:10199) by mail2.2rosenthals.com with esmtp (Exim 4.97.1) (envelope-from ) id 1szPFU-000000006T4-1BaE for ecs-isp@2rosenthals.com; Fri, 11 Oct 2024 19:40:45 -0400 X-SASI-Hits: BODY_SIZE_4000_4999 0.000000, BODY_SIZE_5000_LESS 0.000000, BODY_SIZE_7000_LESS 0.000000, BZ_TLD 0.500000, CS_SUSP_TLD_BODY 0.000000, CTE_7BIT 0.000000, HTML_00_01 0.050000, HTML_00_10 0.050000, IN_REP_TO 0.000000, LEGITIMATE_SIGNS 0.000000, MSGID_SAMEAS_FROM_HEX_844412 0.100000, MSG_THREAD 0.000000, NO_URI_HTTPS 0.000000, REFERENCES 0.000000, REPLYTO_SAMEAS_FROM 0.000000, SENDER_NO_AUTH 0.000000, SUSP_DH_NEG 0.000000, TO_IN_SUBJECT 0.500000, USER_AGENT 0.000000, __ANY_URI 0.000000, __BODY_NO_MAILTO 0.000000, __BOUNCE_CHALLENGE_SUBJ 0.000000, __BOUNCE_NDR_SUBJ_EXEMPT 0.000000, __CP_URI_IN_BODY 0.000000, __CT 0.000000, __CTE 0.000000, __CT_TEXT_PLAIN 0.000000, __DQ_NEG_DOMAIN 0.000000, __DQ_NEG_HEUR 0.000000, __DQ_NEG_IP 0.000000, __FORWARDED_MSG 0.000000, __FRAUD_COMMON 0.000000, __FRAUD_MONEY_CURRENCY 0.000000, __FRAUD_MONEY_CURRENCY_DOLLAR 0.000000, __FRAUD_REPLY 0.000000, __FROM_DOMAIN_NOT_IN_BODY 0.000000, __FROM_NAME_NOT_IN_ADDR 0.000000, __FROM_NAME_NOT_IN_BODY 0.000000, __FUR_HEADER 0.000000, __HAS_FROM 0.000000, __HAS_MSGID 0.000000, __HAS_REFERENCES 0.000000, __HAS_REPLYTO 0.000000, __HEADER_ORDER_FROM 0.000000, __IN_REP_TO 0.000000, __MAIL_CHAIN 0.000000, __MIME_BOUND_CHARSET 0.000000, __MIME_TEXT_ONLY 0.000000, __MIME_TEXT_P 0.000000, __MIME_TEXT_P1 0.000000, __MIME_VERSION 0.000000, __MOZILLA_USER_AGENT 0.000000, __MSGID_HEX_844412 0.000000, __MULTIPLE_URI_TEXT 0.000000, __NO_HTML_TAG_RAW 0.000000, __REFERENCES 0.000000, __REPLYTO_SAMEAS_FROM_ACC 0.000000, __REPLYTO_SAMEAS_FROM_ADDY 0.000000, __REPLYTO_SAMEAS_FROM_DOMAIN 0.000000, __SANE_MSGID 0.000000, __SCAN_D_NEG 0.000000, __SCAN_D_NEG2 0.000000, __SCAN_D_NEG_HEUR 0.000000, __SCAN_D_NEG_HEUR2 0.000000, __SUBJ_ALPHA_NEGATE 0.000000, __SUBJ_REPLY 0.000000, __TO_IN_SUBJECT 0.000000, __TO_MALFORMED_2 0.000000, __TO_NAME 0.000000, __TO_NAME_DIFF_FROM_ACC 0.000000, __TO_REAL_NAMES 0.000000, __URI_IN_BODY 0.000000, __URI_MAILTO 0.000000, __URI_NOT_IMG 0.000000, __URI_NS 0.000000, __URI_WITHOUT_PATH 0.000000, __URI_WITH_PATH 0.000000, __USER_AGENT 0.000000, __WEBINAR_PHRASE 0.000000 X-SASI-Probability: 13% X-SASI-RCODE: 200 X-SASI-Version: Antispam-Engine: 5.1.4, AntispamData: 2024.10.11.230916 X-SASI-Hits: BODY_SIZE_4000_4999 0.000000, BODY_SIZE_5000_LESS 0.000000, BODY_SIZE_7000_LESS 0.000000, BZ_TLD 0.500000, CS_SUSP_TLD_BODY 0.000000, CTE_7BIT 0.000000, HTML_00_01 0.050000, HTML_00_10 0.050000, IN_REP_TO 0.000000, LEGITIMATE_SIGNS 0.000000, MSGID_SAMEAS_FROM_HEX_844412 0.100000, MSG_THREAD 0.000000, NO_URI_HTTPS 0.000000, REFERENCES 0.000000, REPLYTO_SAMEAS_FROM 0.000000, SUSP_DH_NEG 0.000000, TO_IN_SUBJECT 0.500000, USER_AGENT 0.000000, __ANY_URI 0.000000, __AUTH_RES_PASS 0.000000, __BODY_NO_MAILTO 0.000000, __BOUNCE_CHALLENGE_SUBJ 0.000000, __BOUNCE_NDR_SUBJ_EXEMPT 0.000000, __CP_URI_IN_BODY 0.000000, __CT 0.000000, __CTE 0.000000, __CT_TEXT_PLAIN 0.000000, __DQ_NEG_DOMAIN 0.000000, __DQ_NEG_HEUR 0.000000, __DQ_NEG_IP 0.000000, __FORWARDED_MSG 0.000000, __FRAUD_COMMON 0.000000, __FRAUD_MONEY_CURRENCY 0.000000, __FRAUD_MONEY_CURRENCY_DOLLAR 0.000000, __FRAUD_REPLY 0.000000, __FROM_DOMAIN_NOT_IN_BODY 0.000000, __FROM_NAME_NOT_IN_ADDR 0.000000, __FROM_NAME_NOT_IN_BODY 0.000000, __FUR_HEADER 0.000000, __HAS_FROM 0.000000, __HAS_MSGID 0.000000, __HAS_REFERENCES 0.000000, __HAS_REPLYTO 0.000000, __HEADER_ORDER_FROM 0.000000, __IN_REP_TO 0.000000, __MAIL_CHAIN 0.000000, __MIME_BOUND_CHARSET 0.000000, __MIME_TEXT_ONLY 0.000000, __MIME_TEXT_P 0.000000, __MIME_TEXT_P1 0.000000, __MIME_VERSION 0.000000, __MOZILLA_USER_AGENT 0.000000, __MSGID_HEX_844412 0.000000, __MULTIPLE_URI_TEXT 0.000000, __NO_HTML_TAG_RAW 0.000000, __REFERENCES 0.000000, __REPLYTO_SAMEAS_FROM_ACC 0.000000, __REPLYTO_SAMEAS_FROM_ADDY 0.000000, __REPLYTO_SAMEAS_FROM_DOMAIN 0.000000, __SANE_MSGID 0.000000, __SCAN_D_NEG 0.000000, __SCAN_D_NEG2 0.000000, __SCAN_D_NEG_HEUR 0.000000, __SCAN_D_NEG_HEUR2 0.000000, __SUBJ_ALPHA_NEGATE 0.000000, __SUBJ_REPLY 0.000000, __TO_IN_SUBJECT 0.000000, __TO_MALFORMED_2 0.000000, __TO_NAME 0.000000, __TO_NAME_DIFF_FROM_ACC 0.000000, __TO_REAL_NAMES 0.000000, __URI_IN_BODY 0.000000, __URI_MAILTO 0.000000, __URI_NOT_IMG 0.000000, __URI_NS 0.000000, __URI_WITHOUT_PATH 0.000000, __URI_WITH_PATH 0.000000, __USER_AGENT 0.000000, __WEBINAR_PHRASE 0.000000 X-SASI-Probability: 13% X-SASI-RCODE: 200 X-SASI-Version: Antispam-Engine: 5.1.4, AntispamData: 2024.10.11.230916 Received: from [192.168.10.199] (dtp [192.168.10.199]) by srv2 (Weasel v2.9-0001 ) for ; Sat, 12 Oct 2024 01:21:27 -0000 Reply-To: ml@ecomstation.it Subject: Re: [eCS-ISP] HTTPS-Misery (for Steven) To: eCS ISP Mailing List References: Organization: Massimo S. Message-ID: <12dd86fa-e05a-d359-d38e-259bcb8b8f1e@ecomstation.it> Date: Sat, 12 Oct 2024 01:40:40 +0200 User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; it-IT; rv:1.7.13) Gecko/20060424 Thunderbird/1.0.8 Mnenhy/0.7.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Language: it-IT Content-Transfer-Encoding: 7bit Il 11/10/2024 22:20, Steven Levine ha scritto: > In , on 10/11/24 > at 10:36 AM, "Massimo S." said: > > Hi Massimo, > >> i hope to have permissions to modify the script to adapt to my >> environment/paths > > You don't need my permission. As it says in the header politeness is much more important for me than GPL or such > This program is free software licensed under the terms of > the GNU General Public License Version 3 or newer. The GPL > Software License can be found in gnugpl3.txt or at > http://www.gnu.org/licenses/licenses.html#GPL > > If you don't know what the GPL is and how you are allowed to GPL licenced > code, I recommend you do some reading. > >> and added just >> docroot = 'X:\apache\htdocs\mywebsite\.well-known\acme-challenge' > >> of course like before i have to create an hook script for each domain, >> but this is not a problem >> now the scripts works well also here > > Good to hear. Let me know if you run into any unexpected problems. As I > mentioned, the script is intended to be mostly generic, but one never > knows how generic a script is until it's got multiple users. > > I would never have have gone with a multiple script solution, but it's > your time and your choice. > > FWIW, if I had to implement a solution where the domain to directory > mapping is not algorithmic, I would have used a mapping file with lines of > the form > > domain path > > It's a simple job for REXX to read the file, match on the domain and map > the domain to the path. This way I would only have one file to edit for > all domains being managed. > >> i've another question >> in the \acme-challenge dir with my script i was used to find a lot of >> token files >> eg. zGaQTb6CdwEeuLNOm4-DK8zBxCSlql-oCxXl2V3t9Q0 >> now the dir remains empty > > This is how the ACME token files are supposed to be managed. Your naive > scripts did not implement the hook as intended. > > The token files are only good for one use and are supposed to be deleted > by the hook script. If you review uacme-hook.log, you will see log > messages indicating when the token files are created and deleted. > >> and i didn't find in the code something that >> clear the token file > > The token files are deleted by > > uacme-hook.cmd:131 > call SysFileDelete gTokenFile > > uacme-hook.cmd:141 > call SysFileDelete gTokenFile > > In the uacme.sh sample script, the token files are deleted by > > uacme.sh:48 > "done"|"failed") > case "$TYPE" in > http-01) > rm ${CHALLENGE_PATH}/${TOKEN} > exit $? > ;; > > >> i also added a say gType >> before >> if gType \== 'http-01' then >> at line 114 >> but i don't find any output to the screen > > You are probably missing it. The logs files are a better way to look for > this. They don't scroll off the screen so fast. From one of my logs, I > have > > 2024/08/19-18:04:45 uacme-hook started at 2024/08/19-18:04:45 > 2024/08/19-18:04:45 method is begin > 2024/08/19-18:04:45 type is dns-01 > 2024/08/19-18:04:45 ident is www.www.cih.bz > 2024/08/19-18:04:45 token is nPKmBr_nbCWbtX-09jCugox_kuqPCSok3O13g3fb_hs > 2024/08/19-18:04:45 auth is 3D6NBz-8HXPorNUQIcP2DS9DK4TeyN5L7byu10KwqYM > > and > > 2024/08/13-08:39:26 method is begin > 2024/08/13-08:39:26 type is tls-alpn-01 > 2024/08/13-08:39:26 ident is test.warpcave.com > 2024/08/13-08:39:26 token is yL12UITv9P44oo6eEpL37-MSSnxno5ECoQnJDs4QYQc > 2024/08/13-08:39:26 auth is dGEv0VC2mYKwXrYn0CHyFdg_77Qzuzw-3y_O0AbqTRY > > so, it's clear that Let's Encrypt will try various challenge types. > > I do seem mostly http-01 challenges, so it's possble to LE records the > last successful challenge type an tries it first most of the time. It's > an obvious optimization. > > Steven thank you so much but as you know i've not your skills i still don't understand this 2024/10/12-01:33:15 hook_webmail started at 2024/10/12-01:33:15 2024/10/12-01:33:15 method is begin 2024/10/12-01:33:15 type is http-01 2024/10/12-01:33:15 ident is webmail.mydomain.it 2024/10/12-01:33:15 token is OQg2xEXcj39j6brHDmIDwj5V5mYY1_DOvU5DRDOnPh4 2024/10/12-01:33:25 hook_webmail started at 2024/10/12-01:33:25 2024/10/12-01:33:25 method is failed 2024/10/12-01:33:25 type is http-01 2024/10/12-01:33:25 ident is webmail.mydomain.it 2024/10/12-01:33:25 token is OQg2xEXcj39j6brHDmIDwj5V5mYY1_DOvU5DRDOnPh4 2024/10/12-01:33:25 auth is OQg2xEXcj39j6brHDmIDwj5V5mYY1_DOvU5DRDOnPh4.zyhanFlpd0tloojCJrdfZjZwx4LbkQHuYa75ndsa-Qs 2024/10/12-01:33:25 DoFailed deleting X:\apache\htdocs\webmail\.well-known\acme-challenge\OQg2xEXcj39j6brHDmIDwj5V5mYY1_DOvU5DRDOnPh4 for this domain it failed i still find the acme-challenge dir empty and it fails even if the method is http-01 i'm puzzled, sorry massimo