Re: notification of new email whenever user logs in on the shell
alexus [EMAIL PROTECTED] wrote: first if i'll put it in /etc/profile will it work for all users? If you're using bash, /etc/bashrc is more appropriate. /etc/profile works with most other shells that I know of. and another question how do i notify user when e-mail arriving while he's on shell? You'll have to check the manual for your shell for this. I just run my Python checker script whenever I want to see if I've got mail. At around a thousand messages a day, it would be pointless to have my shell notify me every time a message came in :). Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: notification of new email whenever user logs in on the shell
i'm not a coder i can't program something like that .. but i thought someone already did code this kind of software.. and i'm asking if it's out there and what is it call if it is thanks - Original Message - From: Charles Cazabon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 10, 2001 10:26 AM Subject: Re: notification of new email whenever user logs in on the shell alexus [EMAIL PROTECTED] wrote: basically somehow i need to show to user that there is a new mail for him/her whenever user logs in does it matter that i no longer have /var/mail/$userid? and i have Maildir instead? Yes, that's it. $HOME/Maildir/ makes it trivial to see if you have new messages; when you login, if there are files in $HOME/Maildir/new/, there's new mail. If there's files in $HOME/Maildir/cur/, you have old (seen) mail. If you want to get fancy, you can code this type of check (with whatever output messages you want) into a system-wide shell .rc file. I have a Python script I use for this purpose, which checks multiple Maildirs and presents a summary of current and new messages in each. Send me a message off-list if you want a copy. Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: notification of new email whenever user logs in on the shell
alexus [EMAIL PROTECTED] wrote: basically somehow i need to show to user that there is a new mail for him/her whenever user logs in I have a Python script I use for this purpose, which checks multiple Maildirs and presents a summary of current and new messages in each. Send me a message off-list if you want a copy. i'm not a coder i can't program something like that .. but i thought someone already did code this kind of software.. and i'm asking if it's out there and what is it call if it is Yes, many Maildir-checkers exist. There are half a dozen or more listed in the User-contributed Maildir support section of qmail.org. All you have to do is put a call to one of these in a system-wide shell rc file to make it automatic for all users on login. Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: notification of new email whenever user logs in on the shell
can you suggest one that widely used and most popular or 'cause i didn't find any there (i guess i'm blind or something) - Original Message - From: Charles Cazabon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 11, 2001 11:21 AM Subject: Re: notification of new email whenever user logs in on the shell alexus [EMAIL PROTECTED] wrote: basically somehow i need to show to user that there is a new mail for him/her whenever user logs in I have a Python script I use for this purpose, which checks multiple Maildirs and presents a summary of current and new messages in each. Send me a message off-list if you want a copy. i'm not a coder i can't program something like that .. but i thought someone already did code this kind of software.. and i'm asking if it's out there and what is it call if it is Yes, many Maildir-checkers exist. There are half a dozen or more listed in the User-contributed Maildir support section of qmail.org. All you have to do is put a call to one of these in a system-wide shell rc file to make it automatic for all users on login. Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: notification of new email whenever user logs in on the shell
alexus [EMAIL PROTECTED] wrote: Yes, many Maildir-checkers exist. There are half a dozen or more listed in the User-contributed Maildir support section of qmail.org. can you suggest one that widely used and most popular or 'cause i didn't find any there (i guess i'm blind or something) There's several. The first one one the page is a link in the line which reads Matthew C. Mead has a ``from'' program that prints a summary of mail in a maildir waiting to be read. . The line below that has a link to another one. I have no idea how popular these are; I use a quickie Python script I wrote. Here's a freebie, in bash shell scripting: #!/bin/bash INBOX=$HOME/Maildir new=`ls $INBOX/new/ | wc -l` if [ $new -gt 0 ] ; then echo You have $new new messages waiting. fi Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: notification of new email whenever user logs in on the shell
ok thanks for that script it works just fine:) two more questions though first if i'll put it in /etc/profile will it work for all users? i'm using FreeBSD 4.3-RELEASE and another question how do i notify user when e-mail arriving while he's on shell? - Original Message - From: Charles Cazabon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 12, 2001 1:04 AM Subject: Re: notification of new email whenever user logs in on the shell alexus [EMAIL PROTECTED] wrote: Yes, many Maildir-checkers exist. There are half a dozen or more listed in the User-contributed Maildir support section of qmail.org. can you suggest one that widely used and most popular or 'cause i didn't find any there (i guess i'm blind or something) There's several. The first one one the page is a link in the line which reads Matthew C. Mead has a ``from'' program that prints a summary of mail in a maildir waiting to be read. . The line below that has a link to another one. I have no idea how popular these are; I use a quickie Python script I wrote. Here's a freebie, in bash shell scripting: #!/bin/bash INBOX=$HOME/Maildir new=`ls $INBOX/new/ | wc -l` if [ $new -gt 0 ] ; then echo You have $new new messages waiting. fi Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: notification of new email whenever user logs in on the shell
alexus [EMAIL PROTECTED] wrote: basically somehow i need to show to user that there is a new mail for him/her whenever user logs in does it matter that i no longer have /var/mail/$userid? and i have Maildir instead? Yes, that's it. $HOME/Maildir/ makes it trivial to see if you have new messages; when you login, if there are files in $HOME/Maildir/new/, there's new mail. If there's files in $HOME/Maildir/cur/, you have old (seen) mail. If you want to get fancy, you can code this type of check (with whatever output messages you want) into a system-wide shell .rc file. I have a Python script I use for this purpose, which checks multiple Maildirs and presents a summary of current and new messages in each. Send me a message off-list if you want a copy. Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: notification of new email whenever user logs in on the shell
Do a 'man your shell', search for MAIL. Typically, the 'MAIL' env var has to be populated. I would assume that some shells support it, while others may not. David alexus wrote: Hi can someone point me to right direction regarding this topic? basically somehow i need to show to user that there is a new mail for him/her whenever user logs in i used to get it back then when i was using sendmail.. but i migrate to qmail.. -- A Panagram To be or not to be: that is the question, whether tis nobler in the mind to suffer the slings and arrows of outrageous fortune. In one of the Bard's best-thought-of tragedies, our insistent hero, Hamlet, queries on two fronts about how life turns rotten.
Re: notification of new email whenever user logs in on the shell
does it matter that i no longer have /var/mail/$userid? and i have Maildir instead? - Original Message - From: David Means [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 10, 2001 12:36 AM Subject: Re: notification of new email whenever user logs in on the shell Do a 'man your shell', search for MAIL. Typically, the 'MAIL' env var has to be populated. I would assume that some shells support it, while others may not. David alexus wrote: Hi can someone point me to right direction regarding this topic? basically somehow i need to show to user that there is a new mail for him/her whenever user logs in i used to get it back then when i was using sendmail.. but i migrate to qmail.. -- A Panagram To be or not to be: that is the question, whether tis nobler in the mind to suffer the slings and arrows of outrageous fortune. In one of the Bard's best-thought-of tragedies, our insistent hero, Hamlet, queries on two fronts about how life turns rotten.