Community Discussions and Support
Rejecting Illegal Eight-Bit Subject At SMTP Time

An event daemon can access message headers and reject the message based on any criteria while still handled by MercuryS.

/Rolf 

<p>An event daemon can access message headers and reject the message based on any criteria while still handled by MercuryS. </p><p>/Rolf </p>

I've tried everything I can to get the transfilter to drop/discard mail where Subject line (but ideally, the entire message header, because RFC 2821 says it's illegal) contains any eight-bit data.  There's no Posix-style regex use of the ~ character to mean "Not a member of character group", because otherwise it'd've been dead easy, something like "S, "*[^<tab><space>-~]*", R, "250 Okay trash discarded successfully."" in transflt.mer.  And inverting the operation using the S character won't help, because that produces a logical failure (just think about it for a moment and you'll get it eventually, took me a while).  And, you can't directly enter raw characters using alt+numberpad in notepad, because it doesn't work (tried range 128-255, which should all be single-byte characters).

 

Has *anybody* got any ideas?  I want to get rid of these useless Korean/Chinese-language spams even before core *sees* them, and I'm so close it's painful!  And, when you're running Mercury as a relay honeypot, that's particularly helpful.

 

Cheers,

Sabahattin

 

&lt;P&gt;I&#039;ve tried everything I can to get the transfilter to drop/discard mail where Subject line (but ideally, the entire message header, because RFC 2821 says it&#039;s illegal) contains any eight-bit data.&amp;nbsp; There&#039;s no Posix-style regex use of the ~ character to mean &quot;Not a member of character group&quot;, because otherwise it&#039;d&#039;ve been dead easy, something like &quot;S, &quot;*[^&amp;lt;tab&amp;gt;&amp;lt;space&amp;gt;-~]*&quot;, R, &quot;250 Okay trash discarded successfully.&quot;&quot; in transflt.mer.&amp;nbsp; And inverting the operation using the S character won&#039;t help, because that produces a logical failure (just think about it for a moment and you&#039;ll get it eventually, took me a while).&amp;nbsp; And, you can&#039;t directly enter raw characters using alt+numberpad in notepad, because it doesn&#039;t work (tried range 128-255, which should all be single-byte characters).&lt;/P&gt; &lt;P mce_keep=&quot;true&quot;&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;Has *anybody* got any ideas?&amp;nbsp; I want to get rid of these useless Korean/Chinese-language spams even before core *sees* them, and I&#039;m so close it&#039;s painful!&amp;nbsp; And, when you&#039;re running Mercury as a relay honeypot, that&#039;s particularly helpful.&lt;/P&gt; &lt;P mce_keep=&quot;true&quot;&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;Cheers,&lt;/P&gt; &lt;P&gt;Sabahattin&lt;/P&gt; &lt;P mce_keep=&quot;true&quot;&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