using procmail to save attachment then delete mail?

Associate
Joined
18 Oct 2002
Posts
344
this must be possible but the only info i can find on the net is for deleting the attachment and leaving the email (as a virus scanner would).

i would like to set up an email address, where every email sent to it would have its attachment stripped (checked for extension possibly??) and put in a directory ideally on an ftp server.
(this is for a dictation system which emails the wav files, whereas i would like them uploaded to an ftp server.)

then once the attachment has been removed, delete the email.

I am using postfix, and then procmail to filter incoming mail into Mailbox folders. i presume this is possible using a .procmailrc file.

if any one could shed some light on this i'd be very grateful :)

thanks :D
 
Associate
Joined
3 Sep 2003
Posts
212
I couldn't tell you exactly how to do it but its definately possible. I stripped out the adverts in my daily dilbert by tinkering (using the same programs as you). I would probably either search around for tutorials on the promailrc. You might need to use a program like sed or awk to find / edit strings although it would probably be overkill a bit. Also its worth connecting to irc.freenode.org and going in #procmail (i guess) or even the #debian channel to ask some proper gurus. (If you go in the debian one you have to be very humble and take a bit of abuse but they really know their stuff)

Anyway good luck :)

(This is why I really like linux, lets you do nifty things like this when you don't mind tinkering + you learn loads in the process.)
 
Last edited:
Associate
OP
Joined
18 Oct 2002
Posts
344
kzar said:
I couldn't tell you exactly how to do it but its definately possible. I stripped out the adverts in my daily dilbert by tinkering (using the same programs as you). I would probably either search around for tutorials on the promailrc. You might need to use a program like sed or awk to find / edit strings although it would probably be overkill a bit. Also its worth connecting to irc.freenode.org and going in #procmail (i guess) or even the #debian channel to ask some proper gurus. (If you go in the debian one you have to be very humble and take a bit of abuse but they really know their stuff)

Anyway good luck :)

(This is why I really like linux, lets you do nifty things like this when you don't mind tinkering + you learn loads in the process.)

cool. will have a play thanks :D
 
Back
Top Bottom