Hi,
There's a problem with the solution suggested by David, it seems to
me:
If any kind of additional part qualifies as a file attachment,
perhaps this will do the job:
:0
* HOST ?? server_that_should_handle_only_single-part_messages
* ^Content-Type:.*multipart
! $LOGNAME(_at_)other(_dot_)server
I get many messages from public free mailing-space such as hotmail.
The text of those messages is sent two times within the message --
once in an HTML-version and once as plain text.
(By the way, as I use the good old text-oriented pine for reading my
mail, I would really love to get rid of the html-part, it seems to be
an unnecessary waste of net ressources and disk space anyway...
Deleting the html-part within pine when saving it to a specific folder
makes the message contain only an indication of an "attachment", wich
is the plain text, and I have to open the body separetedly --
ennerving... I havn't set up procmail for pre-filtering the mail yet
:-<, also because I like to have the "answer"-flag set before saving
the message to the final folder for not loosing control -- is there a
smart way to get this done automatically by procmail?...)
Coming back to the point: As the two versions of what I would call the
body of the mail are treated as different parts, all these messages
have a header-line that maches "^Content-Type:.*multipart", although
only some of them have an attachment proper.
This opens two questions:
a) Is there a better criterium for ruling out only messages with a
REAL attachment, not a plain-text and a html-version?
b) Is there a way to make procmail or auxiliary programs pre-process
the mail in a way that the body contains only the
plain-text-version, and the header-lines
"^Content-Type:.*multipart" get deleted, exept in cases when there
are real attachments?
I know I'm a bloody greenhorn with this, got into the list just some
days ago... but I can't remember any comment on a program that
`messes around' with the body of the mail, separating its parts,
deleting some, and adapt the headers properly. There should be some
smart perl-scripts to handle this, shouldn't there?
All the best
Sebastian
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail