You are not logged in.

#1 2004-11-11 12:30:26

neok
Member
From: Cyprus
Registered: 2003-12-14
Posts: 190
Website

New mail notification in icewm

Hi all,

I have just re-installed Arch-0.7 from scratch, having lost it all after hard disk corruption. While going thru icewm config file I thought it would be nice to setup my system to use its new mail notification facility.

I wonder if its possible to have e.g. fetcmail or similar to check and download new email from my ISP, with icewm providing notification and thunderbird the email client. From what little I know about this subject I guess it would be a matter of arranging for the three of them to share a common mailbox ? I could run thundirbird continuously so that it checks for mail but I prefer to have a liter agent to do this job.

My thanks in advance!


Regards

Neoklis ... Ham Radio Call: 5B4AZ

Offline

#2 2004-11-11 14:12:28

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 799

Re: New mail notification in icewm

I wanted:

a mail fetch immediately I log in
then a mail fetch every 40 minutes
notification of new mail by flashing a keyboard LED (doesn't interfere with full screen apps like watching movies, or sound)


I use kde so have a link to "mailmonitor" in my autostart folder. I'm sure IceWM can run a script on log in.

#! /bin/bash
MLOG=/home/paul/mailfilter.log
GLOG=/home/paul/getmail.log

while true ; do
  mailfilter > /dev/null
  echo "------------------------------------ `date +%c` ------------------------------------" >> $GLOG
  getmail -vvv --rcfile=myisp.rc >>$GLOG
  COUNT=$(grep -c Delete $MLOG)
  if ( [ $COUNT -gt 50 ] ) then
    mv $MLOG /home/paul/Maildir/new/mailfilter`date +%F%N`.night
    echo -e "Subject: Junkmail from "`date`"nFrom: paul@nightnTo: paul@nightnDate: "`date -R`"nnSpam Detailsnn" > $MLOG;
  fi
  /home/paul/mailmonitorLED &
  sleep 2400
done

I use mailfilter to delete email on the isp server, every 50 junk mails I get an email summary

I use getmail rather than fetchmail as it delivers to maildir format and supports regular expressions for parsing incoming email addresses


and here is the code for "mailmonitorLED" to flash the scroll lock:

#! /bin/bash

while [ $(ls /home/paul/Maildir/new | grep -c night) -gt 0 ] ; do
 xset led on    # flash the scroll lock LED
 sleep 1
 xset led off
 sleep 0.3
done

Offline

#3 2004-11-12 04:20:28

neok
Member
From: Cyprus
Registered: 2003-12-14
Posts: 190
Website

Re: New mail notification in icewm

vacant wrote:

I wanted:

a mail fetch immediately I log in
then a mail fetch every 40 minutes
notification of new mail by flashing a keyboard LED (doesn't interfere with full screen apps like watching movies, or sound)

Hi

I got getmail to work and icewm to beep and open thundirbird :-) but couldn't make thunderbird read the mailbox in /var/spool/mail/<user>. Also couldn't make getmail deliver to thunderbird's mailbox (possibly a matter of permissions but didn't want to change them).

Perhaps I should try mutt in an xterm ;-)

Thank you!


Regards

Neoklis ... Ham Radio Call: 5B4AZ

Offline

Board footer

Powered by FluxBB