PostfixAdmin requires a database in order to be able to store the email account and domain information.
We also included the required PHP and Apache modules in the command: apt-get install apache libapache2-mod-php php php-common php-mbstring php-imap php-mysql Step 4. We can install Apache 2, PHP 7.4 and the required PHP extensions using the following command. PHP 7.4 and Apache2 are included in the default Ubuntu repository for 20.04. Install PHP, Apache and Required Extensions For security reasons, we will create a new user named ‘vmail’ with permissions to store the emails in the /var/vmail directory: useradd -r -u 150 -g mail -d /var/vmail -s /sbin/nologin -c "Virtual Mail User" vmailĬhown -R vmail:mail /var/vmail Step 3. This saves us the hassle of having to create new system users whenever we need a new email account added. PostfixAdmin has the ability to create multiple virtual domains, users and aliases. Once all the packages are up-to-date, restart your server to apply the configuration changes and ensure that all software is running on their latest versions.
Once you are logged in, you should update all of your packages to their latest available versions. Change the values in red according to your server’s IP address and SSH port number (the default number is 22, so try that first unless your server uses a custom port number). Remember to replace “root” with your username if you are not using the root user. You can do that by entering this command: ssh IP_Address -p Port_Number To begin, we’re going to need to log into our server using SSH.