From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.ebner@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id BD1548AC5B;
 Fri, 21 Oct 2022 15:03:03 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 5665B22454;
 Fri, 21 Oct 2022 15:03:03 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS;
 Fri, 21 Oct 2022 15:02:58 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D0D7B44B24;
 Fri, 21 Oct 2022 15:02:57 +0200 (CEST)
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com,
	pbs-devel@lists.proxmox.com
Date: Fri, 21 Oct 2022 15:02:51 +0200
Message-Id: <20221021130252.176316-9-f.ebner@proxmox.com>
X-Mailer: git-send-email 2.30.2
In-Reply-To: <20221021130252.176316-1-f.ebner@proxmox.com>
References: <20221021130252.176316-1-f.ebner@proxmox.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.028 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [getty.target, pvemailforward.pl]
Subject: [pve-devel] [PATCH manager 3/4] remove pvemailforward binary
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Fri, 21 Oct 2022 13:03:03 -0000

which was replaced by proxmox-mail-forward living in its own package.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 bin/Makefile             | 11 +++-------
 bin/pvemailforward.c     | 17 ---------------
 bin/pvemailforward.pl    | 45 ----------------------------------------
 debian/lintian-overrides |  4 ----
 debian/rules             |  2 +-
 5 files changed, 4 insertions(+), 75 deletions(-)
 delete mode 100644 bin/pvemailforward.c
 delete mode 100755 bin/pvemailforward.pl

diff --git a/bin/Makefile b/bin/Makefile
index fb475be3..55e5f20d 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -14,7 +14,6 @@ SCRIPTS =  			\
 	${CLITOOLS}		\
 	pvebanner		\
 	pveversion		\
-	pvemailforward.pl	\
 	pveupgrade		\
 	pveupdate		\
 	pveperf			\
@@ -37,7 +36,7 @@ ZSH_COMPLETIONS =						\
 	$(addsuffix .service-zsh-completion, ${SERVICES}) 	\
 	$(addsuffix .zsh-completion, ${CLITOOLS})		\
 
-all: ${SERVICE_MANS} ${CLI_MANS} pvemailforward
+all: ${SERVICE_MANS} ${CLI_MANS}
 
 %.1: %.1.pod
 	rm -f $@
@@ -56,20 +55,16 @@ pveversion.1.pod: pveversion
 pveupgrade.1.pod: pveupgrade
 pvereport.1.pod: pvereport
 
-pvemailforward: pvemailforward.c
-	$(CC) $(CPPFLAGS) $(CFLAGS) -Wall -g -O2 $< -o $@
-
 .PHONY: check
 check: $(addsuffix .service-api-verified, ${SERVICES}) $(addsuffix .api-verified, ${CLITOOLS})
 	rm -f *.service-api-verified *.api-verified
 
 .PHONY: install
-install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETIONS} ${ZSH_COMPLETIONS}
+install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} ${BASH_COMPLETIONS} ${ZSH_COMPLETIONS}
 	install -d ${BINDIR}
 	install -m 0755 ${SCRIPTS} ${BINDIR}
 	install -d ${USRSHARE}/helpers
 	install -m 0755 pve-startall-delay ${USRSHARE}/helpers
-	install -s -m 2755 -g www-data pvemailforward ${BINDIR}
 	install -d ${MAN1DIR}
 	install -m 0644 ${CLI_MANS} ${MAN1DIR}
 	install -d ${MAN8DIR}
@@ -82,7 +77,7 @@ install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETION
 .PHONY: clean
 clean:
 	make cleanup-docgen
-	rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod pvemailforward  \
+	rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod		    \
 	    *.bash-completion *.service-bash-completion				    \
 	    *.zsh-completion *.service-zsh-completion				    \
 	    *.api-verified *.service-api-verified
diff --git a/bin/pvemailforward.c b/bin/pvemailforward.c
deleted file mode 100644
index 06013a63..00000000
--- a/bin/pvemailforward.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* see 'man perlsec'
- *
- */ 
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#define REAL_PATH "/usr/bin/pvemailforward.pl"
-
-int main(int argc, char **argv)
-{
-    execv(REAL_PATH, argv);
- 
-    fprintf(stderr, "exec '%s' failed\n", REAL_PATH);
-
-    exit(-1);
-}
diff --git a/bin/pvemailforward.pl b/bin/pvemailforward.pl
deleted file mode 100755
index 18a57497..00000000
--- a/bin/pvemailforward.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-use PVE::Tools;
-use PVE::SafeSyslog;
-use PVE::AccessControl;
-use PVE::Cluster qw (cfs_read_file);
-use PVE::DataCenterConfig;
-
-# NOTE: we need to run this with setgid www-data
-# else we cant read /etc/pve/user.cfg
-
-$( = $); # $GID = $EGID
-
-$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
-
-initlog('pvemailforward');
-
-
-PVE::Cluster::cfs_update();
-
-eval {
-    my $usercfg = cfs_read_file("user.cfg");
-    my $rootcfg = $usercfg->{users}->{'root@pam'} || {};
-    my $mailto = $rootcfg->{email};
-
-    my $dcconf = cfs_read_file('datacenter.cfg');
-    my $mailfrom = $dcconf->{email_from} || "root";
-
-    die "user 'root\@pam' does not have a email address\n" if !$mailto;
-
-    syslog("info", "forward mail to <$mailto>");
-
-    # we never send DSN (avoid mail loops)
-    open(CMD, "|sendmail -bm -N never -f $mailfrom $mailto") ||
-	die "can't exec sendmail - $!\n";
-    while (<>) { print CMD $_; }
-    close(CMD);
-};
-if (my $err = $@) {
-    syslog('err', "mail forward failed: $err");
-}
-
-exit(0);
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
index fba73dcf..e30e7054 100644
--- a/debian/lintian-overrides
+++ b/debian/lintian-overrides
@@ -1,11 +1,7 @@
 pve-manager: mail-transport-agent-dependency-does-not-specify-default-mta *
 pve-manager: no-manual-page usr/bin/pvebanner
-pve-manager: no-manual-page usr/bin/pvemailforward
-pve-manager: no-manual-page usr/bin/pvemailforward.pl
 pve-manager: no-manual-page usr/bin/pveupdate
 pve-manager: non-standard-dir-perm var/log/pveproxy/ 0700 != 0755
 pve-manager: package-installs-apt-sources etc/apt/sources.list.d/pve-enterprise.list
 pve-manager: privacy-breach-generic usr/share/pve-manager/touch/sencha-touch-all-debug.js *
-pve-manager: script-with-language-extension usr/bin/pvemailforward.pl
-pve-manager: setgid-binary usr/bin/pvemailforward 2755 root/www-data
 pve-manager: systemd-service-file-refers-to-unusual-wantedby-target lib/systemd/system/pvebanner.service getty.target
diff --git a/debian/rules b/debian/rules
index ec49d52d..f28352e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,4 +13,4 @@ override_dh_strip_nondeterminism:
 	dh_strip_nondeterminism -X.png
 
 override_dh_fixperms:
-	dh_fixperms -Xpvemailforward -Xvar/log/pveproxy
+	dh_fixperms -Xvar/log/pveproxy
-- 
2.30.2





From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.ebner@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id BD1548AC5B;
 Fri, 21 Oct 2022 15:03:03 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 5665B22454;
 Fri, 21 Oct 2022 15:03:03 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS;
 Fri, 21 Oct 2022 15:02:58 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D0D7B44B24;
 Fri, 21 Oct 2022 15:02:57 +0200 (CEST)
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com,
	pbs-devel@lists.proxmox.com
Date: Fri, 21 Oct 2022 15:02:51 +0200
Message-Id: <20221021130252.176316-9-f.ebner@proxmox.com>
X-Mailer: git-send-email 2.30.2
In-Reply-To: <20221021130252.176316-1-f.ebner@proxmox.com>
References: <20221021130252.176316-1-f.ebner@proxmox.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.028 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [getty.target, pvemailforward.pl]
Subject: [pbs-devel] [PATCH manager 3/4] remove pvemailforward binary
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Fri, 21 Oct 2022 13:03:03 -0000

which was replaced by proxmox-mail-forward living in its own package.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 bin/Makefile             | 11 +++-------
 bin/pvemailforward.c     | 17 ---------------
 bin/pvemailforward.pl    | 45 ----------------------------------------
 debian/lintian-overrides |  4 ----
 debian/rules             |  2 +-
 5 files changed, 4 insertions(+), 75 deletions(-)
 delete mode 100644 bin/pvemailforward.c
 delete mode 100755 bin/pvemailforward.pl

diff --git a/bin/Makefile b/bin/Makefile
index fb475be3..55e5f20d 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -14,7 +14,6 @@ SCRIPTS =  			\
 	${CLITOOLS}		\
 	pvebanner		\
 	pveversion		\
-	pvemailforward.pl	\
 	pveupgrade		\
 	pveupdate		\
 	pveperf			\
@@ -37,7 +36,7 @@ ZSH_COMPLETIONS =						\
 	$(addsuffix .service-zsh-completion, ${SERVICES}) 	\
 	$(addsuffix .zsh-completion, ${CLITOOLS})		\
 
-all: ${SERVICE_MANS} ${CLI_MANS} pvemailforward
+all: ${SERVICE_MANS} ${CLI_MANS}
 
 %.1: %.1.pod
 	rm -f $@
@@ -56,20 +55,16 @@ pveversion.1.pod: pveversion
 pveupgrade.1.pod: pveupgrade
 pvereport.1.pod: pvereport
 
-pvemailforward: pvemailforward.c
-	$(CC) $(CPPFLAGS) $(CFLAGS) -Wall -g -O2 $< -o $@
-
 .PHONY: check
 check: $(addsuffix .service-api-verified, ${SERVICES}) $(addsuffix .api-verified, ${CLITOOLS})
 	rm -f *.service-api-verified *.api-verified
 
 .PHONY: install
