[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 - Filtering for file extension

Filtering for file extension

Discussion on Bayesian and standard junk mail filters

Moderators: Eric, Tomas, robin, Michael

Filtering for file extension

Postby FieldDir121 » Sat Mar 11, 2006 3:29 pm

Using "Attachment Remover" (available on this site) I can delete files with specified extensions. It does this by searching the message to see if Pocomail has added a list of attachments. This script works whether the attachment is decoded or not.

However, when I try to use a filter to detect those same attachments they get past the filter, at least when they are not decoded.

Does anyone know of a way for a filter to watch for attachments with specific names such as "image.jpg" without using a script?

(Later) Also, is there a way for the script to determine the size [in bytes] of the attachment?

Scott
FieldDir121
Resident Poster
 
Posts: 149
Joined: Mon Aug 02, 2004 5:18 pm

Postby Guest » Sun Mar 12, 2006 2:26 am

Why not modify Attachment Remover so that when it gets to the Delete command, you insert the command you want?

CSSJR
Guest
 

Postby Guest » Sun Mar 12, 2006 2:31 am

That sentence construction left something to be desired.

Why don't you modify Attachment Remover by inserting the command you wish to execute at the point where Attachment Remover as originally written executes the Delete command?

I can't write script, but I have been able to construct some scripts by taking two and mergining them to get the result I want.

Perhaps you could do the same.

CSSJR
Guest
 

Postby FieldDir121 » Sun Mar 12, 2006 9:41 am

CSSJR,

A good suggestion, thanks. I came to that conclusion myself some time last night. I let the program perform the delete, but prior to that I store a copy in a special mailbox. Only took a single line of code.

Not as easy to modify as adding a file name to a file and using a file within a filter, but workable. I suppose I could modify the script to have it open the file. However, once the spammer realizes using the same file name all the time is a bad idea, this particular method of trapping spam will be less effective.

Code: Select all
:FF_DELETE
Set $FF_doDelete "True"
SaveMessage %message "Specific"        { added by Scott on March 11, 2006
Return


Regarding your own efforts, if you can combine scripts to do what you want, you could write your own by copying ideas from others. I waited over 6 months before writing my first script. I then proceeded to write about 10 in the next week or so. I have posted most of them for others to use.

I have recently learned that most ISP's do extensive spam filtering without their customers permission or knowledge. Since the company I work for hosts their own mail server, there is no external filtering. As a result I average over 60 spams per day. The few attempts at server based filtering have resulted in my being unable to receive e-mails from some legitimate sources.

The down side of ISP's filtering is that some valid e-mails can get filtered. A coupl eof weeks ago I inadvertently discovered a telephone number that I cannot e-mail to myself (the e-mail just vanishes). I reported this to my ISP. They were able to duplicate the results using their own accounts. They said they would look into it. No further word after that.

Scott
FieldDir121
Resident Poster
 
Posts: 149
Joined: Mon Aug 02, 2004 5:18 pm

Postby FieldDir121 » Thu Mar 23, 2006 6:22 am

I have noticed that the Attachment Remover doesn't always recognize files or images that are sent as part of the message rather than as attachments. The way to tell the difference is to right click on the file in the attachments pane. If cut, copy and delete are options the file is an attachment rather than being a part of the message.

I think I saw an option somewhere to force files to be attachments, but sometimes I want them to be left inside the message. I have tried several methods of storing the messages to files in raw format but have seen no indication of the attachments. They must not be included by the Pocoscript functions.

Scott
FieldDir121
Resident Poster
 
Posts: 149
Joined: Mon Aug 02, 2004 5:18 pm


Return to Junk Mail Filtering Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron