procmail
[Top] [All Lists]

Renaming file attachments (read: metacharacters are evil)

2002-01-05 03:18:07
I've been trying to come up with a recipe that would parse the filename of
any file attachment, convert any white space to underscores, and simply
delete any metacharacters.

I'm sure I'm not the only person on a Unix shell account that gets JPG and
GIF attachments from Windows users with ridiculously long file names
consisting of anything from a half dozen spaces to tildes to carets to any
one of the damn metacharacters that makes the Unix file system go nuts.

Anyway, I've had absolutely no luck writing the recipe and have finally
given up after days of trying.  I'm just curious if anybody else has
written a recipe which does this and would be willing to share.  It's not
that I'm lazy, I've just realized I've hit a brick wall and would like to
see how it's done.

I'm not a complete newbie, I've been using Procmail for 6 or 8 months now
and have written my own autoresponders, simple mailing lists, had fun with
variables, interacted with Perl scripts... but this concept seems to be
beyond my grasp.  heh.

Anyway, thanks for any help you can offer. :)

-Andrew


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>