Link to home
Start Free TrialLog in
Avatar of aacosta
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/image.gif)
  I have tried a couple of things without success.....

Thank you very much

Alejandro Acosta,-
ASKER CERTIFIED SOLUTION
Avatar of Gns
Gns

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of yuzh
yuzh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aacosta
aacosta

ASKER

Hello,
  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 ---