Localhost terminal mail notification

Discussion in 'HOWTO-Related Questions' started by sph33r, Sep 12, 2006.

  1. sph33r

    sph33r New Member

    This is an odd question..

    When you use the 'mail' option in every linux system I've ever used, it would notify you that you had new mail. Whether it was when you logged in, or while you were logged in, you could get the "You have new mail" notification printed out in the terminal window above or below your command prompt. I'm not sure if I'm explaining that right.... but hopefully you get what I'm saying.

    I'm running the perfect Debian Sarge install from this site.. + ispconfig and postfix and all the goodies. Using a Maildir as well. What I need is some sort of notification that mail has arrived. As I'm SSH'd into the server all day, I have to occasionally run Mutt to see if I have anything in the Root mailbox.

    How do I get this notification to work? I assume it has something to do with using Maildir and Postfix with virtual users and whatever program is monitoring mail is looking at /var/spool/mail instead of ~/Maildir.
  2. falko

    falko Super Moderator ISPConfig Developer

    That's a good question... I think the easiest would be to fetch root's mail with an email client regularly or forward it to another email account...
  3. sph33r

    sph33r New Member

    Yeah I would do that if the mail meant anything :d Unfortunately it's all aliased stuff from spam. Not sure how to force the aliased items to go through spamassassin first.

    Which leads me to another question but I'll post that in a seperate thread.
  4. falko

    falko Super Moderator ISPConfig Developer

    /etc/aliases is processed before mail is piped through procmail (and therefore SpamAssassin).
  5. sph33r

    sph33r New Member

    In case anyone else had this question.....

    I simply needed to put this line in my .bashrc

    export MAILPATH=~/Maildir

    And now I get a notification that says: "You have new mail in /home/brad/Maildir" in the terminal when new mail shows up.


Share This Page