This is what you usually see in mailman’s logs
shell
1delivery to user@example.com failed with code -1: (110, 'Connection timed out')2delivery to user@example.com failed with code -1: (-2, 'Name or service not known')3delivery to user@example.com failed with code -1: Server not connected4delivery to user@example.com failed with code -1: (4 , 'Interrupted system call')5Low level smtp error: (111,'Connection refused')We can improve that with a simple change: have a mailman log every SMTP transaction.
Open /usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/SMTPDirect.py with your favourite editor and search for:
python
1def __connect(self):2self.__conn = smtplib.SMTP()3self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT)Change it to:
python
1def __connect(self):2self.__conn = smtplib.SMTP()3self.__conn.set_debuglevel(1)4self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT)Restart mailman
shell
1/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl restartYou can now check the mailman’s logs
shell
1tail -f /usr/local/cpanel/3rdparty/mailman/logs/*Now you can debug and troubleshoot any issue by checking these logs.
