Please help me figure out the right program to use to solve the following:
Everyday I have a report emailed as a PDF attachment to my inbox. The subject is the same, and it is from the same email address. I would like to be able to use a utility like fetchmail / getmail to reach into my inbox, match the subject and sender, and then download the attachment to a specific file.
Please help me identify the programs needed to:
- Connect to my Inbox
- Scan Subject Line and From Line
- Download attachment from email
- Delete from Inbox
- Send processed report to new person.
I run CentOS7, but any Linux should be fine for this task. Also, I'd like to use command line utilities for this task rather than Python or Ruby.
- My email is stored on a Server on my LAN.
- I think IMAP is what I want to use here (I'd like to keep the email on the server and only download the attachment)
- I don't need to view the attachments, only download them into a directory.
Sorry to bother everyone with this question, but I've done research on this, but I can't seem to put the pieces of the puzzle together. Please let me know if there is any additional information you need.