aacosta
asked on
Save attachment to disk from an mbox format file
Hello,
I just created an account on my linux box that will receive an email with an attachment once per day. I would like to make a script that will read the /var/spool/mail/userxx file and get ONLY the attachment and save it to disk (ie /var/www/htdocs/images/ima ge.gif)
I have tried a couple of things without success.....
Thank you very much
Alejandro Acosta,-
I just created an account on my linux box that will receive an email with an attachment once per day. I would like to make a script that will read the /var/spool/mail/userxx file and get ONLY the attachment and save it to disk (ie /var/www/htdocs/images/ima
I have tried a couple of things without success.....
Thank you very much
Alejandro Acosta,-
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank boths, I did it using metamail and it worked perfect, thank you. I did not know the metamail command.
My script is much easier...., it was just a combination between procmail and metamail.
-- cut here ---
:0
* ^Subject:.*PRUEBA
| /usr/bin/metamail -q -d; mv /tmp/netcat.blurb /home/aacosta/tmp
-- cut here ---