MailWatch icon indicating copy to clipboard operation
MailWatch copied to clipboard

MailWatch: Could not extract Message-ID for xxxxxx

Open ahshek999 opened this issue 1 year ago • 2 comments

Issue summary

After the setup, a MailWatch: Could not extract Message-ID for XXXX is reported which didn't happen before.

Steps to reproduce

2024-08-22T08:12:59.100443+00:00 localhost postfix/cleanup[91758]: C419A8267A: message-id=<> 2024-08-22T08:13:00.420055+00:00 localhost postfix/smtpd[91749]: warning: non-SMTP command from xxx.xxx.xxx[xx.xx.xx.xx]: . 2024-08-22T08:13:00.420480+00:00 localhost postfix/smtpd[91749]: disconnect from xxx.xxx.xxx[xx.xx.xx.xx] helo=1 mail=1 rcpt=1 data=1 unknown=0/1 commands=4/5 2024-08-22T08:13:00.913419+00:00 localhost MailScanner[91678]: New Batch: Scanning 1 messages, 1011 bytes 2024-08-22T08:13:01.075276+00:00 localhost MailScanner[91678]: Virus and Content Scanning: Starting 2024-08-22T08:13:04.998615+00:00 localhost MailScanner[91678]: Spam Checks: Found 1 spam messages 2024-08-22T08:13:05.261799+00:00 localhost MailScanner[91678]: Requeue: C419A8267A.A5A4C to DC718876AD 2024-08-22T08:13:05.263062+00:00 localhost MailScanner[91678]: Uninfected: Delivered 1 messages 2024-08-22T08:13:05.265641+00:00 localhost postfix/qmgr[91001]: DC718876AD: from=[email protected], size=218, nrcpt=1 (queue active) 2024-08-22T08:13:05.268075+00:00 localhost MailScanner[91678]: Deleted 1 messages from processing-database

2024-08-22T08:13:05.270113+00:00 localhost MailScanner[91678]: MailWatch: Could not extract Message-ID for C419A8267A.A5A4C

2024-08-22T08:13:05.270307+00:00 localhost MailScanner[91678]: MailWatch: Logging message C419A8267A.A5A4C to SQL 2024-08-22T08:13:05.278015+00:00 localhost MailWatch SQL[91631]: C419A8267A.A5A4C: Logged to MailWatch SQL 2024-08-22T08:13:05.487888+00:00 localhost postfix/smtp[91772]: DC718876AD: to=[email protected], relay=[xx.xx.xx.yy]:25, delay=20, delays=20/0.03/0.02/0.17, dsn=2.6.0, status=sent (250 2.6.0 [email protected] [InternalId=143816979906579, Hostname=zzz.zzz.com] 2734 bytes in 0.149, 17.860 KB/sec Queued mail for delivery) 2024-08-22T08:13:05.489290+00:00 localhost postfix/qmgr[91001]: DC718876AD: removed

Installation

Version and method

  • MailWatch Version: [ stable 1.2.3]
  • Install type: [ Zip/tarball install]
  • Updated from an older MailWatch or fresh install: [ Fresh install ] (from version [ version ])

Server configuration

  • Operation System: Ubuntu
  • PHP version: [ 8.3.6]
  • Database: [ Docker MariaDB ] [ version ]
  • Mail Server: [ Postfix ]
  • Used web server: [ Apache ]

ahshek999 avatar Aug 22 '24 08:08 ahshek999

The Message-ID header should be set by the sending client or sending mail server. If a mail doesn't have a message id header it cancause sending loops or other issues. That's why the warning is logged. Is that mail coming from a regular mail server?

Skywalker-11 avatar Aug 22 '24 21:08 Skywalker-11

I get the same warning for all messages send through Microsoft O365/Exchange Online. The problem is most likely caused by splitting the Message-ID header over 2 lines. Here is an example:

Message-ID:
 <PR0P264MB0860AECEBAF1CDB17665C7E8A490A@PR0P264MB0860.FRAP264.PROD.OUTLOOK.COM>

Message-ID: is on one line and the next line starts with a space, followed by the message id.

Adri-Koppes avatar May 19 '25 15:05 Adri-Koppes