• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Input Mail-Headers?

Just follow that recipe!
I don't agree that such info is sensitive, but hey, everyone has their right for paranoia.

There's no way (AFAIK) to prevent Plesk from rewriting main.cf and master.cf, but it doesn't do it as often as it did in the past.

I have a monitoring system that will alert me that this file has changed.
I have a cronjob that will save the complete /etc/postfix in a compressed tar-file if it ever changes.
It has the advantage that you will find out if Plesk has been improved or that it just killed your custom setup.

cat /etc/cron.hourly/taretcs
Code:
#!/bin/bash

tarfolder /etc/postfix
tarfolder /etc/courier-imap
tarfolder /etc/dovecot

cat /usr/local/sbin/tarfolder
Code:
#!/bin/bash

# Strip last slash..
DATESTAMP=`date +%Y-%m-%d.%H-%M`
HEADLESS=
tty >/dev/null || HEADLESS=true

GLOB=
SUFFIX=
while getopts d opt ; do
  case $opt in
    d)   GLOB='/*(.)' ;;
    ?)   printf "Usage: %s: [-d] <folder>\n" $0
    exit 2;;
  esac
done
shift `expr ${OPTIND} - 1`

[ -z "${GLOB}" ] || SUFFIX="_NoSubfolders"

FOLDER="`echo ${1} | sed 's/\/$//'`"
[ -d "${FOLDER}" ] || exit 1

if ! echo "${FOLDER}" | grep -q '^/' ; then
  FOLDER="`realpath ${FOLDER} 2>/dev/null`"
  if [ -z "${FOLDER}" ] ; then
    echo "You need to use an absolute path (or install readlink => apt-get instatll readlink)" >&2
    exit 1
  fi
fi

DIRFILE=`echo ${FOLDER} | tr '/ ' '.' | tr -s '.'`
TMPDIR=`mktemp -t -d ${0//*\/}.XXXXXXXXXX`

if cd ${TMPDIR} ; then
  TGZ="${TMPDIR}/.${DIRFILE}.${DATESTAMP}.tgz"

  tar cpzf "${TGZ}" "${FOLDER}${GLOB}" --exclude=*.tgz >/dev/null 2>&1
  LATEST_TGZ=`find "${FOLDER}" -maxdepth 1 -type f | \
                   grep "${DIRFILE}.*\.tgz" | xargs -I{} stat -c '%Y %n' {} | \
                   sort -rn | head -n1 | awk '{print $2}'`

  if [ -z "${LATEST_TGZ}" ] ; then
    [ ${HEADLESS} ] || echo "First tgz" >&2
    mv "${TGZ}" "${FOLDER}/"
  else
    mkdir ${TMPDIR}/f1
    mkdir ${TMPDIR}/f2
    if tar xzf "${LATEST_TGZ}" -C ${TMPDIR}/f1  >/dev/null 2>&1 ; then
      if tar xzf "${TGZ}" -C ${TMPDIR}/f2  >/dev/null 2>&1 ; then
        if diff -r ${TMPDIR}/f1  ${TMPDIR}/f2 >/dev/null 2>&1 ; then
          [ ${HEADLESS} ] || echo "Folder \"${FOLDER}\" hasn't changed.... I will discard this tgz" >&2
        else
          if [ ! ${HEADLESS} ] ; then
            echo "Last tgz is different" >&2
            diff -r ${TMPDIR}/f1  ${TMPDIR}/f2
          fi
          mv "${TGZ}" "${FOLDER}/"
        fi
      fi
    fi
  fi
fi
rm -rf ${TMPDIR}
 
Last edited:
Back
Top