Wrong message-id while cron mails okay

Hi,

I’m just setting up my second Zammad server and experiencing a small problem:

Infos:

  • Used Zammad version: 5.1.1-1653048051.ea163bb0.focal
  • Used Zammad installation type: package
  • Operating system: Ubuntu 20.04 x64 LTS server
  • Browser + version: Firefox 100.0.2

Expected behavior:

  • Zammad should send mail with fqdn in message-id

Actual behavior:

  • Zammad sends mail with myhostname.mail in message-id
  • uncle cron sends with fqdn, so system seems to be okay (fresh install of ubu 20.04 vm)

How can I change this behiavour?
I already changed the postfix configuration, but that one is okay.
The system is able to send cron mails to my exchange on-prem server and they arrive at my mailbox with correct fqdn

This is what log says:

This is what Zammad does:

May 23 18:18:35 myhostname postfix/pickup[4294]: 63C5614192E: uid=115 from=<ticket@mydomain.de>
May 23 18:18:35 myhostname postfix/cleanup[4648]: 63C5614192E: message-id=<628bb3db61f6d_13a62c4ac2767d@myhostname.mail>
May 23 18:18:35 myhostname postfix/qmgr[4295]: 63C5614192E: from=<ticket@mydomain.de>, size=815, nrcpt=1 (queue active)
May 23 18:18:35 myhostname postfix/smtp[4650]: 63C5614192E: to=<verify-external-smtp-sending@discard.zammad.org>, relay=MY-ONPREM-EXCH.mydomain.de[192.168.41.114]:25, delay=0.11, delays=0/0/0/0.11, dsn=2.6.0, status=sent (250 2.6.0 <628bb3db61f6d_13a62c4ac2767d@myhostname.mail> [InternalId=34398393073675, Hostname=MY-ONPREM-EXCH.mydomain.de] 2250 bytes in 0.101, 21,690 KB/sec Queued mail for delivery)
May 23 18:18:35 myhostname postfix/qmgr[4295]: 63C5614192E: removed

This is what Cron does:

May 23 18:19:01 myhostname CRON[5351]: pam_unix(cron:session): session opened for user root by (uid=0)
May 23 18:19:01 myhostname CRON[5352]: (root) CMD (/ADMIN/./test.sh)
May 23 18:19:01 myhostname postfix/pickup[4294]: 4DAAE14192E: uid=0 from=<root>
May 23 18:19:01 myhostname CRON[5351]: pam_unix(cron:session): session closed for user root
May 23 18:19:01 myhostname postfix/cleanup[4648]: 4DAAE14192E: message-id=<20220523161901.4DAAE14192E@myhostname.mydomain.de>
May 23 18:19:01 myhostname postfix/qmgr[4295]: 4DAAE14192E: from=<root@mydomain.de>, size=674, nrcpt=1 (queue active)
May 23 18:19:01 myhostname postfix/smtp[4650]: 4DAAE14192E: to=<myaddress@mydomain.de>, relay=MY-ONPREM-EXCH.mydomain.de[192.168.41.114]:25, delay=0.11, delays=0/0/0/0.11, dsn=2.6.0, status=sent (250 2.6.0 <20220523161901.4DAAE14192E@myhostname.mydomain.de> [InternalId=34398393073676, Hostname=MY-ONPREM-EXCH.mydomain.de] 2100 bytes in 0.102, 19,987 KB/sec Queued mail for delivery)
May 23 18:19:01 myhostname postfix/qmgr[4295]: 4DAAE14192E: removed

Thanks a lot for your help! :upside_down_face:

This problem is limited to two mails being generated by zammad:

Mail 1 (setting up mail transmission via local mta OR smtp, regardless):

From: zammad-mail-address@mydomain.TLD
To: verify-external-smtp-sending@discard.zammad.org
Subject: This is a Test Email
Message-ID: <111a222b33f44_cd55e6666666f@systemhostname.mail>

Mail 2 (setting up mail account for receiving which results in “getting started mail”):

From: zammad-mail-address@mydomain.TLD
To: zammad-mail-address@mydomain.TLD
Subject: Zammad Getting started Test Email #a123b456cd78ef90g123
Message-ID: <123a456b78f90_cd12e3456789f@systemhostname.mail>

The difference between these two mails is that the latter is being sent to the “internal” mail address. From and To fields are the same.
The on-prem exchange respects the receptor of the mail as it is an internal mail address and forwards it to exchange online (AD and exchange in hybrid mode [365]). Microsoft servers are rewriting the message-id in sequence!

Only these two mails are getting a message-id from zammad with “@myzammadfqdn.mail”.
This could be a possible bug, would someone please have a look?

All other mails are leaving the server as they should, with the @hostname.domain.tld extension in message-id (in my case).
This may correlate to correct postfix settings or not. Maybe zammad does not generate message-id’s and postfix has to do the job or zammad generates a correct message-id. I didn’t check the sourcecode.

The generated message-id containing your hostname is not a problem at all.
At least I don’t see the issue.

As per RFC it’s valid. No bug at all and working as designed.

Great. There is no problem. It’s as simple as that.
This is just my imagination.

[Irony]
BTW: All other mails zammad sends are okay. So they all must have a faulty message-id. Maybe you should fix that.
[Irony off]