How to completely remove postfix

SYSTEM INFORMATION
OS type and version Rocky Linux 9.2
Virtualmin version 7.8.2

I have completely disabled Mail for domain and Mail server to configure to Sendmail, yet when deleting a website domain, I got this error: Administration user failed.

While the domain has been removed, its UNIX user hasn’t been cleared. I still can do su <username>.

I know I can solve this by installing postfix back but is there another way to solve this?

Deleting virtual server <domain> ..
    Deleting mail aliases ..
    .. done

    Deleting Webmin login ..
    .. done

    Disabling log file rotation ..
    .. no log rotation configuration found

    Removing SSL from Nginx virtual host ..
    .. done

    Removing Nginx virtual host ..
    .. done

    Deleting Nginx webserver log files ..
    .. done

    Deleting DNS zone ..
    .. done

    Deleting home directory ..
    .. done

    .. Administration user failed! : Failed to query Postfix config command to get the current value of parameter home_mailbox: /bin/sh: line 1: /usr/sbin/postconf: No such file or directory
 <sup class="ui_help" aria-label="postfix/postfix-lib.pl (line 1418)" data-tooltip><samp>?</samp></sup>


    Deleting server details for tools.domcloud.io ..
    .. done

    Updating Webmin user ..
    .. done

    Restarting PHP-FPM 8.2 server ..
    .. done

    Re-loading Webmin ..
    .. done

    Applying Nginx configuration ..
    .. done

    Restarting PHP-FPM 7.4 server ..
    .. done

    Re-starting DNS server ..
    .. done

.. deleted

can’t you just remove the UNIX user? but make sure you cleanup any running processes in use by the user. (quite possibly existing Postfix processes)

Or simply locking the account might work just as well.

True, I guess I can do some post-scripts to clean up these residues.

I am interested in directly fixing the script though I am still unable to understand how it works or why it happens.

I am not sure why or how you went about this. I am now concerned about the “Administration user”

Why remove the domain if you only want to disable mail on the domain?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.