ot: processing emails advice
"Voytek Eymont" <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
just wanted to get some tips or comments on my crude attempt to process mails
I get some mails that are 'time sensitive' to reply, get such around 2/day
to 2/week, not many; but, I need to reply within 5 or 10 min;
so, to this end:
Dovecot/sieve copies any such emails to a subfolder;
I then 'getmail' the subfolder to my home Maildir
then loop on each file, move out of Maildir to work dir ,
unmime, check for contents, reply or not reply
the 'Maildir' folder in above was made only to make getmail retrieve from
real mail server, it's only used by getmail and my 'batch file'
if there are some improvements someone can suggest, pls do
$ cat getmailrc
[retriever]
type = SimpleIMAPRetriever
server = 127.0.0.1
username = aaaaaaaa
password = ********
mailboxes = ("oooooo",)
[options]
delete = true
message_log = ~/.getmail/log
[destination]
type = Maildir
path = ~voytek/Maildir/
-----------------------------------------------------------
for i in $(ls /home/voytek/Maildir/new); do
mv /home/voytek/Maildir/new/$i /home/workarea
munpack -t -f $i > mail.txt
...other stuff...