0

procmail will not download just .xls, .doc and .docx extentions. every condition i have found either downloads everything or nothing. i am using fedora 14

conditions i have tried that dont download anything are:

*^[ ]* name:.*\.(xls|doc|docx)  
*^      name.*\.(xls|doc|docx)  
* ?? name:.*\.(xls|doc|docx)  
* filename:.\.(xls|doc|docx)

... and ever other combination of those.

EDIT: i have tried all of these as well.

* name=.*\.(xls|doc|docx)   
* ^.*name=.*.(xls|doc|docx)  
* ^.*name.*\.(xls|doc|docx)  
*^Content-.*attachment.*name=.*\.(xls|doc|docx)

Thank you in advance

tripleee
  • 175,061
  • 34
  • 275
  • 318
Bbbh
  • 321
  • 7
  • 20
  • Procmail doesn't "download" anything. You apparently already solved this to your satisfaction, but the terminology should be cleaned up, and I'm still not sure I understand the question. If you have a better understanding now, please clarify what you wanted to accomplish so that others who have the same needs can benefit from this discussion. – tripleee Sep 09 '11 at 07:31

1 Answers1

0

Trapping 'multipart' content types first may help, but my procmail is a little rusty:

:0
* ^Content-Type: multipart/
{
  :0 B
  * ^Content-.*attachment.*name=.*\.(doc|xls)
  {

This should catch any .doc, .docx, .xls or .xlsx attachments.

tripleee
  • 175,061
  • 34
  • 275
  • 318
Wesley Rice
  • 2,711
  • 19
  • 8
  • Yes Your code worked like a charm! its funny every single tutorial and artical i found code did not work at all. you saved me from a headache. – Bbbh Nov 27 '10 at 04:33