post_upgrade() {
  # if upgrading from 2.64-9 or 2.64-11, make sure to set permissions and setgid
  if [ $(vercmp $2 "2.64-11") -le 0 ]; then
    # set ownership and permissions for configuration and exectuables
    # FS#57787
    echo "Running post_upgrade function to fix FS#57787"
    chgrp -cR mail /etc/ssmtp \
      /usr/bin/{ssmtp,sendmail,newaliases,mailq}
    # unset unneded sticky bit
    chmod -cR g-s /etc/ssmtp
    # allow access to directory
    chmod -c 750 /etc/ssmtp
    # allow only root:mail rw to configs
    chmod -c 640 /etc/ssmtp/*
    # setgid executables
    chmod -c 2755 /usr/bin/{ssmtp,sendmail,newaliases,mailq}
  fi
}
