mailwatch / MailWatch

MailWatch for MailScanner is a web-based front-end to MailScanner
http://mailwatch.org/
GNU General Public License v2.0
115 stars 66 forks source link

SEC_TO_TIME formatting in mailwatch-sendmail-relay #1275

Closed perplexityjeff closed 1 year ago

perplexityjeff commented 1 year ago

Issue summary

Had a error in the mailwatch_sendmail_relay.php script and was unable to get it working. When checking the status of the service it responded with that there was an mysql exception.

In our case the xdelay field was formatted in our mail log as HH:MM:SS therefor the function dbquery failed in the mtalogprocessor.inc.php because the sql function SEC_TO_TIME was not formatted in seconds but in HH:MM:SS.

For us removing the SEC_TO_TIME function in the dbquery of mtalogprocessor.inc.php and just use the delay as is the dbquery was enough to get it back working.

Installation

Version and method

Server configuration