LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-25-2006, 05:18 AM   #1
anil3
LQ Newbie
 
Registered: Mar 2006
Location: Norway
Distribution: Fedora
Posts: 14

Rep: Reputation: 0
Unhappy Mail challenge in script


Hello there.

I have a challenge:

In my job I have to keep track of all my collegues that are out travelling. To help me, our travelling agency sends me an email every time someone orders a new journey. (which is appx 1500 times a year)

Now I made a script that reads a mail I have stored as a text file and picks up the name of the traveller, all fligts he/she will embark on and lists this nicely in a table in a web form. The problem is that I have to copy and paste each mail into a file manually.

Next I do is to start my apache, open my homepage and voila - there it is - a complete table with all my collegues due to travel or travelling.

I have managed to set up getmail so it picks up all mails and store them where I want them - so far so good. My challenge is that these textfiles are almost unreadable due to all the =20. I therefore need a mail client that can read a file like this in a readable format, and just send it to a file.

So to recap what I want to do:
1.
getmail connects to mail server, picks up all mail and store them locally on my PC - each one as a separate file. Works fine

2.
use a mail client to iterate alle files to read each file stored by getmail, and echo it to a new file as a readable file.
I can view a mail file with mutt and the content is readable. The problem is that I want to dump the screen output to a file and I want this to be done by a script. To day I have almost 6000 mails in my inbox that is waiting for my script to do the work.

3. pick up the readable textfile and then make my webtable - works fine

Anyone who knows a mail client I can use for this? If you know one please tell me about it.
 
Old 09-25-2006, 06:14 AM   #2
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Rep: Reputation: 15
Does the following work?

Code:
mimedecode <foo | recode ISO8859-15 >bar
 
Old 09-25-2006, 08:04 AM   #3
anil3
LQ Newbie
 
Registered: Mar 2006
Location: Norway
Distribution: Fedora
Posts: 14

Original Poster
Rep: Reputation: 0
Hmm

I'm not sure because I'm on a Fedora 5 and the mimedecode is a debian thing.

If you know it will work on FC5 I think this is bulls eye for me.
 
Old 09-25-2006, 09:13 AM   #4
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Rep: Reputation: 15
Maybe you can try to 'alien --to-rpm' the package...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i script this (a challenge indeed) mrgreaper Linux - General 22 09-17-2006 12:35 PM
Mail script Braynid Linux - Newbie 20 07-11-2006 07:27 AM
Shel script mail send ("/" in mail address) problem anaid Linux - Networking 3 08-23-2005 07:41 AM
CGI Script runs to send mail, but mail is never sent robertwo Linux - Newbie 2 06-10-2004 09:57 AM
E-Mail notification to users via SMS (gateway script ok, but notification script?!?) Riku2015 Linux - Networking 10 03-08-2002 10:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration