Community Discussions and Support
Error: "Invalid TLS extension list item header" with googlemail

Thanks for the explanation about Gmail's sending options - I must have seen that some time ago but didn't use it.

Anyway, I'm glad you found a solution to the problem.  I assume that something has changed with Gmail's use of TLS and Mercury's Cryptlib library is no longer compatible.  When Mercury switches over to using OpenSSL these sorts of issues should disappear!

<P>Thanks for the explanation about Gmail's sending options - I must have seen that some time ago but didn't use it.</P> <P>Anyway, I'm glad you found a solution to the problem.  I assume that something has changed with Gmail's use of TLS and Mercury's Cryptlib library is no longer compatible.  When Mercury switches over to using OpenSSL these sorts of issues should disappear!</P>

When gmail attempts to send a message to my Mercury mail server (v 4.72) the connection proceeds normally until STARTTLS when everything goes south.  The session log looks like this:

02:19:37.640: >> STARTTLS<cr><lf>
02:19:37.640: << 220 OK, begin SSL/TLS negotiation now.<cr><lf>
02:19:37.781: 22: Error -32 activating SSL session (locus 0, type 0, code 0, 'Invalid TLS extension list item header')
02:19:37.781: --- Connection closed normally at Sat Jun 30 02:19:37 2012. ---
02:19:37.781:

Does anyone have any idea what is going on here?

Thanks in advance!

&lt;p&gt;When gmail attempts to send a message to my Mercury mail server (v 4.72) the connection proceeds normally until STARTTLS when everything goes south.&amp;nbsp; The session log looks like this:&lt;/p&gt;&lt;p&gt;02:19:37.640: &amp;gt;&amp;gt; STARTTLS&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt; 02:19:37.640: &amp;lt;&amp;lt; 220 OK, begin SSL/TLS negotiation now.&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt; 02:19:37.781: 22: Error -32 activating SSL session (locus 0, type 0, code 0, &#039;Invalid TLS extension list item header&#039;) 02:19:37.781: --- Connection closed normally at Sat Jun 30 02:19:37 2012. --- 02:19:37.781: &lt;/p&gt;&lt;p&gt;Does anyone have any idea what is going on here?&lt;/p&gt;&lt;p&gt;Thanks in advance!&lt;/p&gt;

I ran into this a while ago with Gmail but didn't worry about it because the next connection attempt didn't call STARTTLS and the email was delivered successfully. (v.4.72, 73 and 74) Recently I have noticed that Gmail no longer tries to send without STARTTLS after the first connection. It just keeps trying a new connection using STARTTLS and after a few days it finally gives up and sends the email without it.

I found a posting by a user that asked Gmail to add support for STARTTLS but I don't know if they have implemented it: https://groups.google.com/forum/?fromgroups#!topic/Gmail-Help-Message-Delivery-en/YBKHhri9EoQ

If you use it, I suppose it may be possible that Gmail doesn't like the 1024-bit SSL cert generated by Mercury. Perhaps Gmail wants a stronger key? Not sure though, just wondering.

In light of the recent delays, for now I have disabled "SSL/TLS support by default on primary port" in MercuryS (SMTP Server) and all is working fine now.

Hope that helps a bit.

&lt;p&gt;I ran into this a while ago with Gmail but didn&#039;t worry about it because the next connection attempt didn&#039;t call STARTTLS and the email was delivered successfully. (v.4.72, 73 and 74) Recently I have noticed that Gmail no longer tries to send without STARTTLS after the first connection. It just keeps trying a new connection using STARTTLS and after a few days it finally gives up and sends the email without it. &lt;/p&gt;&lt;p&gt;I found a posting by a user that asked Gmail to add support for STARTTLS but I don&#039;t know if they have implemented it: https://groups.google.com/forum/?fromgroups#!topic/Gmail-Help-Message-Delivery-en/YBKHhri9EoQ&lt;/p&gt;&lt;p&gt;If you use it, I suppose it may be possible that Gmail doesn&#039;t like the 1024-bit SSL cert generated by Mercury. Perhaps Gmail wants a stronger key? Not sure though, just wondering. &lt;/p&gt;&lt;p&gt;In light of the recent delays, for now I have disabled &quot;SSL/TLS support by default on primary port&quot; in MercuryS (SMTP Server) and all is working fine now.&lt;/p&gt;&lt;p&gt;Hope that helps a bit. &lt;/p&gt;

In a similar topic on the Mercury email list today (thanks Craig!)  it was pointed out that one option would be to have SSL/TLS enabeled by default for MercuryS, but add an entry for the Google netblock in MercuryS configuration / Connection control to disable SSL/TLS for that range only.

/Rolf 

&lt;p&gt;In a similar topic on the Mercury email list today (thanks Craig!) &amp;nbsp;it was pointed out that one option would be to have SSL/TLS enabeled by default for MercuryS, but add an entry for the Google netblock in MercuryS configuration / Connection control to disable SSL/TLS for that range only.&lt;/p&gt;&lt;p&gt;/Rolf&amp;nbsp;&lt;/p&gt;

Great suggestion, thanks!

Google lists their authorized hosts in their SPF record. You can use this to get the IP ranges (quite a few) needed to populate the connection control rule in MercuryS.

nslookup -q=TXT _netblocks.google.com 8.8.8.8

http://support.google.com/a/bin/answer.py?hl=en&answer=60764

&lt;p&gt;Great suggestion, thanks!&lt;/p&gt;&lt;p&gt;Google lists their authorized hosts in their SPF record. You can use this to get the IP ranges (quite a few) needed to populate the connection control rule in MercuryS.&lt;/p&gt;&lt;p&gt;nslookup -q=TXT _netblocks.google.com 8.8.8.8&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://support.google.com/a/bin/answer.py?hl=en&amp;amp;answer=60764&quot; mce_href=&quot;http://support.google.com/a/bin/answer.py?hl=en&amp;amp;answer=60764&quot;&gt;http://support.google.com/a/bin/answer.py?hl=en&amp;amp;answer=60764 &lt;/a&gt; &lt;/p&gt;

I got Google's IP ranges in CIDR format from their SPF record and converted it into plain IP ranges ready to be entered in Mercury's Connection Control dialog box.

Should anyone else need the table, here it is:

216.239.32.0/19        216.239.32.0 - 216.239.63.255
64.233.160.0/19        64.233.160.0 - 64.233.191.255
66.249.80.0/20        66.249.80.0 - 66.249.95.255
72.14.192.0/18        72.14.192.0 - 72.14.255.255
209.85.128.0/17        209.85.128.0 - 209.85.255.255
66.102.0.0/20        66.102.0.0 - 66.102.15.255
74.125.0.0/16        74.125.0.0 - 74.125.255.255
64.18.0.0/20        64.18.0.0 - 64.18.15.255
207.126.144.0/20    207.126.144.0 - 207.126.159.255
173.194.0.0/16        173.194.0.0 - 173.194.255.255

HTH,

  Corrado

 

&lt;p&gt;I got Google&#039;s IP ranges in CIDR format from their SPF record and converted it into plain IP ranges ready to be entered in Mercury&#039;s Connection Control dialog box.&lt;/p&gt;&lt;p&gt;Should anyone else need the table, here it is:&lt;/p&gt;&lt;p&gt;216.239.32.0/19&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 216.239.32.0 - 216.239.63.255 64.233.160.0/19&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 64.233.160.0 - 64.233.191.255 66.249.80.0/20&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 66.249.80.0 - 66.249.95.255 72.14.192.0/18&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 72.14.192.0 - 72.14.255.255 209.85.128.0/17&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 209.85.128.0 - 209.85.255.255 66.102.0.0/20&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 66.102.0.0 - 66.102.15.255 74.125.0.0/16&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 74.125.0.0 - 74.125.255.255 64.18.0.0/20&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 64.18.0.0 - 64.18.15.255 207.126.144.0/20&amp;nbsp;&amp;nbsp;&amp;nbsp; 207.126.144.0 - 207.126.159.255 173.194.0.0/16&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 173.194.0.0 - 173.194.255.255 &lt;/p&gt;&lt;p&gt;HTH,&lt;/p&gt;&lt;p&gt;&amp;nbsp; Corrado &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

I am having the same problem, but it is when gmail tries to relay through my Mercury mail server (not when trying to deliver mail to my Mercury mail server).  The session log looks like this:

 15:36:34.953: Connection from 209.85.213.171, Thu Aug 09 15:36:34 2012<lf>

15:36:34.968: << 220 mail.myserver.com ESMTP server ready.<cr><lf>

15:36:34.046: >> EHLO mail-yx0-f171.google.com<cr><lf>

15:36:34.062: << 250-mail.myserver.com Hello mail-yx0-f171.google.com; ESMTPs are:<cr><lf>250-TIME<cr><lf>

15:36:34.062: << 250-SIZE 0<cr><lf>

15:36:34.062: << 250-AUTH CRAM-MD5<cr><lf>

15:36:34.062: << 250-STARTTLS<cr><lf>

15:36:34.062: << 250 HELP<cr><lf>

15:36:34.265: >> STARTTLS<cr><lf>

15:36:34.265: << 220 OK, begin SSL/TLS negotiation now.<cr><lf>

15:36:35.343: 22: Error -32 activating SSL session (locus 0, type 0, code 0, 'Invalid TLS extension list item header')

15:36:35.343: --- Connection closed normally at Thu Aug 09 15:36:35 2012. ---

 

I turned off the global option to enable SSL/TLS on the default port, but then gmail would not relay my mail since I didn't support TLS.

 

I use gmail as my mail reader, but when sending I have it relay through my mail server with TLS.  It used to work...  Any suggestions?

Thanks,

Mark 

&lt;p&gt;I am having the same problem, but it is when gmail tries to relay through my Mercury mail server (not when trying to deliver mail to my Mercury mail server). &amp;nbsp;The session log looks like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;15:36:34.953: Connection from 209.85.213.171, Thu Aug 09 15:36:34 2012&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:34.968: &amp;lt;&amp;lt; 220 mail.myserver.com ESMTP server ready.&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:34.046: &amp;gt;&amp;gt; EHLO mail-yx0-f171.google.com&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:34.062: &amp;lt;&amp;lt; 250-mail.myserver.com Hello mail-yx0-f171.google.com; ESMTPs are:&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;250-TIME&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:34.062: &amp;lt;&amp;lt; 250-SIZE 0&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:34.062: &amp;lt;&amp;lt; 250-AUTH CRAM-MD5&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:34.062: &amp;lt;&amp;lt; 250-STARTTLS&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:34.062: &amp;lt;&amp;lt; 250 HELP&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:34.265: &amp;gt;&amp;gt; STARTTLS&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:34.265: &amp;lt;&amp;lt; 220 OK, begin SSL/TLS negotiation now.&amp;lt;cr&amp;gt;&amp;lt;lf&amp;gt;&lt;/p&gt;&lt;p&gt;15:36:35.343: 22: Error -32 activating SSL session (locus 0, type 0, code 0, &#039;Invalid TLS extension list item header&#039;)&lt;/p&gt;&lt;p&gt;15:36:35.343: --- Connection closed normally at Thu Aug 09 15:36:35 2012. ---&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I turned off the global option to enable SSL/TLS on the default port, but then gmail would not relay my mail since I didn&#039;t support TLS.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I use gmail as my mail reader, but when sending I have it relay through my mail server with TLS. &amp;nbsp;It used to work... &amp;nbsp;Any suggestions?&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Mark&amp;nbsp;&lt;/p&gt;

[quote user="beiley"]I turned off the global option to enable SSL/TLS on the default port, but then gmail would not relay my mail since I didn't support TLS.

 

I use gmail as my mail reader, but when sending I have it relay through my mail server with TLS.  It used to work...  Any suggestions?[/quote]

Can you give us more details on what you are doing.  How do you setup Gmail to 'relay'?

Isn't the SMTP transaction the same whether you are delivering or forwarding?

[quote user=&quot;beiley&quot;]I turned off the global option to enable SSL/TLS on the default port, but then gmail would not relay my mail since I didn&#039;t support TLS. &lt;P mce_keep=&quot;true&quot;&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;I use gmail as my mail reader, but when sending I have it relay through my mail server with TLS. &amp;nbsp;It used to work... &amp;nbsp;Any suggestions?[/quote]&lt;/P&gt; &lt;P&gt;Can you give us more details on what you are doing.&amp;nbsp; How do you setup&amp;nbsp;Gmail to &#039;relay&#039;?&lt;/P&gt; &lt;P&gt;Isn&#039;t the SMTP transaction the same whether you are delivering or forwarding?&lt;/P&gt;

Hi PaulW,

Thanks for the reply.  In gmail you can set up multiple email addresses to send email from within a given gmail account.  In gmail, go to "Settings / Accounts and Import / Send mail as:".  Gmail has help for this feature that describes it here:

 http://support.google.com/mail/bin/answer.py?hl=en&ctx=mail&answer=22370

This is quite handy for being able to read/reply from multiple email addresses within a single gmail inbox.

When you set up these other email addresses to send from, gmail gives you the option of how you want to send.  You can send through gmail's mail server, or you can choose to relay through any other mail server you specify.  When choosing to relay through a specified mail server you must choose either TLS or SSL.  They do not allow relaying without one of these.  (There are benefits to relaying through your own mail server, but this is besides the point of this topic.)

An SMTP transaction is the same whether delivering or forwarding, but the other solutions described in this topic work only when delivering, as apparently gmail's mail server will do a final delivery without TSL/SSL, but when using the feature I'm describing which relays mail through a specified mail server gmail will only relay if the mail server supports TLS or SSL.  It makes sense that gmail must allow non-secure SMTP when doing final delivery, as not every mail server in the world supports TSL/SSL and they want to be able to deliver anywhere.  However, when relaying, they are more strict, and require a secure connection.  This secure connection seems to be broken between gmail and Mercury currently.  Something has changed with gmail, as this used to work.  Currently Mercury does not work when receiving a TLS SMTP transaction from gmail.  I've tested it with both v4.73 and v4.74.

Thanks,
Mark 

 

&lt;p&gt;Hi PaulW,&lt;/p&gt;&lt;p&gt;Thanks for the reply. &amp;nbsp;In gmail you can set up multiple email addresses to send email from within a given gmail account. &amp;nbsp;In gmail, go to &quot;Settings / Accounts and Import / Send mail as:&quot;. &amp;nbsp;Gmail has help for this feature that describes it here:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;a href=&quot;http://support.google.com/mail/bin/answer.py?hl=en&amp;amp;ctx=mail&amp;amp;answer=22370&quot;&gt;http://support.google.com/mail/bin/answer.py?hl=en&amp;amp;ctx=mail&amp;amp;answer=22370&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This is quite handy for being able to read/reply from multiple email addresses within a single gmail inbox.&lt;/p&gt;&lt;p&gt;When you set up these other email addresses to send from, gmail gives you the option of how you want to send. &amp;nbsp;You can send through gmail&#039;s mail server, or you can choose to relay through any other mail server you specify. &amp;nbsp;When choosing to relay through a specified mail server you must choose either TLS or SSL. &amp;nbsp;They do not allow relaying without one of these. &amp;nbsp;(There are benefits to relaying through your own mail server, but this is besides the point of this topic.)&lt;/p&gt;&lt;p&gt;An SMTP transaction is the same whether delivering or forwarding, but the other solutions described in this topic work only when delivering, as apparently gmail&#039;s mail server will do a final delivery without TSL/SSL, but when using the feature I&#039;m describing which relays mail through a specified mail server gmail will only relay if the mail server supports TLS or SSL. &amp;nbsp;It makes sense that gmail must allow non-secure SMTP when doing final delivery, as not every mail server in the world supports TSL/SSL and they want to be able to deliver anywhere. &amp;nbsp;However, when relaying, they are more strict, and require a secure connection. &amp;nbsp;This secure connection seems to be broken between gmail and Mercury currently. &amp;nbsp;Something has changed with gmail, as this used to work. &amp;nbsp;Currently Mercury does not work when receiving a TLS SMTP transaction from gmail. &amp;nbsp;I&#039;ve tested it with both v4.73 and v4.74.&lt;/p&gt;&lt;p&gt;Thanks, Mark&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://support.google.com/mail/bin/answer.py?hl=en&amp;amp;ctx=mail&amp;amp;answer=22370&quot;&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;

(this is my second reply, as it seems my first may have been lost/delayed, or maybe it was put on hold since I included a link?) 

Hi PaulW,

Thanks for the reply.  In gmail you can set up multiple email addresses to send mail from under a single gmail account.  This is handy for reading/replying from multiple addresses within a single gmail account.  From within gmail, see "Settings / Accounts and Import / Send mail as:".  When setting up one of these emails to send mail as you can specify what mail server to relay through.  When relaying, gmail will only relay when you choose either TLS or SSL.  I believe gmail's mail servers will do a final delivery without TLS or SSL, but if you want to use gmail to send email as a particular email address through a specified mail server, that mail server must support TLS or SSL.  The solutions discussed in this topic deal with a work-around for gmail doing final delivery, but not relaying mail through Mercury from gmail.

Thanks,

Mark

&lt;p&gt;(this is my second reply, as it seems my first may have been lost/delayed, or maybe it was put on hold since I included a link?)&amp;nbsp;&lt;/p&gt;&lt;p&gt;Hi PaulW,&lt;/p&gt;&lt;p&gt;Thanks for the reply. &amp;nbsp;In gmail you can set up multiple email addresses to send mail from under a single gmail account. &amp;nbsp;This is handy for reading/replying from multiple addresses within a single gmail account. &amp;nbsp;From within gmail, see &quot;Settings / Accounts and Import / Send mail as:&quot;. &amp;nbsp;When setting up one of these emails to send mail as you can specify what mail server to relay through. &amp;nbsp;When relaying, gmail will only relay when you choose either TLS or SSL. &amp;nbsp;I believe gmail&#039;s mail servers will do a final delivery without TLS or SSL, but if you want to use gmail to send email as a particular email address through a specified mail server, that mail server must support TLS or SSL. &amp;nbsp;The solutions discussed in this topic deal with a work-around for gmail doing final delivery, but not relaying mail through Mercury from gmail.&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Mark&lt;/p&gt;

I just discovered that if you choose port 25 when setting up this feature in gmail they do offer an option of relaying through an unsecured connection.  Not ideal, but it does offer a work-around to this problem...

 Mark 

&lt;p&gt;I just discovered that if you choose port 25 when setting up this feature in gmail they do offer an option of relaying through an unsecured connection. &amp;nbsp;Not ideal, but it does offer a work-around to this problem...&lt;/p&gt;&lt;p&gt;&amp;nbsp;Mark&amp;nbsp;&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