[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 - Deleting based on attachment file extention
Page 1 of 1

Deleting based on attachment file extention

PostPosted: Mon Nov 29, 2004 11:22 am
by FieldDir121
Is there a way to delete messages with specific file name extensions? I can delete .src by using "entire message". Deleting .com the same way presents problems. I am trying to think of a way to restrict the search to the attachment extension. Any suggestions?

Scott

PostPosted: Mon Nov 29, 2004 2:26 pm
by Michael
This can be done using a script. Exact details will depend on if you want Poco to automatically delete the message as it arrives or if you want the chance to review it first.

Use the ReadAttached command to get a list of attachments in teh message. Scan them for the offending extension(s) - (Important, include the extension). If present then either prompt for delete verification or simply delete the message using the DeleteMessage command.

PostPosted: Mon Nov 29, 2004 3:10 pm
by FieldDir121
Michael,

I have not used scripts. Is there a beginners example and description? Once I get started I can usually expand on that knowledge on my own.

Scott

PostPosted: Mon Nov 29, 2004 7:02 pm
by Pete
Hi Scott, Pocomail does not automatically run attachments so in general you don't need to worry about this.

However, if you've disabled "Tools > Options > Encoding options > ... Leave Attachments Encoded...", then you might have a problem where these attachments remain in the Attach folder on your disk drive even though you've deleted the message.

I wrote a script a while ago to automatically delete incoming attachments with user-specified extensions. You can configure it to prompt you first if you want. If you're still interested, I can post it to the Pocoscript forum.

PostPosted: Mon Nov 29, 2004 7:11 pm
by Guest
Pete,

I am not worried about Pocomail running the attachments. Any attachment with .src, .com or a few others will always be spam and probably contain viruses. I would like to automatically delete them. There are some files that I need to let through, .zip, .vhd, .c, etc.

Yes I would be interested in your script. Thank you.

Scott

PostPosted: Mon Nov 29, 2004 8:04 pm
by Pete
I've posted the script at
http://pocosystems.com/forum/viewtopic.php?t=1351

You'll need to uncomment some of the lines in FF_MAIN. Just post to that topic if you want any assistance.