Message-Id header not added in submission mode

markusa

Member
Mar 26, 2014
8
0
1
cPanel Access Level
Reseller Owner
Hello,

my host is running WHM 11.40.0 (build 31) and we have problems with the message id headers.

emails which are generated locally on the server with no message id header, will be fixed up by Exim and the missing header line will be added.
example:
Code:
Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Wed, 26 Mar 2014 04:57:01 -0700
Received: from username by barracuda.domain.com with local (Exim 4.82)
(envelope-from <[email protected]>)
id 1WSmS5-0005ph-78
for [email protected]; Wed, 26 Mar 2014 04:57:01 -0700
To: [email protected]
Subject: testing
From: [email protected]
Message-Id: <[email protected]>
Date: Wed, 26 Mar 2014 04:57:01 -0700
Please note the internal exim message ID which is then part of the correct message id header line.
Well, this is working ok.

Now to the other scenario, where the server receives emails in submission mode via an MUA, which may not send the email with the message-ID header. so we expect that Exim is fixing this here, too, like the other emails as mentioned above.
However it does NOT.

example:
Code:
Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Wed, 26 Mar 2014 06:58:12 -0700
Received: from p5bxxx57.dip0.t-ipconnect.de ([91.13.7.xx]:22500 helo=PC-W7.domain.com)
by barracuda.elinuxservers.com with esmtpsa (TLSv1HE-RSA-AES256-SHA:256)
(Exim 4.82)
(envelope-from <[email protected]>)
id 1WSoLM-0003PY-8u
for [email protected]; Wed, 26 Mar 2014 06:58:12 -0700
Date: Wed, 26 Mar 2014 14:58:00 +0100
To: [email protected]
From: User Name <[email protected]>
Subject: test test
My host is blaming cPanel for that being a standard configuration, and they have no clue on how to fix that.
We have tried a custom ACL rule under WHM > Exim Configuration Editor > Advanced Mode > and added the following in the ACL section:

warn hosts = +relay_from_hosts
control = submission/sender_retain

But my host said, this has crashed the default cPanel mail config and they had to reinstall Spamassassin and revert the action

Any ideas or anybody successful to get this working with cPanel config ?

The largest email providers in the world like Google, Microsoft etc. have this feature working.
Why is it not working with cPanel? I find this very strange.

We need this working to lower spam scoring, since spamassassin adds spam score for missing message ID headers.

Thanks,

Markus
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
We have tried a custom ACL rule under WHM > Exim Configuration Editor > Advanced Mode > and added the following in the ACL section:

warn hosts = +relay_from_hosts
control = submission/sender_retain

But my host said, this has crashed the default cPanel mail config and they had to reinstall Spamassassin and revert the action
Could you elaborate on the specific error messages that occurred when making those custom changes?

Thank you.
 

markusa

Member
Mar 26, 2014
8
0
1
cPanel Access Level
Reseller Owner
sorry for late reply, but I assumed I subscribed to the thread, which was obviously not the case.

my host told me:
--
We were unable to save the mentioned ACL and the error was showing as "malformed ACL name". We have tried to fix the error by ignoring the error and cause the exim configuration to break and it started affecting the mailing service. We have quickly put the old config which fixed the issue with exim.
--

Hope this helps.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
I believe it's the responsibility of the MUA to add that information to the header. You could follow the instructions here to have Exim treat the message as a local submission:

46. Message processing

I was able to add the entries to the "acl_smtp_connect" field in the Advanced Editor for Exim in WHM without error.

Thank you.
 

markusa

Member
Mar 26, 2014
8
0
1
cPanel Access Level
Reseller Owner
My host tried again to add the entries

warn hosts = +relay_from_hosts
control = submission/sender_retain

but they received this error:
exim.png

Did you add different entries ?

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
I browsed to the "Advanced Editor" for Exim and searched for the following term with my browser:

custom_begin_connect

This is just beneath the "acl_smtp_connect" entry. The full text I used was:

Code:
warn hosts = 127.0.0.1
control = submission/sender_retain
Does this accomplish what you are seeking to implement?

Thank you.
 

markusa

Member
Mar 26, 2014
8
0
1
cPanel Access Level
Reseller Owner
thanks, but unfortunately not.

After testing it has been noticed, that the ACL had no effect.

Digging up exim manual again and it says that the 'control = submission' modifier is only permitted within a few ACL, otherwise the setting is being ignored.

--- from exim manual --------------
control = submission/<options>

This control is permitted only for the MAIL, RCPT, and start of data ACLs (the latter is the one defined by acl_smtp_predata). Setting it tells Exim that the current message is a submission from a local MUA. In this case, Exim operates in “submission mode”, and applies certain fixups to the message if necessary. For example, it adds a Date: header line if one is not present. This control is not permitted in the acl_smtp_data ACL, because that is too late (the message has already been created).
------------------------------------

So I think, this should be removed from custom_begin_connect within acl_smtp_connect

and being saved to one of the 3 mentioned ACL sections

acl_smtp_mail
or
acl_smtp_rcpt
or
acl_smtp_predata

What do you think?

Thanks for help and advice.