Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Simple Command Line Email Notification
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
b2000
n00b
n00b


Joined: 18 Apr 2004
Posts: 16

PostPosted: Mon May 10, 2004 7:57 pm    Post subject: Simple Command Line Email Notification Reply with quote

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
View user's profile Send private message
far
Guru
Guru


Joined: 10 Mar 2003
Posts: 394
Location: Stockholm, Sweden

PostPosted: Mon May 10, 2004 8:11 pm    Post subject: Reply with quote

Well, there is "biff". I'm not sure how to set it up though.
_________________
The Porthole Portage Frontend
Back to top
View user's profile Send private message
turtlendog
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jan 2004
Posts: 107
Location: East AZ

PostPosted: Mon May 10, 2004 11:35 pm    Post subject: Reply with quote

Are you using the bash shell? If so:

Did you set the MAILCHECK interval?
Code:
set | grep MAIL


There is a shopt option for mailwarn, is it set?
Code:
shopt


What kind of mailbox are you using? mbox, maildir?
Back to top
View user's profile Send private message
b2000
n00b
n00b


Joined: 18 Apr 2004
Posts: 16

PostPosted: Tue May 11, 2004 12:25 am    Post subject: Reply with quote

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
View user's profile Send private message
turtlendog
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jan 2004
Posts: 107
Location: East AZ

PostPosted: Tue May 11, 2004 1:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum