Community Discussions and Support
A Significant issue involving EHLO [127.0.0.1]

You should check all the boxes and that will only allow users that have a password to send email.   The only hole in the system (might be) that they are not all checked by default.

You should check all the boxes and that will only allow users that have a password to send email.   The only hole in the system (might be) that they are not all checked by default.

The way I have Pegasus/Mercury set up for my client is that no one can send email outside the system. I have it set that 2 IP addresses within the system can send to/through Mercury (a backup and the voicemail system} without a password. This has worked perfectly for the 18 years I've used the system...until now. What I have discovered is if someone outside the system announces themselves as EHLO [127.0.0.1] and the actual connecting IP isn't on a blacklist, they can spoof and send mail on behalf of an actual user through Mercury to their heart's content. I've applied the bandage of putting the domain on the kill list as I've not figured out how to stop it at the transaction level, but I think this is a HUGE exploit that needs a plug immediately.

Here's a log entry:

170227 172635 589df79e Connection from 1.255.70.123
T 20170227 172636 589df79e EHLO [127.0.0.1]
T 20170227 172637 589df79e RSET
T 20170227 172638 589df79e MAIL FROM:<user@ourcompany.com> <--Changed to protect domain
E 20170227 172639 589df79e Host 1.255.70.123 blocked by abuseseat - message rejected.

Here's one that went through:

170227 185114 589df7d2 Connection from 77.201.28.3
T 20170227 185117 589df7d2 EHLO [127.0.0.1]
T 20170227 185121 589df7d2 RSET
T 20170227 185123 589df7d2 MAIL FROM:<user@ourcompany.com> <-- Changed to protect domain
T 20170227 185125 589df7d3 Connection from 216.228.237.32
T 20170227 185126 589df7d3 EHLO mail63.morningstar.net
T 20170227 185131 589df7d2 RCPT TO:<user@posterman.top>
T 20170227 185132 589df7d2 DATA
E 20170227 185132 589df7d2 Closed by GrayWall.
T 20170227 185132 589df7d2 Connection closed with 77.201.28.3, 18 sec. elapsed.
E 20 

Sadly, hundreds of these went through before I was alerted to the issue. 

&lt;p&gt;The way I have Pegasus/Mercury set up for my client is that no one can send email outside the system. I have it set that 2 IP addresses within the system can send to/through Mercury (a backup and the voicemail system} without a password. This has worked perfectly for the 18 years I&#039;ve used the system...until now.&amp;nbsp;What I have discovered&amp;nbsp;is if someone&amp;nbsp;outside the system announces themselves as EHLO&amp;nbsp;[127.0.0.1] and the actual connecting IP isn&#039;t on a blacklist, they can spoof and send mail on behalf of an actual user through Mercury&amp;nbsp;to their heart&#039;s content. I&#039;ve applied the bandage of putting the domain on the kill list as I&#039;ve not figured out how to stop it at the transaction level, but I think this is a HUGE exploit that needs a plug immediately.&lt;/p&gt;&lt;p&gt;Here&#039;s a log entry:&lt;/p&gt;&lt;p&gt;170227 172635 589df79e Connection from 1.255.70.123 T 20170227 172636 589df79e EHLO [127.0.0.1] T 20170227 172637 589df79e RSET T 20170227 172638 589df79e MAIL FROM:&amp;lt;&lt;a href=&quot;mailto:user@ourcompany.com&quot;&gt;user@ourcompany.com&lt;/a&gt;&amp;gt; &amp;lt;--&lt;em&gt;Changed to protect domain&lt;/em&gt; E 20170227 172639 589df79e Host 1.255.70.123 blocked by abuseseat - message rejected.&lt;/p&gt;&lt;p&gt;Here&#039;s one that went through:&lt;/p&gt;&lt;p&gt;170227 185114 589df7d2 Connection from 77.201.28.3 T 20170227 185117 589df7d2 EHLO [127.0.0.1] T 20170227 185121 589df7d2 RSET T 20170227 185123 589df7d2 MAIL FROM:&amp;lt;&lt;a href=&quot;mailto:user@ourcompany.com&quot;&gt;user@ourcompany.com&lt;/a&gt;&amp;gt; &amp;lt;-- &lt;em&gt;Changed to protect domain&lt;/em&gt; T 20170227 185125 589df7d3 Connection from 216.228.237.32 T 20170227 185126 589df7d3 EHLO mail63.morningstar.net T 20170227 185131 589df7d2 RCPT TO:&amp;lt;&lt;a href=&quot;mailto:user@posterman.top&quot;&gt;user@posterman.top&lt;/a&gt;&amp;gt; T 20170227 185132 589df7d2 DATA E 20170227 185132 589df7d2 Closed by GrayWall. T 20170227 185132 589df7d2 Connection closed with 77.201.28.3, 18 sec. elapsed. E 20&amp;nbsp;&lt;/p&gt;&lt;p&gt;Sadly, hundreds of these went through before I was alerted to the issue.&amp;nbsp;&lt;/p&gt;

On the General tab of the SMTP module you should have the relaying controls checked. On the Compliance tab edit the transaction file and add the line

H, "*127.0.0.1*", R, "554"

 

See how that works.

Do you use a mail filtering service? If so, you can add a line that will only accept connections from that filtering service's address. 

&lt;p&gt;On the General tab of the SMTP module you should have the relaying controls checked. On the Compliance tab edit the transaction file and add the line&lt;/p&gt;&lt;p&gt;H, &quot;*127.0.0.1*&quot;, R, &quot;554&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;See how that works.&lt;/p&gt;&lt;p&gt;Do you use a mail filtering service? If so, you can add a line that will only accept connections from that filtering service&#039;s address.&amp;nbsp;&lt;/p&gt;

Thanks! The expression worked. I simply do not want to allow any outside relaying of email.  I still think this is a hole that needs plugged.

Thanks! The expression worked. I simply do not want to allow any outside relaying of email.&amp;nbsp;&amp;nbsp;I still think this is a hole that needs plugged.

According to the log excerpt the second connection was closed by GrayWall, but perhaps the sender retried until it was accepted.

The main thing is to make sure relaying settings and connection control entries in MercuryS configuration limit relaying the way you want it. Connection control checks the connecting IP address, and it won't make any difference what the HELO/EHLO greeting says.

&lt;p&gt;According to the log excerpt the second connection was closed by GrayWall, but perhaps the sender retried until it was accepted.&lt;/p&gt;&lt;p&gt;The main thing is to make sure relaying settings and connection control entries in MercuryS configuration limit relaying the way you want it. Connection control checks the connecting IP address, and it won&#039;t make any difference what the HELO/EHLO greeting says.&lt;/p&gt;

As I stated in my original post, I do not allow relaying outside of the network at all. No one can send email through POP3 or IMAP. I don't allow offsite relaying. Period. Two IP addresses in the NAT are allowed to send email through Mercury bypassing Pegasus, but they are Pegasus users. I've been using this setup for 18 years (Mercury for far longer) with this particular client with no one defeating it and I'm telling you the EHLO [127.0.0.1] with a local user email address defeats the system. Yes, Graywall did shut this particular attempt down, but I have HUNDREDS that I pulled from the queue that were persistent enough and not on abuseat that did get through. I think the 127.0.0.1 coupled with an actual local user is causing a problem because Mercury thinks the connection is local.

Setup

&lt;p&gt;As I stated in my original post, I do not allow relaying outside of the network&amp;nbsp;at all.&amp;nbsp;No one can send email through POP3 or IMAP. I don&#039;t allow offsite relaying. Period.&amp;nbsp;Two IP addresses in the NAT are allowed to&amp;nbsp;send email through Mercury bypassing Pegasus, but they are Pegasus users.&amp;nbsp;I&#039;ve been using this setup for &lt;b&gt;18 years&lt;/b&gt; (Mercury for far longer)&amp;nbsp;with this particular client&amp;nbsp;with no one defeating it and I&#039;m telling you the EHLO [127.0.0.1] with a local user email address&amp;nbsp;defeats the system. Yes, Graywall did shut this particular attempt down, but I have HUNDREDS that I pulled from the queue that were persistent enough and not on abuseat that did get through. I think the 127.0.0.1 coupled with an actual local user is causing a problem because Mercury thinks the connection is local.&lt;/p&gt;&lt;p&gt;&lt;img width=&quot;377&quot; height=&quot;522&quot; title=&quot;Setup&quot; style=&quot;width: 377px; height: 522px;&quot; alt=&quot;Setup&quot; src=&quot;http://www.amystinson.com/wp-content/uploads/2017/03/2017-03-01-19_57_25-mail.langdonandcompany.com_52101-Remote-Desktop-Connection.png&quot; border=&quot;0&quot; vspace=&quot;2&quot; hspace=&quot;2&quot; mce_src=&quot;http://www.amystinson.com/wp-content/uploads/2017/03/2017-03-01-19_57_25-mail.langdonandcompany.com_52101-Remote-Desktop-Connection.png&quot;&gt;&lt;/p&gt;

You should check at least "Use strict local relaying restrictions", and you should probably consider checking "Only Authenticated SMTP connections may relay mail". See Mercury help for more information about these options!

 

&lt;p&gt;You should check at least &quot;Use strict local relaying restrictions&quot;, and you should probably consider checking &quot;Only Authenticated SMTP connections may relay mail&quot;. See Mercury help for more information about these options!&lt;/p&gt;&lt;p&gt;&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