From patchwork Fri Jan 31 16:31:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 2736 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 488N5T3sKpz3xYL for ; Fri, 31 Jan 2020 16:31:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 488N5Q58nxz2ZH; Fri, 31 Jan 2020 16:31:22 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1580488283; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NghOX12CtA+vy1sc9A+sQwz4yDjGfVi82EFkNVOKpAQ=; b=7Z7rQSQQgC2q4OZI3AS1KDc9o/aF5LVkCGI1YI9NIac1m8yWoAs6ZGM1WeqhUTxrgnkzGp 8rlSBYRAp8rCqABQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1580488283; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NghOX12CtA+vy1sc9A+sQwz4yDjGfVi82EFkNVOKpAQ=; b=GgbNAnjZkvcaHahhT3+LPvLfhlP8iuEPzX19QpssoLLMuXNrrJpUJ/nCE0gFYT3TX6QtQu BSPVCnDOj/yF5egvqa3YswNjqtateIeJzYkPCBhRpK37Ssu02Wcsbkrs5ILr4D44k8PXmX UKWGZGcfefCAKbfTX5mNVd0/yzMIXCkWWmUjQj5uLJV9lBVbO9ACAvvm9nnvWq7LXMeeu3 Bxp0gkUfBi+zBSBhWZbuITn5+YKS/CXrP8IhpO33OkniJfD/Pjx80sgo4mfAQoBbjqns/L OlV3J0ABM1JK3q/9moX+m3TwomTx/va7gig8b4/9SBBWsO1grQQ8s1wuyp52AQ== Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 488N5Q0trTz2yZv; Fri, 31 Jan 2020 16:31:22 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 488N5N1jxrz2xxq for ; Fri, 31 Jan 2020 16:31:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 488N5L4Yhqz6QT for ; Fri, 31 Jan 2020 16:31:18 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1580488279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NghOX12CtA+vy1sc9A+sQwz4yDjGfVi82EFkNVOKpAQ=; b=QY30+2odlISt+uiQA8DueehG5SOuVfgEjicd0p3I/fDgNU0FXLV0FBVXK+dVM4Q0G+/2tm mDAeO5MOS3twIgCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1580488279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NghOX12CtA+vy1sc9A+sQwz4yDjGfVi82EFkNVOKpAQ=; b=FfK8Hlj+c46+94okEofqzyICSJF4/RB89ciBpKS6FkmSZI9mxKDFTxPM5Gy0jLv/sH9clr Vmgl7xDBlxq+oR6954hvFtmz0Y0b79Ds6pUZ9vnLApT39yZjrFqSN6DfoZ0d3tziqR34Oe EL4GTNvlKJj+1Xead+8z5doZR+HhsR4JaG1HZlHKfoxJHbNWoxyBgauKXii6R0ikIQVVVX ofqHox3NW3ThEuMHe2XXqtfCFJ0zED2UMfyhuVL8gIsVZ6PxaCR2Tq2PRZLJ0n2aoZG6fC anNwX4EiztqrFS4YeQvgT7R0BBY5X3fGrt0GMSShmocgGd73fhU0rr7QEFR+bQ== To: "IPFire: Development-List" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH 1/2] mail.cgi: add support for implicit TLS usage Message-ID: Date: Fri, 31 Jan 2020 16:31:00 +0000 MIME-Version: 1.0 Content-Language: en-US Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Fixes #12161 Reported-by: Michael Tremer Signed-off-by: Peter Müller --- html/cgi-bin/mail.cgi | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/html/cgi-bin/mail.cgi b/html/cgi-bin/mail.cgi index 25589046e..8c1b2d4e4 100755 --- a/html/cgi-bin/mail.cgi +++ b/html/cgi-bin/mail.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2015 IPFire Team # +# Copyright (C) 2007-2020 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -110,8 +110,8 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){ #SaveButton on configsite $dma{'SMARTHOST'} = $cgiparams{'txt_mailserver'}; $dma{'PORT'} = $cgiparams{'txt_mailport'}; - $dma{'STARTTLS'} = '' if ($cgiparams{'mail_tls'}); - $dma{'SECURETRANSFER'} = '' if exists $dma{'STARTTLS'}; + $dma{'STARTTLS'} = '' if ($cgiparams{'mail_tls'}{'explicit'}); + $dma{'SECURETRANS'} = '' if ($cgiparams{'mail_tls'}{'explicit'} || $cgiparams{'mail_tls'}{'implicit'}); $dma{'SPOOLDIR'} = "/var/spool/dma"; $dma{'FULLBOUNCE'} = ''; $dma{'MAILNAME'} = "$mainsettings{'HOSTNAME'}.$mainsettings{DOMAINNAME}"; @@ -140,8 +140,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'email testmail'}"){ #Testmail button on #FUNCTIONS sub configsite{ - - #If update set fieldvalues new if($cgiparams{'update'} eq 'on'){ $mail{'USEMAIL'} = 'on'; @@ -156,7 +154,9 @@ sub configsite{ } #find preselections $checked{'usemail'}{$mail{'USEMAIL'}} = 'CHECKED'; - $checked{'mail_tls'}{'on'} = 'CHECKED' if exists $dma{'STARTTLS'}; + $selected{'mail_tls'}{'explicit'} = 'selected' if exists $dma{'STARTTLS'}; + $selected{'mail_tls'}{'implicit'} = 'selected' if exists $dma{'SECURETRANS'} and not $dma{'STARTTLS'}; + $selected{'mail_tls'}{'disabled'} = 'selected' if not exists ($dma{'SECURETRANS'} and $dma{'STARTTLS'}); #Open site &Header::openpage($Lang::tr{'email settings'}, 1, ''); @@ -226,7 +226,13 @@ END $Lang::tr{'email tls'} - + + + END if (! -z $dmafile && $mail{'USEMAIL'} eq 'on' && !$errormessage){ From patchwork Fri Jan 31 16:31:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 2737 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 488N604k1jz3xYC for ; Fri, 31 Jan 2020 16:31:52 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 488N5z4zLHz6St; Fri, 31 Jan 2020 16:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1580488311; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=aoKXEtPmYgica33C+f5iTSeI1nlGzERtYFhE9iFxEsY=; b=NXdrUqzpdKNyofrM/TusV7N1bhk13WjC5Rti9Ym9/lviG/QWoDMX7/vQFrXLsKt5jVuMx5 lQKTkOGqeyHsjovH9wtVj36CXtrPxPGHxG9FTza4NJhav4DgrcIP2XRkaavnK41hV2vEs+ KrwIfC/uWiyy+qEtnHPKpWOknJ5xqbtUfPA2rxgPUFX83WlBbI24TWiKtYOwioaApLvxUJ I4sPOYKsU5ROYoP6b5wfCuucqVKkXAgqZPbzsYAQqbq+mmXExwnPadPs7exQAm4z8g6XgI IkuNGU0BaFmhruFqjoRh04/byG/m+siZEKhz16hhwWZdJpOjxIK312Vo3KgsIw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1580488311; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=aoKXEtPmYgica33C+f5iTSeI1nlGzERtYFhE9iFxEsY=; b=6WhyV8sY5mN59fVZCJnfqoVCsH0BLSUGWhhV6jBELXHfMcmzMuJbSCQCPpuyO0PzpXM27v a76APnU+EgMo3fAw== Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 488N5z2mVLz2yCV; Fri, 31 Jan 2020 16:31:51 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 488N5x4TcYz2xxq for ; Fri, 31 Jan 2020 16:31:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 488N5w3TzZz2ZH for ; Fri, 31 Jan 2020 16:31:48 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1580488309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aoKXEtPmYgica33C+f5iTSeI1nlGzERtYFhE9iFxEsY=; b=6TzEJOD+rXfWRx7UcJuYq6UpPDs55+kC8ruFQ+XhclpGiEVufyr3nxe35NZ083BnbUazz7 rnvfTkRUZl1xWlBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1580488309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aoKXEtPmYgica33C+f5iTSeI1nlGzERtYFhE9iFxEsY=; b=bMJWFQDlSDUVHdxzfM6S9IDdIzgL5MKJKQELLfm1EbnqKG5zZWgL1tyoqdEtIVa6KdLQvK swhRe+oB6QpwZWbghJ9JWszdeFX2uKgBTe5yuMPJtHetvYwjopoLbyJua5SEvSastYO9/P y+hJMbBRTyfpiyo/XO8w+5Q/Kz6/xAFqIPUhxPfoP6OXgTPVGweYGuZUIuKqUM/D4Bcx7i xx2MZtOIIRGUnj4fp0Yx5G3wvEA6emaG1B4v1ydlJ9Osjif6OLLm8hkBM8rZQANsi2jI7D MFlBD4dtJYOICK28g/61xe7BR7KL2kGESZyM1uf1/Vyz6J+NLbzWRgTc1ARAaQ== Subject: [PATCH 2/2] update language files for mail.cgi changes To: development@lists.ipfire.org References: From: =?utf-8?q?Peter_M=C3=BCller?= Message-ID: Date: Fri, 31 Jan 2020 16:31:00 +0000 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=peter.mueller@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Peter Müller --- langs/de/cgi-bin/de.pl | 6 ++++-- langs/en/cgi-bin/en.pl | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 80579e7cc..2ef7b673b 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -933,8 +933,10 @@ 'email subject' => 'IPFire Test-E-Mail', 'email success' => 'Test-E-Mail erfolgreich versendet', 'email testmail' => 'Testnachricht senden', -'email text' => 'Testnachricht vom IPFire Mailversand.', -'email tls' => 'TLS aktivieren', +'email text' => 'Testnachricht vom IPFire-Mailversandsystem.', +'email tls' => 'Transportverschlüsselungsmodus', +'email tls explicit' => 'explizit (STARTTLS)', +'email tls implicit' => 'implizit (TLS)', 'email usemail' => 'Mailversand aktivieren', 'emailreportlevel' => 'E-Mail-Reportlevel', 'empty' => 'Dieses Feld kann leer bleiben', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 1f81108f1..24790d689 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -975,7 +975,9 @@ 'email success' => 'Test message successfully sent', 'email testmail' => 'Send test mail', 'email text' => 'Test mail from IPFire Mail Service', -'email tls' => 'Use TLS', +'email tls' => 'TLS mode', +'email tls explicit' => 'explicit (STARTTLS)', +'email tls implicit' => 'implicit (TLS)', 'email usemail' => 'Activate Mail Service', 'emailreportlevel' => 'E-mailreportlevel', 'emerging pro rules' => 'Emergingthreats.net Pro Rules',