[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Check email against DNSBLs (DNS blacklists)

Check email against DNSBLs (DNS blacklists)

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Postby tdzark » Thu Nov 11, 2004 7:45 pm

Image

Say no more!

The statistics isn't all correct though, since I filter out most my email before it reach the spam filter.

Sweet as candy :)
tdzark
Drop-in Visitor
 
Posts: 6
Joined: Wed Nov 03, 2004 1:23 am

Need help!

Postby muncher1 » Sun Dec 19, 2004 2:33 pm

Greetings,

I copied the script from the first page as suggested. When I click "run on selected message" I get 5 little windows that pop up and each ones says "windows cannot find cmd.exe" stops at line 243. I'm running WindowsMe. Also when I run the script it says "variable not previously declared #waitattempt."

Another request....could someone post a couple pictures of what the "filter is suppose to be worded as and if it goes in "incoming", "outgoing", "download" etc. Also if not to much trouble a picture of what the script page looks like.

I think this is a great addition if I can just figure out how to get it all in place. Thx for the hard work.
muncher1
Poco Tourist
 
Posts: 27
Joined: Sun Dec 19, 2004 2:23 pm

Postby Hogyt » Sun Dec 19, 2004 11:53 pm

Hello and welcome to the forums!

Can you try changing line 236 to:
Code: Select all
  Set $params "command.com /c nslookup -type=A -retry=1 "

And see if that gets it running? I only have Win XP to test on but hopefully that will fix it.

I'm not sure what you mean by the script page but it sounds like you've already got the script running (apart from the errors which hopefully the above will fix).

There's a screenshot on the previous page showing how i've got the filters set up which is:
Image
The middle of the highlighted filters is running the DNSBL script. This is running on incoming filters. If you don't already have a filter set up to run the script then click on 'new filter' and set it up like:
Image
So that the script only runs if the from address isn't in any address book (no point on running it on emails from friends, which also saves a bit of time since checking the DNSBLs can take a few seconds).

Different people have different ways of using the script so you may like to look through the rest of the thread if you want to set it up differently, eg. you could run the DNSBL script before the built-in Bayes filter by moving it above the 'run Junk Mail filters' filter.

Good luck and please post back if there are any difficulties!
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

Postby Hogyt » Mon Dec 20, 2004 1:01 am

Looks like its several problems, the biggest one being that nslookup only comes with Win NT, 2k and XP so i don't think it'll work on 95, 98 or ME. I'll see if theres a free nslookup that will work with the script but otherwise we may be out of luck :(
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

nslookup!

Postby muncher1 » Mon Dec 20, 2004 3:15 am

Thx Mat,

I got everything in there as you stated. I searched the hard drives and only have a command.com, no command.exe. I used command.com. Ran a search for nsloookup and no file found. Might be out of luck with this. I'll search the net and see if I can find one for WinME.

Did check the headers. Seems the spam is going to everyone at my ISP in alphabetical order. I might be able to write a script that will delete messages coming in from "austin.rr.com" that isn't in my address book. That would knock out over 50% of the spam that comes in. Any suggestion on how to write a script for this filter?

Thx for the help,
Chris
muncher1
Poco Tourist
 
Posts: 27
Joined: Sun Dec 19, 2004 2:23 pm

nslookup found for WinMe!

Postby muncher1 » Mon Dec 20, 2004 3:20 am

Mat,

Found a nslookup.exe from:
ht_p://www.pcpitstop.com/internet/nslook.asp

Downloaded it and about to find the right directory to put it in. Will check to see if need to edit the script if the name is any different.

Now to figure out the command.com vs command.exe.

Chris
muncher1
Poco Tourist
 
Posts: 27
Joined: Sun Dec 19, 2004 2:23 pm

Postby Hogyt » Mon Dec 20, 2004 3:28 am

Hi Chris,

It's probably a good idea to start a new topic for the script you mention. You might be able to do it without resorting to a script though and using a filter instead. The second screenshot in my post above shows how to detect if the sender isn't in your address book, then click on 'then' and change it to 'and' and add a check for austin.rr.com. Then you could either add to the junk score or move it directly to your junk folder.

To see if command.com works, go to start and click on run. Then type command.com and press enter. If it opens a dos box then that is good enough.

That leaves the problem of nslookup not coming with 95, 98 and ME. I'll take a look at the free one you linked to and see if it will work nicely with this script.
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

nslookup on WinMe works!

Postby muncher1 » Mon Dec 20, 2004 3:34 am

The nslookup found on the net works with WinME. I downloaded it and changed the name to nslookup.exe.

Now to figure out the command.com vs command.exe.

Image
muncher1
Poco Tourist
 
Posts: 27
Joined: Sun Dec 19, 2004 2:23 pm

Command.com from the run command

Postby muncher1 » Mon Dec 20, 2004 3:56 am

Mat,

When I go to the run command and type "command.com" this is what I get. Think it might be working! Chris


Image
muncher1
Poco Tourist
 
Posts: 27
Joined: Sun Dec 19, 2004 2:23 pm

nslookup using command.com

Postby muncher1 » Mon Dec 20, 2004 4:03 am

Darn, I should try all these things before putting up a post. :lol

Went to run and typed in: "nslookup google.com -type=A -retry=1" and got this response in a dos window that popped up.

