remove pvemailforward binary

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

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2022-10-21 15:02:51 +02:00 committed by Wolfgang Bumiller
parent b632562c08
commit de59191b45
5 changed files with 4 additions and 75 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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);

View File

@ -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

2
debian/rules vendored
View File

@ -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