Spam Filter ISP Support Forum

  New Posts New Posts RSS Feed - Problems viewing certain quarantined emails
  FAQ FAQ  Forum Search   Register Register  Login Login

Problems viewing certain quarantined emails

 Post Reply Post Reply
Author
Alan View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alan Quote  Post ReplyReply Direct Link To This Post Topic: Problems viewing certain quarantined emails
    Posted: 08 June 2004 at 12:01pm

I find some emails cannot be viewed in the quarantine.   Using the GUI the message does not open and using the web interface we get:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'HTMLEncode'
?

Any idea why this is?  Reason being we seem to be getting a lot of spam that appear to originate from the same spammer and want to be able to better filter them.

On another note, I tried referencing the spam directly in the database, but couldn't seem to locate the message body text.  What table/field is the message body located?

Back to Top
Ric Marques View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ric Marques Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2004 at 12:14pm

I've noticed LOTS of these messages as well.  A little digging into the database determined that the message doesn't exist - there's a NULL value in the tblmsgs.Msg field.  The ASP command for HTMLEncode will not accept a NULL, so the error is generated.

I haven't done anything to determine WHY then NULL is there, just that it is.

-Ric

Back to Top
Alan View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alan Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2004 at 7:32pm

Ah, thanks.  That explains why I cannot find the message body.  But that just leaves why the null in the database? 

Could it be that these are bounces as result of spoofed spam to another domain and they are coming back here in a large batch like this?

Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4104
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2004 at 10:07pm

Alan,

The NULL messages Ric refers to are most likely caused by antivirus software on the software deleting the temp email files that SpamFilter spools to the hard disk. We actually designed SpamFilter to spool messages to disk briefly to give antiviruses a chance to clean/delete infected files. If that occurs SpamFilter detects the missing files, will "understand" what happened and will continue to operate normally, storing a NULL in the database instead of the email content.

The bug is actually with the ASP pages not being able to handle the NULL. Please let us know if you need ASP code to work around that.

Roberto F.
LogSat Software

Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4104
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2004 at 10:07pm

Ric,

I've answered the original question in the following way:

==================================================

Alan,

The NULL messages Ric refers to are most likely caused by antivirus software on the software deleting the temp email files that SpamFilter spools to the hard disk. We actually designed SpamFilter to spool messages to disk briefly to give antiviruses a chance to clean/delete infected files. If that occurs SpamFilter detects the missing files, will "understand" what happened and will continue to operate normally, storing a NULL in the database instead of the email content.

The bug is actually with the ASP pages not being able to handle the NULL. Please let us know if you need ASP code to work around that.

Roberto F.
LogSat Software

Back to Top
Alan View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alan Quote  Post ReplyReply Direct Link To This Post Posted: 09 June 2004 at 11:30am

Yes if you have some canned ASP code available to help deal with the nulls I would certainly like to get a copy.

Back to Top
Ric Marques View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ric Marques Quote  Post ReplyReply Direct Link To This Post Posted: 09 June 2004 at 11:39am

Here's something I run periodically... it simply looks for tblquarantine records that have msg records with NULL values then sets them to expire, it then displays the number of quar records marked to be deleted.

it's probably not the best solution, but it does the job:

-Ric

<%
  SQL = "select tblquarantine.* from tblquarantine left outer join tblmsgs on tblquarantine.msgid=tblmsgs.msgid where tblmsgs.msgid is NULL and deliver = 0 and expire = 0"

  Set rs = con.Execute(SQL)

  If rs.EOF Then
   Response.Write "<h2>No 'unlinked' messages in database!</h2>"
  Else
   rs.movefirst
   Do Until rs.eof
    SQL = "UPDATE tblQuarantine "
       SQL = SQL & "SET Expire = 1 "
    SQL = SQL & "WHERE QuarID = " & rs("QuarID")
    X = X + 1
    con.Execute SQL
    response.write "Purging Entry for QuarID: " & rs("QuarID") & "<BR>"
    rs.MoveNext
   Loop
   Set rs = Nothing
  End If
%>
Purge Complete.<BR>
<B><%=X%></B> Entries deleted.<BR><BR>

Back to Top
Alan View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alan Quote  Post ReplyReply Direct Link To This Post Posted: 09 June 2004 at 5:12pm

I tried your code but it produced:

No 'unlinked' messages in database!

Purge Complete.
Entries deleted.

Checking the DB confirms none of the Null entry messages have been tagged to expire.

It appears it is not finding any of the Null messages.

Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4104
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 09 June 2004 at 10:38pm

Alan,

In the ResolveSpam.asp page, simply change the following line:

<%=Server.HTMLEncode(rs("Msg"))%>

to:

<%if rs("Msg") <> NULL then Response.Write Server.HTMLEncode(rs("Msg"))%>

Roberto F.
LogSat Software

Back to Top
Ric Marques View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ric Marques Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2004 at 11:47am

Alan,

I'm running that on a MySQL database... maybe it needs to be modified for MSSql or Access?

-Ric

Back to Top
Alan View Drop Down
Guest Group
Guest Group
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alan Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2004 at 12:12pm
When I make this change ALL messages come up blank.
Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4104
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2004 at 12:02am

Alan,

Can you try this modified code then:

<%if not IsNull(rs("Msg")) then Response.Write Server.HTMLEncode(rs("Msg"))%>

Roberto F.
LogSat Software

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.133 seconds.