View previous topic :: View next topic |
Author |
Message |
b2000 n00b
Joined: 18 Apr 2004 Posts: 16
|
Posted: Mon May 10, 2004 7:57 pm Post subject: Simple Command Line Email Notification |
|
|
I'm using mutt/procmail/fetchmail/nbsmtp to get and read my mail. I was wondering what is the simples way to get some sort of notification that I have new mail from the command line. I would prefer it not to be a sound or beep or anything... but I'm getting a bit frustrated. I saw another post somewhere that said to set my MAILPATH variable. I tried, and it didnt work... This doesnt sound like the sort of thing that should be hard and im probably doing something super noob, but any help would be appreciated...
MAILCHECK=60
MAILPATH='/home/xxxx/Mail/Inbox?"You have mail."' |
|
Back to top |
|
|
far Guru
Joined: 10 Mar 2003 Posts: 394 Location: Stockholm, Sweden
|
Posted: Mon May 10, 2004 8:11 pm Post subject: |
|
|
Well, there is "biff". I'm not sure how to set it up though. _________________ The Porthole Portage Frontend |
|
Back to top |
|
|
turtlendog Tux's lil' helper
Joined: 31 Jan 2004 Posts: 107 Location: East AZ
|
Posted: Mon May 10, 2004 11:35 pm Post subject: |
|
|
Are you using the bash shell? If so:
Did you set the MAILCHECK interval?
There is a shopt option for mailwarn, is it set?
What kind of mailbox are you using? mbox, maildir? |
|
Back to top |
|
|
b2000 n00b
Joined: 18 Apr 2004 Posts: 16
|
Posted: Tue May 11, 2004 12:25 am Post subject: |
|
|
My MAILCHECK is set = to 60.
My mailwarn option was not enabled, but i enabled it. After that, I still didn't get any warnings.
I think I'm using maildir, but I'm not 100% sure how to check.
Thanx... |
|
Back to top |
|
|
turtlendog Tux's lil' helper
Joined: 31 Jan 2004 Posts: 107 Location: East AZ
|
Posted: Tue May 11, 2004 1:39 am Post subject: |
|
|
My settings:
Code: | bdug@ben ~/tmp
><> set | grep mail
MAILCHECK=1
MAILPATH=/home/bdug/tmp/mbox
OLDPWD=/home/bdug/tmp/Mail
bdug@ben ~/tmp
><> shopt | grep mail
mailwarn on |
This will be my simulated message text:
Code: | bdug@ben ~/tmp
><> ll > test
|
Surprisingly, if I touch mbox, nothing happens. I expected the mail alerting facility to use modify times:
Code: | bdug@ben ~/tmp
><> touch mbox |
But if I modify mbox it works.
Code: | bdug@ben ~/tmp
><> cat test >> mbox
You have new mail in /home/bdug/tmp/mbox |
Now I unset mailwarn and try again: still works.
Code: | bdug@ben ~/tmp
><> shopt -u mailwarn
bdug@ben ~/tmp
><> cat test >> mbox
You have new mail in /home/bdug/tmp/mbox
bdug@ben ~/tmp
><> shopt | grep mail
mailwarn off
|
Conclusion: mbox checking is unefected by the shopt option (at least in this case)
I don't know how maildirs work so I tried a couple things:
Code: |
bdug@ben ~/tmp
><> export MAILPATH=${PWD}/Mail
bdug@ben ~/tmp
><> cp test Mail/
bdug@ben ~/tmp
><> cp test Mail/inbox/ |
Only when I turned the shopt mailwarn back on did I get any notification.
Code: | bdug@ben ~/tmp
><> shopt -s mailwarn
The mail in /home/bdug/tmp/Mail has been read |
But sadly, I couldn't trigger it again.
Code: | bdug@ben ~/tmp
><> cp test Mail/inbox/
bdug@ben ~/tmp
><> cp test Mail/ |
I'm going to have to research the maildir a bit to see how it gets triggered. I thought you might like to see the mbox stuff though. |
|
Back to top |
|
|
|