403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/lib/dpkg/info/msmtp.postinst
#!/bin/sh

set -e

if [ -e /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
fi

# Automatically added by dh_apparmor/3.0.3-0ubuntu2
if [ "$1" = "configure" ]; then
    APP_PROFILE="/etc/apparmor.d/usr.bin.msmtp"
    if [ -f "$APP_PROFILE" ]; then
        # Add the local/ include
        LOCAL_APP_PROFILE="/etc/apparmor.d/local/usr.bin.msmtp"

        test -e "$LOCAL_APP_PROFILE" || {
            mkdir -p `dirname "$LOCAL_APP_PROFILE"`
            install --mode 644 /dev/null "$LOCAL_APP_PROFILE"
        }

        # Reload the profile, including any abstraction updates
        if aa-enabled --quiet 2>/dev/null; then
            apparmor_parser -r -T -W "$APP_PROFILE" || true
        fi
    fi
fi
# End automatically added section


write_config () {
    # preserve local permissions/ownership
    if [ -f /etc/msmtprc ]; then
        touch /etc/msmtprc.new
        chmod --reference=/etc/msmtprc /etc/msmtprc.new
        chown --reference=/etc/msmtprc /etc/msmtprc.new
    fi

    exec 1> /etc/msmtprc.new
    echo "account default"

    db_get msmtp/host
    if [ -n "$RET" ]; then
        echo "host $RET"
    fi

    db_get msmtp/port
    if [ "$RET" != "25" ]; then
        echo "port $RET"
    fi

    db_get msmtp/auto_from
    if [ "$RET" = "true" ]; then
        db_get msmtp/maildomain
        RET="${RET:-$(hostname --fqdn || true)}"
        if [ -n "$RET" ]; then
            echo "auto_from on"
            echo "maildomain $RET"
        fi
    fi

    db_get msmtp/tls
    if [ "$RET" = "true" ]; then
        echo "tls on"
    fi
}

apply_apparmor() {
    enable="$1"
    AA_DIR="/etc/apparmor.d/"
    AA_PROFILE="usr.bin.msmtp"
    AA_CONF="$AA_DIR/$AA_PROFILE"
    AA_DISABLE="$AA_DIR/disable/$AA_PROFILE"
    case "$enable" in
        true)
            rm -f "$AA_DISABLE"
            ;;
        *)
            mkdir -p "$AA_DIR/disable" || true
            if [ -d "$AA_DIR/disable" ] && [ -f "$AA_CONF" ]; then
                ln -sf "$AA_CONF" "$AA_DISABLE"
            fi
            ;;
    esac
}

case $1 in
    configure)
        if ! getent passwd msmtp >/dev/null; then
            adduser --quiet --system --group --no-create-home --home /var/lib/msmtp msmtp
        fi

        if ! dpkg-statoverride --list /usr/bin/msmtp >/dev/null; then
            chgrp msmtp /usr/bin/msmtp
            chmod 2755 /usr/bin/msmtp
        fi

        db_get msmtp/apparmor
        apply_apparmor "$RET"

        db_get msmtp/sysconfig
        if [ "$RET" = "true" ]; then
            write_config
            if [ -f /etc/msmtprc ]; then
                ucf --debconf-ok /etc/msmtprc.new /etc/msmtprc
                rm -f /etc/msmtprc.new
            else
                mv /etc/msmtprc.new /etc/msmtprc
            fi
        fi
        ;;
    *)
        exit 0
        ;;
esac



Youez - 2016 - github.com/yon3zu
LinuXploit