procmail
[Top] [All Lists]

Re: filter number(_at_)foobar(_dot_)com

1999-08-14 09:54:46
ok people, I think I've found the solution:

first off I take Volkers/era's recipe to dump anything that doesnt have a 6
digit number as recipient:

:0
* !^TO[0-9][0-9][0-9][0-9][0-9][0-9](@|$)  << this IS a pipe symbol ?
/dev/null

now all that comes thru is stuff like 347621(_at_)ms-europa(_dot_)de   righty ?
dont worry about the domain its virtual anyways.

Now to dump the attachments I took the mimedump script from
MIME-tools-4.124 (eryq(_at_)zeegee(_dot_)com). I modified it abit (no more 
saving 
the attachments, stripped off some ===== lines)

Now any mail piped through the mimedump perl script comes out clean,
tested with *.zip, *.exe, *.cad files, also multiple ones.

So as a procmail dummy I ask, how do I apply it the most elegant. I
came up with something I believe is dead ugly:

:0
* ^TO.*
| mimedump | grep -v Content- | >> /var/spool/mail/mailfile

ugly, uh ?  I need the grep to eleminate stuff like this apearing in
at the end of the mail:

Content-Type: application/x-zip-compressed; name="file.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="file.zip"

I didn't know how to get rid of it in the mimedump script, I know even 
less about perl :(

Id like to have it more elegant, any hints ?

thx already
bye
-- 
Christophe Zwecker                     mail: doc(_at_)zwecker(_dot_)de
Hamburg, Germany                        fon: +49 179 3994867

UNIX is user-friendly. It's just not ignorant-friendly and 
idiot-friendly.Build a system even a fool can use,and only 
a fool will want to use it.

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