Page 1 of 1

Rejet tspam with a 550 - no such user

Posted: 2016-05-27 02:09
by LennardF1989
Hello,

I've been running hMailServer for a while now, setup all my anti-spam just fine. Lately I'm noticing my personal account is being hammered by spam, it looks like the spammers are enumerating over a whole bunch of aliases, making the same spam mail come in over 6 times sometimes (mails that aren't caught by blacklists yet BTW - I actively report them to spamcop the moment I see them)!

Since I know you shouldn't bounce mail from spammers, as that will potentially flag your server, I have been thinking about a different solution: if you reject a mail with a 550 - no such user, there is a chance that if this happens a few dozen times, the spammers give up trying to sent it to you.

Is there are way to do this from script without having to modify the source? OnSMPTData/OnAcceptMessage only allow a result 2, which turns it into a 554, basically informing them why the mail was rejected.

Re: Rejet tspam with a 550 - no such user

Posted: 2016-05-27 02:25
by mattg
LennardF1989 wrote:Since I know you shouldn't bounce mail from spammers, as that will potentially flag your server,
Why do you say that?

LennardF1989 wrote:I have been thinking about a different solution: if you reject a mail with a 550 - no such user, there is a chance that if this happens a few dozen times, the spammers give up trying to sent it to you.
Is there are way to do this from script without having to modify the source? OnSMPTData/OnAcceptMessage only allow a result 2, which turns it into a 554, basically informing them why the mail was rejected.
https://www.hmailserver.com/documentati ... sages_smtp
550 <Other error message>

In DNS blacklist and SURBL configuration, it is possible to specify custom error messages to be used when an email message is being rejected.

Re: Rejet tspam with a 550 - no such user

Posted: 2016-05-27 02:30
by LennardF1989
Well... http://www.dontbouncespam.org/ :P

The From-address is most likely forged, so if you bounce, it will end up at an innocent person's mailbox, they can flag for spam, and yea...

I'll look into those things! How did I miss that... Thanks!

EDIT: So if a mail is flagged by a blacklist, it is automatically rejected already? Regardless of its spam-score? Or only if the spam mark is reached?

Re: Rejet tspam with a 550 - no such user

Posted: 2016-05-27 04:41
by mattg
Only if spam DELETE score is reached

Then the last spam failure tested will show in the response back to the sender

Re: Rejet tspam with a 550 - no such user

Posted: 2016-05-27 04:52
by mattg
LennardF1989 wrote:Well... http://www.dontbouncespam.org/ :P
That page says that a 5XX code is a rejection (not just 550, but also 554)

That page says that a 'bounce' is done after the mail has been accepted.
I don't believe that hMailsevrer does that all, unless you set up an autoreply, an account level forward, a rule based forward or reply, OR a sciprt based reply or forward.

If a message is rejected by either OnSMPTData/OnAcceptMessage then the message is rejected before it is accepted.

I don't see an issue in the way that hMailsevrer behaves.

If you have some logs of where you think this occurs, please post a log sample


btw way my SURBL and DNSBL rejections are 554 rejections not 550 as the SMTP Error documentation says. I'll have to look at that.

Re: Rejet tspam with a 550 - no such user

Posted: 2016-05-29 18:13
by SorenR
I have good results issuing a 20 seconds wait after connection... For spammers "time is money" and when they detect the delay... Well, as I stated; "time is money" :mrgreen:

Code: Select all

Option Explicit

   Function Wait(sec)
      With CreateObject("WScript.Shell")
         .Run "sleep -m " & Int(sec * 1000), 0, True ' *** Win7 and up
'        .Run "sleep " & Int(sec), 0, True           ' *** WinXP
      End With
   End Function

   Sub OnClientConnect(oClient)
      If (Left(oClient.IPAddress, 10) = "192.168.0.") Then Exit Sub
      If (Left(oClient.IPAddress, 10) = "80.160.77.") Then Exit Sub
      If (oClient.Port = 25) Then Wait(20)
   End Sub

' NB! NB! NOT IMPLEMENTED YET - PLANNED FEATURE IN VERSION 5.7
'
'   Sub OnHELO(oClient)
'      If (Left(oClient.IPAddress, 10) = "192.168.0.") Then Exit Sub
'      If (Left(oClient.IPAddress, 10) = "80.160.77.") Then Exit Sub
'      If (oClient.Port = 25) Then Wait(20)
'   End Sub

I have OnHELO as I programmed it myself in my 5.4.2 server.... 8)