110Maintenance - amagerard/Mail GitHub Wiki
| 1- Network | 2- Postfix | 3- Dovecot | 4- Postfixadmin | 5- PostfixMariaDB | 6- DovecotMariaDB |
|---|---|---|---|---|---|
| 7- RelaySmtp | 8- Troubleshoot | 9- Selinux | 10- GnomeShell | 11- Maintenance |
Save the postfixadmin database.
mariadb-dump -u root -p postfixadmin > backup_postfixadmin.sql
Save only data.
mariadb-dump -u root -p --no-create-db --no-create-info postfixadmin > backup_postfixadmin_data.sql
Restore the postfixadmin database.
mariadb -u root -p postfixadmin < backup_postfixadmin.sql
Restore only date.
mariadb -u root -p postfixadmin < backup_postfixadmin_data.sql
Change password.
mariadb -u root -p mysql
MariaDB [mysql]> select user,host,password from mysql.user;
alter user 'username'@'localhost' identified by 'NewPassword';
cd /var/vmail/<domain>.
If for some reason the dovecot or postfix services would be stopped.
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
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
- 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