![]() ![]() Query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1' $ sudo nano /etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf user = postfixadmin Query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1' $ sudo nano /etc/postfix/sql/mysql_virtual_alias_domain_maps.cf user = postfixadmin Query = SELECT domain FROM domain WHERE domain='%s' AND active = '1' $ sudo nano /etc/postfix/sql/mysql_virtual_mailbox_maps.cf user = postfixadmin ![]() Query = SELECT goto FROM alias WHERE address='%s' AND active = '1' $ sudo nano /etc/postfix/sql/mysql_virtual_domains_maps.cf user = postfixadmin $ sudo nano /etc/postfix/sql/mysql_virtual_alias_maps.cf user = postfixadmin Let’s create the files, make sure to replace the password, database name, database user with the ones you created earlier. Once completed we need to create several configuration files for Postfix to communicate with the database. We set the system hostname at the beginning of this tutorial. In this step, you will be asked for the system mail name, make sure the system mail name is the same as your Debian 11 hostname. Once executes, you will see the followingĬhoose Internet Site then hit Ok to continue Install Postfix mail server with this command: $ sudo apt install postfix-mysql MariaDB > GRANT ALL PRIVILEGES ON postfixadmin.* TO IDENTIFIED BY '5tr0n6p455w0rd' Once logged in, let’s run the following commands: MariaDB > CREATE DATABASE postfixadmin If a password is required to log in to MySQL shell, then run this command: $ mysql -u root -p If your MySQL root user does not have a password, you can run this command to log in to the MySQL shell. ![]() $ sudo chown -R vmail:mail /var/vmail Step 4. $ sudo useradd -r -u 150 -g mail -d /var/vmail -s /sbin/nologin -c "Virtual Mail User" vmail Let’s run the following commands to create a system user called ‘vmail’ and create a directory and give the proper permission. You can skip this step if these are already installed on your server. Now, let’s install the webserver, database server, and PHP $ sudo apt install apache2 mariadb-server php- libapache2-mod-php The above command is just an example, you would need to use your own registered domain name to create a hostname. For example, we will create as the server hostname, let’s run this command: $ sudo hostnamectl set-hostname You would need to create a DNS A record for your hostname because the server hostname should be an FQDN. To update the system, you can run this command: $ sudo apt update & sudo apt upgrade Step 2. You should get this output: No LSB modules are available.ĭescription: Debian GNU/Linux 11 (bullseye) You can check whether you have the proper Debian version installed on your server with the following command: $ lsb_release -a Additionally, replace “IP_Address” and “Port_Number” with your server’s IP address and SSH port. Remember to replace “master” with a user that has sudo privileges, or root. Log in to your Debian 11 VPS through SSH as a root user or as a regular user with sudo privileges $ ssh -p Port_number SSH root access or a regular system user with sudo privileges. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |