08TroubleShooting - amagerard/Mail GitHub Wiki
RedHat/Mail
1- Network | 2- Postfix | 3- Dovecot | 4- Postfixadmin | 5- PostfixMariaDB | 6- DovecotMariaDB |
---|---|---|---|---|---|
7- RelaySmtp | 8- Troubleshoot | 9- Selinux | 10- GnomeShell | 11- Backup |
8. Troubleshooting.
8.1 New installation with RedHat 9.5.
January 29, 2025. I did a clean install again.
php-fpm-8.3.11-1
August 28, 2024
8.2 Updated - You have after open session.
Invalid token (session timeout; refresh the page and try again?)
cd /var/lib/php
Change apache group by nginx .
chgrp -R nginx opcache
chgrp -R nginx session
chgrp -R nginx wsdlcache
systemctl restart php-fpm
8.3 Updated August 2, 2024
Installation from Red Hat 9.4.
Beware,there are differences with Almalinux 9.4.
But easily found.
Only checked on Ipad version IOS 15.6.
The email password must be strong and at least 8 characters.
The duration of the self-signed certificate must be one year only.
Usually I can select "trust" when the self-signed certificate is displayed on the Ipad.
This is no longer possible.
This may be a bug in IOS 15.6 and also is IOS 18.
The mail configuration on IOS 18 will be done in the apps.
8.4 Update april 25,2024.
8.4.1. Update MariaDB.
vi /etc/yum.repos.d/mariadb.repo
Change baseurl 11.X by the latest version MariaDB.
dnf update
Answer "no".
dnf remove MariadDBserver
dnf install MariaDB-server
systemctl enable --now mariadb
mariadb-upgrade -u root -p
8.4.2. Remove all old kernel`
Find your kernel.
uname -a
See free space.
df /boot
ls -l /boot
List kernels.
rpm -qa| grep kernel-core
Remove old kernel.
dnf remove kernel-core-XX
Now see free space.
df /boot
8.4.3 All update.
dnf update
Answer "yes".
reboot
8.4 Update december 18,2023.
vi /etc/crontab
delete # at the line @reboot root setenforce 0
# disable all services
systemctl disable httpd
systemctl disable mariadb
systemctl disable php-fpm
systemctl disable postfix
systemctl disable dovecot
reboot
dnf update
#update MariaDB - Perhaps you remove old MariaDb-server
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | bash
dnf update
mariadb-upgrade -u root -p
# update PHP 8.3
dnf install http://fr2.rpmfind.net/linux/remi/enterprise/remi-release-9.2.rpm
dnf module reset php
dnf module enable php:remi-8.3
dnf update
vi /etc/crontab
add # at the line #@reboot root setenforce 0
reboot
# enable all services
systemctl enable --now mariadb
systemctl status mariadb
systemctl enable --now httpd
systemctl status httpd
systemctl enable --now php-fpm
systemctl status php-fpm
systemctl enable --now postfix
systemctl status postfix
systemctl enable --now dovecot
systemctl status dovecot
reboot
# all is well
8.5 Service Postfix.
Bug resolved with version postfix-3.5.9-24.el9.x86_64 (2024-03-31).
systemctl status postfix
The postfix service status displays this message.
restorecon[4541]: /usr/sbin/restorecon: lstat(/var/spool/postfix/pid/master.pid) failed: No such file or director
The solution to remove this message.
systemctl stop postfix
systemctl disable postfix
vi /usr/lib/systemd/system/postfix.service
Add a line.
ExecStartPre=-/usr/bin/touch /var/spool/postfix/pid/master.pid
Before the line below.
ExecStartPre=-/usr/sbin/restorecon -R /var/spool/postfix/pid/master.pid
systemctl enable --now postfix
systemctl status postfix
reboot
and recheck postfix status.
8.6 Automatic restart.
If for some reason the dovecot or postfix services would be stopped.
8.6.1 dovecot.
mkdir -p /etc/systemd/system/dovecot.service.d
vi /etc/systemd/system/dovecot.service.d/custom.conf
#linuxbabe Xiao Guoan
[Service]
Restart=always
RestartSec=5s
systemctl daemon-reload
test: pkill dovecot
wait 5 s.
systemctl status dovecot
8.6.2 Postfix.
mkdir -p /etc/systemd/system/postfix.service.d
vi /etc/systemd/system/postfix.service.d/custom.conf
#linuxbabe Xiao Guoan
[Service]
Restart=on-failure
RestartSec=5s
systemctl daemon-reload
test: pkill master
wait 5 s.
systemctl status postfix
8.6 Command list.
- Purge all queues.
postsuper -d ALL
- Queues list.
postqueue -p
- Mail Server : Mail Log Report : pflogsumm.
dnf -y install postfix-perl-scripts
Generate mail log summary for yesterday.
perl /usr/sbin/pflogsumm -d yesterday /var/log/maillog