LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   email script: what are the best tools for the job? (https://www.linuxquestions.org/questions/programming-9/email-script-what-are-the-best-tools-for-the-job-821928/)

xri 07-24-2010 02:48 PM

email script: what are the best tools for the job?
 
In my job, I continuously get emails with PDF attachments.
On a daily basis, I need to:
  1. open the attachments;
  2. read them, highlight some areas and type annotations on them (I currently use PDFStudio for this part);
  3. save them into an encrypted area of my disk with an appropriate name, according to a storage scheme (<person's name>_<issue>_<date>).

Since I perform this task many times a day, I thought of making some of the steps easier for me.

This post is about step 1. This is what I've done so far:
  • I download the emails from the pop server using getmail (I initially thought of fetchmail, but apparently the latter needs more work, configuration and call other programs to do the job); the incoming emails are placed into /home/xri/.downloaded-emails;
  • on /home/xri/.downloaded-emails, I use uudeview -if +e .pdf * -c -p /home/xri/incoming-pdf, which extracts the attachments and places into the directory where I will read them and annotate them;
  • on /home/xri/.downloaded-emails, I use srm *, which will keep it clean until the next download;
  • I placed it all on a script, and run it periodically through cron.

On my search to use Linux effectively for the aforementioned tasks, I've done some initial reading, which has given me a glimpse of the complexity and aspects of email (something we ordinary users take so lightly). I've come across some wonderful projects such as www.gnu.org/software/mailutils, http://www.procmail.org/, http://sieve.info/, etc. I came in contact with mutt and I love it (I'm starting to learn it).

However, I have to admit that the multiplicity of choices may be a little overwhelming.

The question at this point is:

a) Am I using the right tools for the first part (getmail, uudeview). If not, which tools do you recommend?
b) For the other two parts (2 and 3) which tools do you recommend?

I want my script(s) to be lean and mean.

In order to have good and slick management of email messaging in general, what should I learn/read/practice first?.

Thank you for reading this.

Sergei Steshenko 07-25-2010 11:04 AM

man 1 mailx
;
http://perl.overmeer.net/mailbox/ -> http://perl.overmeer.net/mailbox/html/index.html -> http://perl.overmeer.net/mailbox/htm...als/index.html .

xri 07-27-2010 07:32 PM

Quote:

Originally Posted by Sergei Steshenko (Post 4044827)

Great resource, Sergei.
Thanks a lot :)


All times are GMT -5. The time now is 11:06 PM.