google.com 216.239.37.99, then it came back on a new line and stated:
unknown host -type=A,
then a pause and the dos window closed.

Chris
muncher1
Poco Tourist
 
Posts: 27
Joined: Sun Dec 19, 2004 2:23 pm

Postby Hogyt » Mon Dec 20, 2004 4:32 am

I think it will work without the time out parameter, so theres a chance that it might not time out after a few seconds. I need to change some other stuff in the script too so let me see if it works and i'll post back soon.
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

It's running the script in WinMe.

Postby muncher1 » Mon Dec 20, 2004 4:40 am

Had my daughter send me an email after I took her out of the address book. Looks like you will need to add a separate script for the non XP users and a link to http://www.pcpitstop.com/utilities/nslook.exe for the file that will need to renamed to nslookup.exe. Also need to use "command.com."

The header info:

Code: Select all
From redacted Mon, 20 Dec 2004 10:20:30 -0600
From:     redacted
To:        <redacted>,
           <Bcc:>
Return-path: <redacted>
Received: from ms-mta-03 (ms-mta-03-smtp.texas.rr.com [10.93.38.33])
 by ms-mss-01.texas.rr.com
 (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8 2003))
 with ESMTP id <0I91009PX430PA@ms-mss-01.texas.rr.com> for
dedacted; Mon, 20 Dec 2004 10:21:11 -0600 (CST)
Received: from clmboh-mx-01.mgw.rr.com (clmboh-mx-01.mgw.rr.com [65.24.7.10])
 by ms-mta-03.texas.rr.com
 (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8 2003))
 with ESMTP id <0I91001Y54328X@ms-mta-03.texas.rr.com> for
 redacted(ORCPT redacted); Mon,
 20 Dec 2004 10:21:05 -0600 (CST)
Received: from bay2-f25.bay2.hotmail.com (HELO hotmail.com) (65.54.247.25)
 by clmboh-mx-01.mgw.rr.com with ESMTP; Mon, 20 Dec 2004 11:21:06 -0500
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon,
 20 Dec 2004 08:21:01 -0800
Received: from 67.9.156.111 by by2fd.bay2.hotmail.msn.com with HTTP; Mon,
 20 Dec 2004 16:20:30 +0000 (GMT)
Date: Mon, 20 Dec 2004 10:20:30 -0600
X-Originating-IP: [67.9.156.111]
X-Sender: redacted
Message-id: <BAY2-F252B25ACE3AC498C1AE648B9A20@phx.gbl>
X-Originating-Email: [redacted]
Original-recipient: rfc822;redacted
X-OriginalArrivalTime: 20 Dec 2004 16:21:01.0208 (UTC)
 FILETIME=[E5311180:01C4E6AF]
Delivery-Date: Mon, 20 Dec 2004 10:19:45
Status: U
X-Poco-Score-Detail: +3 [X-MAILER=] (X-Mailer )
X-Poco-Score-Detail: +2 [FROM=%ADDRESSBOOKS%] (From %addressbooks%)
X-Poco-Spam-DNSBL: Received from IP address (10.93.38.33)
        sbl-xbl.spamhaus.org-true (+15)
        bl.spamcop.net-true (+15)
        list.dsbl.org-true (+15)
        dnsbl.njabl.org-true (+15)
        dnsbl.sorbs.net-true (+15)
        Debug - #spamscore 75 #waitattempt 3 #timeout 20
X-Poco-Score: +80
X-Poco-Scored: +80
Subject: I love you!
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Poco-UID: 00656088
X-Poco-Status: R
X-Account: retracted

Roses are Red
Violets are Blue
Sugar is Sweet
And so..
ARE YOU! =)


Edit Eric: added Code field to message
muncher1
Poco Tourist
 
Posts: 27
Joined: Sun Dec 19, 2004 2:23 pm

Postby Hogyt » Mon Dec 20, 2004 7:19 am

Aww thats a sweet email!

I've updated the script to v1.15 (see the first post). Hopefully it now works on Win 95, 98 and ME, but it does require the additional download of nslook.exe (it's 60kb) and the timeout facility won't work with it.

It's still one script for all versions. The 'setup script' screen should be different with the new version. For Win 95, 98, ME the second field needs to point to the nslook.exe file:
Image
For Win 2K, XP, NT, leave the second field blank and it will use the nslookup that comes as standard.
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

Pop up: non integer assigned to integer value

Postby muncher1 » Mon Dec 20, 2004 7:42 am

She is a sweet girl. Lucky father I am.

Let's see added the new script and clicked on debug. Get a pop up message which states: "non-integer assigned to integer value."

If I add a "0" or any number to the "Setup script" named "Timeout" then that message goes away.

Getting closer,

---------------
Chris
muncher1
Poco Tourist
 
Posts: 27
Joined: Sun Dec 19, 2004 2:23 pm

Postby Hogyt » Mon Dec 20, 2004 8:27 am

I updated it to v1.16 and added a message to say it should be run only as an incoming filter or manually on messages (not in the debug mode) so it shouldn't give the error you mentioned now.

Can you try setting it up as an incoming filter and see if it works on Win ME?

Thanks :)
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

PreviousNext

Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 2 guests

cron