Community Discussions and Support
Anti-relaying and short term blacklisting (MercuryS)

Clever! I have to say that I probably wouldn't have thought of that solution, even though it's a good one.

Just goes to show - the fact that I wrote the program doesn't necessarily mean that I know the best ways of using it. It's nice to have a creative user community. [:)]

Cheers!

-- David --

<p>Clever! I have to say that I probably wouldn't have thought of that solution, even though it's a good one. Just goes to show - the fact that I <b>wrote</b> the program doesn't necessarily mean that I know the best ways of <b>using</b> it. It's nice to have a creative user community. [:)] Cheers! -- David -- </p>

Hello,

I'm trying to implement a VERP solution for handling bounces using a global filter but am not having much luck due to the anti-relaying measures.
This is for a custom mailing list and doesn't use Mercury's mailing list capabilities.


For instance, I'd like to process a message sent to:

listmanager-bob=example.org@mydomain.com

with a global rule that dumps the contents of the message into a file to be processed by another application which tracks bounces and culls addresses when appropriate.

The rule is a partial match on the To header searching for "listmanager-"

 However, the rule never gets processed due to the anti-relaying measures, since the address is not a true local address or alias.

1. Is there a way to flag listmanager-*@mydomain.com as a valid local address? where * is variable...
2. How do you remove an address from the temporary blacklist? How long is the IP blacklisted?

Hopefully I'm missing something simple...


Thanks!

<p>Hello,</p><p>I'm trying to implement a VERP solution for handling bounces using a global filter but am not having much luck due to the anti-relaying measures. This is for a custom mailing list and doesn't use Mercury's mailing list capabilities. </p><p> For instance, I'd like to process a message sent to:</p><p>listmanager-bob=example.org@mydomain.com</p><p>with a global rule that dumps the contents of the message into a file to be processed by another application which tracks bounces and culls addresses when appropriate.</p><p>The rule is a partial match on the To header searching for "listmanager-"</p><p> However, the rule never gets processed due to the anti-relaying measures, since the address is not a true local address or alias.</p><p>1. Is there a way to flag listmanager-*@mydomain.com as a valid local address? where * is variable... 2. How do you remove an address from the temporary blacklist? How long is the IP blacklisted? </p><p>Hopefully I'm missing something simple...</p><p> Thanks!</p>

[quote user="ltaylor"]1. Is there a way to flag listmanager-*@mydomain.com as a valid local address? where * is variable...[/quote]

I'm having a little trouble visualizing this one, sorry. Have you tried setting "Suppress validation of 'From' field when processing mail" in the core module configuration dialog?

I'm not quite sure that I understand exactly what you're trying to do here, so I'm not sure what advice I can offer.

[quote]2. How do you remove an address from the temporary blacklist? How long is the IP blacklisted?[/quote]

This one I *CAN* answer. You cannot remove an address from the STB - it will expire and be automatically removed after 30 minutes, but the process cannot be done manually without restarting Mercury (the STB exists only in memory).

Cheers!

-- David --

[quote user="ltaylor"]1. Is there a way to flag listmanager-*@mydomain.com as a valid local address? where * is variable...[/quote] I'm having a little trouble visualizing this one, sorry. Have you tried setting "Suppress validation of 'From' field when processing mail" in the core module configuration dialog? <p>I'm not quite sure that I understand exactly what you're trying to do here, so I'm not sure what advice I can offer. [quote]2. How do you remove an address from the temporary blacklist? How long is the IP blacklisted?[/quote] This one I *CAN* answer. You cannot remove an address from the STB - it will expire and be automatically removed after 30 minutes, but the process cannot be done manually without restarting Mercury (the STB exists only in memory). Cheers! -- David -- </p>

[quote user="David Harris"][quote user="ltaylor"]1. Is there a way to flag listmanager-*@mydomain.com as a valid local address? where * is variable...[/quote]

I'm having a little trouble visualizing this one, sorry. Have you tried setting "Suppress validation of 'From' field when processing mail" in the core module configuration dialog?[/quote]

Basically, we're trying to handle bounces from our dynamically generated email list using a VERP. So, given the following:

Our domain: mydomain.com
Our alias: listmanager
recipient:bob@example.com

we will set the return-path to: listmanager-bob=example.com@mydomain.com

If for some reason bob@example.com bounces, the MTA should send the rejection notice to listmanager-bob=example.com@mydomain.com

I'd like to setup a rule that will dump all email To: listmanager-SOMETHING@mydomain.com into a directory to be parsed by an external program.

SOMETHING is variable and will be the email address in the form of "user=domain.com" that we need to track to decide if we should unsub or flag as invalid.

A simple rule on the headers where To: "contains listmanager-" should do the trick, however... 

 

In MercuryS, we have the anti-relaying options set. So when I send a test email to: listmanager-bob=example.com@mydomain.com, the local address is not found and relaying is denied.

We need the anti-relaying measures, but would like some sort of exception for addresses beginning with "listmanager-" and of our local domain "mydomain.com", like a wildcard address.

 Or perhaps there is another way to handle it?
 

[quote user="David Harris"]
[quote]2. How do you remove an address from the temporary blacklist? How long is the IP blacklisted?[/quote]

This one I *CAN* answer. You cannot remove an address from the STB - it will expire and be automatically removed after 30 minutes, but the process cannot be done manually without restarting Mercury (the STB exists only in memory).[/quote]

Gotcha, thanks.


Lucas

<p>[quote user="David Harris"][quote user="ltaylor"]1. Is there a way to flag listmanager-*@mydomain.com as a valid local address? where * is variable...[/quote] I'm having a little trouble visualizing this one, sorry. Have you tried setting "Suppress validation of 'From' field when processing mail" in the core module configuration dialog?[/quote]</p><p>Basically, we're trying to handle bounces from our dynamically generated email list using a VERP. So, given the following: </p><p>Our domain: mydomain.com Our alias: listmanager recipient:bob@example.com we will set the return-path to: listmanager-bob=example.com@mydomain.com</p><p>If for some reason bob@example.com bounces, the MTA should send the rejection notice to listmanager-bob=example.com@mydomain.com</p><p>I'd like to setup a rule that will dump all email To: listmanager-SOMETHING@mydomain.com into a directory to be parsed by an external program.</p><p>SOMETHING is variable and will be the email address in the form of "user=domain.com" that we need to track to decide if we should unsub or flag as invalid.</p><p>A simple rule on the headers where To: "contains listmanager-" should do the trick, however... </p><p> </p><p>In MercuryS, we have the anti-relaying options set. So when I send a test email to: listmanager-bob=example.com@mydomain.com, the local address is not found and relaying is denied.</p><p>We need the anti-relaying measures, but would like some sort of exception for addresses beginning with "listmanager-" and of our local domain "mydomain.com", like a wildcard address.</p><p> Or perhaps there is another way to handle it?   [quote user="David Harris"] [quote]2. How do you remove an address from the temporary blacklist? How long is the IP blacklisted?[/quote] This one I *CAN* answer. You cannot remove an address from the STB - it will expire and be automatically removed after 30 minutes, but the process cannot be done manually without restarting Mercury (the STB exists only in memory).[/quote] </p>Gotcha, thanks. Lucas

[quote user="ltaylor"]

In MercuryS, we have the anti-relaying options set. So when I send a test email to: listmanager-bob=example.com@mydomain.com, the local address is not found and relaying is denied.

We need the anti-relaying measures, but would like some sort of exception for addresses beginning with "listmanager-" and of our local domain "mydomain.com", like a wildcard address.

 Or perhaps there is another way to handle it?

[/quote]

 

This is not 'relaying' (using your server to send to another domain) this is 'local user not found' and being rejected by MercS.

Try ticking the box "Accept mail for invalid local users", this should get it past the SMTP transaction, then your rule to match on the TO: address should catch it and dump the contents.

If this rule action does not take the message out of regular processing, a further attempt to deliver to a local user will be made, so you will need another match-rule to kill the message so it does not get bounced by the core with "User not known" 

[quote user="ltaylor"]<p>In MercuryS, we have the anti-relaying options set. So when I send a test email to: listmanager-bob=example.com@mydomain.com, the local address is not found and relaying is denied.</p><p>We need the anti-relaying measures, but would like some sort of exception for addresses beginning with "listmanager-" and of our local domain "mydomain.com", like a wildcard address.</p><p> Or perhaps there is another way to handle it? </p><p>[/quote]</p><p> </p><p>This is not 'relaying' (using your server to send to another domain) this is 'local user not found' and being rejected by MercS.</p><p>Try ticking the box "Accept mail for invalid local users", this should get it past the SMTP transaction, then your rule to match on the TO: address should catch it and dump the contents.</p><p>If this rule action does not take the message out of regular processing, a further attempt to deliver to a local user will be made, so you will need another match-rule to kill the message so it does not get bounced by the core with "User not known" </p>

[quote user="dilberts_left_nut"]

This is not 'relaying' (using your server to send to another domain) this is 'local user not found' and being rejected by MercS.

Try ticking the box "Accept mail for invalid local users", this should get it past the SMTP transaction, then your rule to match on the TO: address should catch it and dump the contents.

If this rule action does not take the message out of regular processing, a further attempt to deliver to a local user will be made, so you will need another match-rule to kill the message so it does not get bounced by the core with "User not known" 

[/quote]

That's what I originally thought, but here is what MercuryS shows when receiving a test message (domains and addresses changed for display)

[quote]
MAIL FROM:<bob@example.com> SIZE=1441
RCPT TO:<listmanager-test@mydomain.com>
Relay attempt: from <bob@example.com> to <listmanager-test@mydomain.com>.
554 Too many unauthorized relaying attempts - terminating connection.
Host xxx.xxx.xxx.xxx added to short-term blacklist
[/quote]

p.s. I did try checking "Accept mail for invalid local users" but it didn't change anything. 

I've also unchecked the top 2 anti-relaying options and the messages go through just fine... 


[quote user=&quot;dilberts_left_nut&quot;]&lt;p&gt;This is not &#039;relaying&#039; (using your server to send to another domain) this is &#039;local user not found&#039; and being rejected by MercS.&lt;/p&gt;&lt;p&gt;Try ticking the box &quot;Accept mail for invalid local users&quot;, this should get it past the SMTP transaction, then your rule to match on the TO: address should catch it and dump the contents.&lt;/p&gt;&lt;p&gt;If this rule action does not take the message out of regular processing, a further attempt to deliver to a local user will be made, so you will need another match-rule to kill the message so it does not get bounced by the core with &quot;User not known&quot;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[/quote]&lt;/p&gt;&lt;p&gt;That&#039;s what I originally thought, but here is what MercuryS shows when receiving a test message (domains and addresses changed for display) &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;[quote] MAIL FROM:&amp;lt;bob@example.com&amp;gt; SIZE=1441 RCPT TO:&amp;lt;listmanager-test@mydomain.com&amp;gt; Relay attempt: from &amp;lt;bob@example.com&amp;gt; to &amp;lt;listmanager-test@mydomain.com&amp;gt;. 554 Too many unauthorized relaying attempts - terminating connection. Host xxx.xxx.xxx.xxx added to short-term blacklist [/quote] &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;p.s. I did try checking &quot;Accept mail for invalid local users&quot; but it didn&#039;t change anything.&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&#039;ve also unchecked the top 2 anti-relaying options and the messages go through just fine...&amp;nbsp;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;

"Relay attempt" indicates that Mercury is not recognizing "mydomain.com" as a local domain. Have you got an entry for this domain in the "Local domains" page of the core module configuration dialog?

Cheers!

-- David --

&quot;Relay attempt&quot; indicates that Mercury is not recognizing &quot;mydomain.com&quot; as a local domain. Have you got an entry for this domain in the &quot;Local domains&quot; page of the core module configuration dialog? Cheers! -- David --

[quote user="David Harris"]"Relay attempt" indicates that Mercury is not recognizing "mydomain.com" as a local domain. Have you got an entry for this domain in the "Local domains" page of the core module configuration dialog?
[/quote]

Yep, the domain itself is setup fine. Email sent to listmanager@mydomain.com comes through OK. listmanager-bob=example.com@mydomain.com is rejected with the above relay attempt message.

 However, I missed this option in Core configuration:

Allow the use of + forms in addresses (to carry user specified data)

By changing our format to:

listmanager+bob=example.com@mydomain.com

We can now do the filtering we desire and Mercury treats the address as local.

Problem solved !


Thanks for all of the suggestions and help!




 

&lt;p&gt;[quote user=&quot;David Harris&quot;]&quot;Relay attempt&quot; indicates that Mercury is not recognizing &quot;mydomain.com&quot; as a local domain. Have you got an entry for this domain in the &quot;Local domains&quot; page of the core module configuration dialog? [/quote]&lt;/p&gt;&lt;p&gt;Yep, the domain itself is setup fine. Email sent to listmanager@mydomain.com comes through OK. listmanager-bob=example.com@mydomain.com is rejected with the above relay attempt message.&lt;/p&gt;&lt;p&gt;&amp;nbsp;However, I missed this option in Core configuration:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;b&gt;Allow the use of + forms in addresses (to carry user specified data)&lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;By changing our format to:&lt;/p&gt;&lt;p&gt;listmanager+bob=example.com@mydomain.com&lt;/p&gt;&lt;p&gt;We can now do the filtering we desire and Mercury treats the address as local.&lt;/p&gt;&lt;p&gt;Problem solved !&lt;/p&gt;&lt;p&gt; Thanks for all of the suggestions and help! &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