install_postfixadmin.sh: adjust vacation installation to match vacation script from postfix 3.2

This commit is contained in:
Christoph 2019-08-01 12:52:04 +02:00
parent 4acb74321f
commit 04629f7d9b

View File

@ -635,12 +635,18 @@ echononl "\tInstall needed debian packages.."
needed_packages=""
_needed_packages="
libdbi-perl
libmime-encwords-perl
libemail-valid-perl
libmail-sendmail-perl
liblog-log4perl-perl
libdbi-dev
libemail-sender-perl
libemail-simple-perl
libemail-valid-perl
libtry-tiny-perl
libemail-mime-perl
liblog-log4perl-perl
liblog-dispatch-perl
libgetopt-argvfile-perl
libmime-charset-perl
libmime-encwords-perl
cpanminus"
if [[ $os_version -lt 9 ]] ; then
_needed_packages="$_needed_packages libmail-sender-perl"
@ -1560,7 +1566,11 @@ fi
# - this IS NOT a fix, but a workaround
# -
echononl "\tWorkaround, because encoding does not work as exspected."
perl -i -n -p -e "s/(\s*\'ctype\'\s* =>\s*)\'text\/plain.*$/\1\'text\/plain; charset=iso-8859-1\',/" \
# - Vacation script changed. Since Version 3.2 we need another perl regexp.
# - The old one was:
# - perl -i -n -p -e "s/(\s*\'ctype\'\s* =>\s*)\'text\/plain.*$/\1\'text\/plain; charset=iso-8859-1\',/" \
# -
perl -i -n -p -e "s/(\s*\'Content-Type\'\s* =>\s*)\"text\/plain.*$/\1\"text\/plain; charset=iso-8859-1\",/" \
/var/spool/vacation/vacation.pl > "$log_file" 2>&1
if [[ $? -eq 0 ]];then
echo_ok
@ -1641,6 +1651,8 @@ cat <<EOF > /etc/postfixadmin/vacation.conf 2> "$log_file"
\$logfile = '/var/log/vacation.log';
\$log_level = 1;
\$interval = 60*60*24;
\$smtp_ssl = '0';
1; # required final line - keeps perl happy.
EOF
if [[ $? -eq 0 ]];then
echo_ok