-install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETIONS} ${ZSH_COMPLETIONS}
+install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} ${BASH_COMPLETIONS} ${ZSH_COMPLETIONS}
 	install -d ${BINDIR}
 	install -m 0755 ${SCRIPTS} ${BINDIR}
 	install -d ${USRSHARE}/helpers
 	install -m 0755 pve-startall-delay ${USRSHARE}/helpers
-	install -s -m 2755 -g www-data pvemailforward ${BINDIR}
 	install -d ${MAN1DIR}
 	install -m 0644 ${CLI_MANS} ${MAN1DIR}
 	install -d ${MAN8DIR}
@@ -82,7 +77,7 @@ install: ${SCRIPTS} ${CLI_MANS} ${SERVICE_MANS} pvemailforward ${BASH_COMPLETION
 .PHONY: clean
 clean:
 	make cleanup-docgen
-	rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod pvemailforward  \
+	rm -rf *~ *.tmp ${CLI_MANS} ${SERVICE_MANS} *.1.pod *.8.pod		    \
 	    *.bash-completion *.service-bash-completion				    \
 	    *.zsh-completion *.service-zsh-completion				    \
 	    *.api-verified *.service-api-verified
diff --git a/bin/pvemailforward.c b/bin/pvemailforward.c
deleted file mode 100644
index 06013a63..00000000
--- a/bin/pvemailforward.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* see 'man perlsec'
- *
- */ 
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#define REAL_PATH "/usr/bin/pvemailforward.pl"
-
-int main(int argc, char **argv)
-{
-    execv(REAL_PATH, argv);
- 
-    fprintf(stderr, "exec '%s' failed\n", REAL_PATH);
-
-    exit(-1);
-}
diff --git a/bin/pvemailforward.pl b/bin/pvemailforward.pl
deleted file mode 100755
index 18a57497..00000000
--- a/bin/pvemailforward.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl -T
-
-use strict;
-use warnings;
-use PVE::Tools;
-use PVE::SafeSyslog;
-use PVE::AccessControl;
-use PVE::Cluster qw (cfs_read_file);
-use PVE::DataCenterConfig;
-
-# NOTE: we need to run this with setgid www-data
-# else we cant read /etc/pve/user.cfg
-
-$( = $); # $GID = $EGID
-
-$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
-
-initlog('pvemailforward');
-
-
-PVE::Cluster::cfs_update();
-
-eval {
-    my $usercfg = cfs_read_file("user.cfg");
-    my $rootcfg = $usercfg->{users}->{'root@pam'} || {};
-    my $mailto = $rootcfg->{email};
-
-    my $dcconf = cfs_read_file('datacenter.cfg');
-    my $mailfrom = $dcconf->{email_from} || "root";
-
-    die "user 'root\@pam' does not have a email address\n" if !$mailto;
-
-    syslog("info", "forward mail to <$mailto>");
-
-    # we never send DSN (avoid mail loops)
-    open(CMD, "|sendmail -bm -N never -f $mailfrom $mailto") ||
-	die "can't exec sendmail - $!\n";
-    while (<>) { print CMD $_; }
-    close(CMD);
-};
-if (my $err = $@) {
-    syslog('err', "mail forward failed: $err");
-}
-
-exit(0);
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
index fba73dcf..e30e7054 100644
--- a/debian/lintian-overrides
+++ b/debian/lintian-overrides
@@ -1,11 +1,7 @@
 pve-manager: mail-transport-agent-dependency-does-not-specify-default-mta *
 pve-manager: no-manual-page usr/bin/pvebanner
-pve-manager: no-manual-page usr/bin/pvemailforward
-pve-manager: no-manual-page usr/bin/pvemailforward.pl
 pve-manager: no-manual-page usr/bin/pveupdate
 pve-manager: non-standard-dir-perm var/log/pveproxy/ 0700 != 0755
 pve-manager: package-installs-apt-sources etc/apt/sources.list.d/pve-enterprise.list
 pve-manager: privacy-breach-generic usr/share/pve-manager/touch/sencha-touch-all-debug.js *
-pve-manager: script-with-language-extension usr/bin/pvemailforward.pl
-pve-manager: setgid-binary usr/bin/pvemailforward 2755 root/www-data
 pve-manager: systemd-service-file-refers-to-unusual-wantedby-target lib/systemd/system/pvebanner.service getty.target
diff --git a/debian/rules b/debian/rules
index ec49d52d..f28352e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,4 +13,4 @@ override_dh_strip_nondeterminism:
 	dh_strip_nondeterminism -X.png
 
 override_dh_fixperms:
-	dh_fixperms -Xpvemailforward -Xvar/log/pveproxy
+	dh_fixperms -Xvar/log/pveproxy
-- 
2.30.2