Maximum message size per user or list

This section contains scripts that hMailServer has contributed with. hMailServer 4 is needed to use these.
Post Reply
cristiano
New user
New user
Posts: 9
Joined: 2005-07-27 05:16
Location: Curitiba/PR/Brazil

Maximum message size per user or list

Post by cristiano » 2005-07-28 16:20

Code: Select all

Sub OnAcceptMessage(oClient, oMessage) 
 If InStr(oMessage.To, "user.or.list@domain.com") Then
  If oMessage.Size > 300 Then 
     ' Reject the message since it's larger 
     ' than 300 kb. 
     Result.Message = "Mensage size bigger than 300kb not allowed for this list" 
     Result.Value = 2 
  Else 
     ' Accept the message 
      Result.Value = 0 
  End If 
  End If
End Sub

Post Reply