Community Discussions and Support
Mercury C 'From:' header parsing problem

As for the other two fields (Sender: and X-Envelope-To:), neither

are in the headers section. It might help if I clarified that I'm using

Mercury's POP3 D connector for retrieval on these accounts, not SMTP.

Should not make any difference unless you are delivering directly to a users mailbox instead of allowing Mercury core to do this.  

As for 4.01b, I just noticed the new version of Mercury and I have

put upgrading on my todo list. Will the new version install on top of

the old and maintain configurations or will it need to be a clean

uninstall/reinstall with a manual reconfiguration of all options?

Just install as an upgrade over the current setup.  Have to shut down Mercury while you do the upgrade but other than that it should take seconds to do.

 

<blockquote>As for the other two fields (Sender: and X-Envelope-To:), neither are in the headers section. It might help if I clarified that I'm using Mercury's POP3 D connector for retrieval on these accounts, not SMTP. </blockquote>Should not make any difference unless you are delivering directly to a users mailbox instead of allowing Mercury core to do this.   <blockquote><p>As for 4.01b, I just noticed the new version of Mercury and I have put upgrading on my todo list. Will the new version install on top of the old and maintain configurations or will it need to be a clean uninstall/reinstall with a manual reconfiguration of all options? </p></blockquote><p>Just install as an upgrade over the current setup.  Have to shut down Mercury while you do the upgrade but other than that it should take seconds to do.</p><p> </p>

I have recently started using the SMTP relay module in Mercury 4.01b to relay some of my email to an Exchange server. One of my vendors uses an automated reply with a FROM: header that appears to be causing the SMTP C module some problems.

The header field looks like this:

From: Bush Hog, "L.L.C." <first.last@bushhog.com>

I've replaced the user name, however the rest of the line is verbatim; pasted directly from the raw message as stored locally by Mercury.

The module relays this (copied from the log file):

10:22:23.781: << MAIL FROM:<Bush Hog> SIZE=2877<cr><lf>
10:22:23.781: >> 501 5.5.4 Invalid Address<cr><lf>

Mercury tries to send an NDR to <Bush Hog> which results in 3 NDR's to the postmaster as the invalid address gracefully deteriorates. Mercury tries to followup the first failed address with the following:

10:26:27.093: << MAIL FROM:<> SIZE=5368<cr><lf>
10:26:27.093: >> 250 2.1.0 <>....Sender OK<cr><lf>
10:26:27.093: << RCPT TO:<<>><cr><lf>
10:26:27.093: >> 501 5.5.4 Invalid Address<cr><lf>

At the moment I'm filtering out these incoming messages while I work on a solution. I haven't received a reply from the vendor yet as to whether they can or will change their address field.

Is this a possible flaw in the module parsing routine or just a weakness exposed by a bad and/or invalid address field?

Any other thoughts or suggestions on this problem? I get 3-4 of these replies per day and they are necessary for verification and tracking of orders so I can't just dump them.

Thanks for any and all replies.

Regards,

Dave

 

&lt;P&gt;I have recently started using the SMTP relay module in Mercury 4.01b to relay some of my email to an Exchange server. One of my vendors uses an automated reply with a FROM: header that appears to be causing the SMTP C module some problems. &lt;/P&gt; &lt;P&gt;The header field looks like this:&lt;/P&gt; &lt;P&gt;From: Bush Hog, &quot;L.L.C.&quot; &amp;lt;first.last@bushhog.com&amp;gt;&lt;/P&gt; &lt;P&gt;I&#039;ve replaced the&amp;nbsp;user name,&amp;nbsp;however the rest of the line is verbatim; pasted directly from the raw message as stored locally by Mercury.&lt;/P&gt; &lt;P&gt;The module&amp;nbsp;relays this (copied from the log file):&lt;/P&gt; &lt;P&gt;10:22:23.781: &amp;lt;&amp;lt; MAIL FROM:&amp;lt;Bush Hog&amp;gt; SIZE=2877&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt; 10:22:23.781: &amp;gt;&amp;gt; 501 5.5.4 Invalid Address&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/P&gt; &lt;P&gt;Mercury&amp;nbsp;tries to send an NDR to &amp;lt;Bush Hog&amp;gt; which results in 3 NDR&#039;s to the postmaster as the invalid address gracefully deteriorates. Mercury tries to followup the first&amp;nbsp;failed address with the following: &lt;/P&gt; &lt;P&gt;10:26:27.093: &amp;lt;&amp;lt; MAIL FROM:&amp;lt;&amp;gt; SIZE=5368&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt; 10:26:27.093: &amp;gt;&amp;gt; 250 2.1.0 &amp;lt;&amp;gt;....Sender OK&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt; 10:26:27.093: &amp;lt;&amp;lt; RCPT TO:&amp;lt;&amp;lt;&amp;gt;&amp;gt;&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt; 10:26:27.093: &amp;gt;&amp;gt; 501 5.5.4 Invalid Address&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/P&gt; &lt;P&gt;At the moment I&#039;m filtering out these incoming messages while I work on a solution. I haven&#039;t received a reply from the vendor yet as to whether they can or will change their address field.&lt;/P&gt; &lt;P&gt;Is this a possible flaw in the module parsing routine or just a weakness exposed by a bad and/or invalid address field?&lt;/P&gt; &lt;P&gt;Any other thoughts or suggestions on this problem? I get 3-4 of these replies per day and they are necessary for verification and tracking of orders so I can&#039;t just dump them.&lt;/P&gt; &lt;P&gt;Thanks for any and all replies.&lt;/P&gt; &lt;P&gt;Regards,&lt;/P&gt; &lt;P&gt;Dave&lt;/P&gt; &lt;P mce_keep=&quot;true&quot;&gt;&amp;nbsp;&lt;/P&gt;

Mercury 4.01b
You really should upgrade.
From: Bush Hog, "L.L.C." <first.last@bushhog.com>
This is two addresses in the from field and when used in a reply it will send mail to the addresses Bush Hog and  "L.L.C." <first.last@bushhog.com>.  When this is auto forwarded though Mercury/32 is going to use the first address as the MAIL FROM: address.  The sender should either remove the comma from the address or enclose the entire text in quotes, i.e. "Bush Hog, L.L.C." <first.last@bushhog.com>  Until they fix their from address you really need to use a filter or alias to catch this one and forward it to a local account for manual handling.

FWIW, what is shown in the Sender: field and the X-Envelope-To: of a delivered message.
&lt;blockquote&gt;Mercury 4.01b &lt;/blockquote&gt;You really should upgrade. &lt;blockquote&gt;From: Bush Hog, &quot;L.L.C.&quot; &amp;lt;first.last@bushhog.com&amp;gt;&lt;/blockquote&gt;This is two addresses in the from field and when used in a reply it will send mail to the addresses Bush Hog and&amp;nbsp; &quot;L.L.C.&quot; &amp;lt;first.last@bushhog.com&amp;gt;.&amp;nbsp; When this is auto forwarded though Mercury/32 is going to use the first address as the MAIL FROM: address.&amp;nbsp; The sender should either remove the comma from the address or enclose the entire text in quotes, i.e. &quot;Bush Hog, L.L.C.&quot; &amp;lt;first.last@bushhog.com&amp;gt;&amp;nbsp; Until they fix their from address you really need to use a filter or alias to catch this one and forward it to a local account for manual handling. FWIW, what is shown in the Sender: field and the X-Envelope-To: of a delivered message.

Thank you for the reply. It confirms my suspicions. Perusing RFC2822 also pointed to the ',' and mailbox-list layout of the problem field.

 As for the other two fields (Sender: and X-Envelope-To:), neither are in the headers section. It might help if I clarified that I'm using Mercury's POP3 D connector for retrieval on these accounts, not SMTP.

As for 4.01b, I just noticed the new version of Mercury and I have put upgrading on my todo list. Will the new version install on top of the old and maintain configurations or will it need to be a clean uninstall/reinstall with a manual reconfiguration of all options? 

Thanks again for the swift response.

&lt;P&gt;Thank you for the reply. It confirms my suspicions. Perusing RFC2822 also pointed to the &#039;,&#039; and mailbox-list layout of the problem field.&lt;/P&gt; &lt;P&gt;&amp;nbsp;As for the other two fields (Sender:&amp;nbsp;and&amp;nbsp;X-Envelope-To:), neither are in the headers section. It might help if I clarified that I&#039;m&amp;nbsp;using Mercury&#039;s POP3 D connector for retrieval on these accounts, not SMTP. &lt;/P&gt; &lt;P&gt;As for 4.01b, I just noticed the new version of Mercury and I have put upgrading on my todo list.&amp;nbsp;Will the new version install on top of the old and maintain configurations or will it need to be a clean uninstall/reinstall with a manual reconfiguration of all options?&amp;nbsp;&lt;/P&gt; &lt;P&gt;Thanks again for the swift response.&lt;/P&gt;
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft