Symptoms
-
Postfix fails to start:
# systemctl start postfix.service
Job for postfix.service failed because a timeout was exceeded. See “systemctl status postfix.service” and “journalctl -xe” for details. -
The Postfix mail queue has enormous size:
# du -h –max-depth=0 /var/spool/postfix/
30G /var/spool/postfix/ -
Many emails are sent from the same sender in a short time:
# mailq | grep [email protected] | head
ED0079051218 1936 Tue Dec 26 10:25:26 [email protected]
699C690519B8 1910 Tue Dec 26 10:25:27 [email protected]
ED9669051219 1920 Tue Dec 26 10:25:26 [email protected]
6B22C90519B9 1907 Tue Dec 26 10:25:27 [email protected]
00F18905121A 1914 Tue Dec 26 10:25:27 [email protected]
Cause
Postfix fails to start because it cannot handle mail queue due to its size.
Resolution
-
Connect to the server via SSH;
-
Get
MESSAGE_ID
searching all mails with [email protected] as a sender with following command:# plesk sbin mailqueuemng –sender [email protected]
-
Remove mails from mail queue with its
MESSAGE_ID
with following command:# plesk sbin mailqueuemng –remove MESSAGE_ID
Alternatively, clear all mail queue according to the solution described in following article: How to clear the entire mail queue
Note: suspending the spamming account or setting an outgoing mail limit as described in the following article: How to set limitations on outgoing email messages in Plesk