Rejet tspam with a 550 - no such user

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
LennardF1989
New user
New user
Posts: 2
Joined: 2016-05-27 02:03

Rejet tspam with a 550 - no such user

Post by LennardF1989 » 2016-05-27 02:09

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.

User avatar
mattg
Moderator
Moderator
Posts: 21108
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Rejet tspam with a 550 - no such user

Post by mattg » 2016-05-27 02:25

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.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

LennardF1989
New user
New user
Posts: 2
Joined: 2016-05-27 02:03

Re: Rejet tspam with a 550 - no such user

Post by LennardF1989 » 2016-05-27 02:30

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?

User avatar
mattg
Moderator
Moderator
Posts: 21108
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Rejet tspam with a 550 - no such user

Post by mattg » 2016-05-27 04:41

Only if spam DELETE score is reached

Then the last spam failure tested will show in the response back to the sender
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
mattg
Moderator
Moderator
Posts: 21108
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Rejet tspam with a 550 - no such user

Post by mattg » 2016-05-27 04:52

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.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
SorenR
Senior user
Senior user
Posts: 3830
Joined: 2006-08-21 15:38
Location: Denmark

Re: Rejet tspam with a 550 - no such user

Post by SorenR » 2016-05-29 18:13

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)
SørenR.

“Those who don't know history are doomed to repeat it.”
― Edmund Burke

Post Reply