Mail Log Configuration
Mail Log Configuration
Date: 22-August-2023
Submitted By Submitted To
Amit Kusmi
Anil Kushma Salim Shrestha
Table of Content
Mail Log Configuration................................................................................................................1
Step 1: Create PHP-FPM Instances............................................................................................1
Step 2: Configure the Mlog Configuration files........................................................................ 2
I. index.php............................................................................................................................. 3
vi index.php : Here we change server_name and port number............................................... 3
II. application.php.....................................................................................................................3
vi application.php: Here we change the server_name............................................................3
III. login.php............................................................................................................................. 3
IV. log.php................................................................................................................................ 3
V. log_outgoing.php................................................................................................................. 4
VI. logout.php...........................................................................................................................4
Step 3: Mount File Sharing using SAMBA.................................................................................4
Step 4: Now configure the Nginx............................................................................................... 5
How to insert the users into Mysql Database........................................................................... 6
Mail Log Configuration
We have to first configure in the PHP FPM to handle the parallel processing of PHP instances.
The php-fpm service creates a default pool, the configuration (www.conf) for which can be
found in /etc/php/7.4/fpm/pool.d folder. You can customize the default pool as per your
requirements. But it is a standard practice to create separate pools to have better control over
resource allocation to each FPM process. Furthermore, segregating the FPM pool will enable
them to run independently by creating its own master process. That means each php application
can be configured with its own cache settings using PHP-FPM.
cd /etc/php/7.4/fpm/pool.d
ls
cp second.conf third.conf
sudo vi third.conf
1
Now restart the php-fpm : sudo systemctl restart php7.4-fpm
2
Now update the following file of php.
cd /var/www/mlog3
ls
I. index.php
II. application.php
vi application.php: Here we change the server_name
III. login.php
vi login.php
IV. log.php
vi log.php: incoming-domain and logs path
3
V. log_outgoing.php
vi log_outgoing.php: In log_outgoing.php we have to change the filename.
VI. logout.php
vi logout.php: Check if we need to make any changes or not.
mkdir /directory/domains
4
mount -t cifs -o username=-------, password=’----’ \\ip\logs or Domain.
5
sudo vi logs03.conf
server_name logs03.syntegrate.com.org;
root /var/www/mlogs03;
fastcgi_pass_127.0.0.1:9002;
Make sure the above configuration setting is syntactically correct and restart NGINX.
# nginx-t to check the syntax of nginx
# systemctl restart nginx