Query = SELECT goto FROM alias WHERE address='%s' AND active = '1' 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' nano /etc/postfix/sql/mysql_virtual_alias_maps.cf user = postfixadmin Query = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and ername = CONCAT('%u', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1' nano /etc/postfix/sql/mysql_virtual_alias_domain_maps.cf user = postfixadmin Nano /etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf user = postfixadmin Query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1' Once the installation is completed, we need to create configuration files: mkdir -p /etc/postfix/sql/ nano /etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf user = postfixadmin To install postfix run the command bellow: yum install postfix attempting to create/update database structureĬreate a new admin user: bash /var/admin add -password strong_password22 -password2 strong_password22 -superadmin 1 -active 1 $CONF = 'strong_password' Ĭhown -R apache: /var/To populate the database go to and you should see something like below: Testing database connection - OK - Everything seems fine. Open the mail configuration file and edit the following values: nano /var/$CONF = true Download the PostfixAdmin archive from SourceForge and extract it in the /var/www/html/ directory: wget -q -O - "" | tar -xzf -C /var/www/html The latest version of PostfixAdmin, version 3, supports MySQL/MariaDB, PostgreSQL, and SQLite databases. If you don’t have Apache installed, install it with: yum install httpd 5. Install PHP and all necessary PHP modulesĬentOS 7 ships with PHP version 5.4, to install PHP and necessary modules, run: yum install php php-mysql php-imap php-mbstring php-common MariaDB > GRANT ALL PRIVILEGES ON postfixadmin.* TO IDENTIFIED BY 'strong_password' Next, we need to create a database for our postfixadminHQ instance. Run the following command to secure your MariaDB installation: mysql_secure_installation To start the MariaDB service and enable it to start on boot, execute the following commands: systemctl start rvice MariaDB 5.5 is shipped in the default CentOS 7 repository, to install it just run: yum install mariadb-server useradd -r -u 150 -g mail -d /var/vmail -s /sbin/nologin -c "Virtual Mail User" vmail Create system userįor security reasons, we will create a new system user who will be the owner of all mailboxes. Update the system and install necessary packages yum update & yum install wget nano 2. Install PHP and all necessary PHP modules Update the system and install necessary packages
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |