My *nix world

X11 check email

I don't like to have Thunderbird open all the time just to be able to check email every 5 minutes. Also, to open/close my email client every 5 minutes is not a solution too. I found another simple solution:

  • install net-mail/fetchmail utility which is able to retrieve you email from your POP3,IMAP,ETRN or ODMR email accounts
  • set up a .fetchmailrc file in your home directory; there you can specify the accounts settings that will be checked every 5 minutes
  • start fetchmail utility (in background, as a daemon) at session start-up
  • fetchmail daemon will check email (your .fetchmailrc) specified accounts every 5 minutes and if a new email comes into your accounts you will see a notification balloon on your screen

Your .fetchmailrc file content could be something like this:

#File : .fetchmailrc
set postmaster "local_user"

poll with proto IMAP and options no dns
user '' pass '' is 'local_user' here options ssl mda "notify-send -i /usr/share/icons/Tango/48x48/actions/mail-message-new.png -c mail -u normal  %F"
... repeat the above line for every IMAP accounts you want to check (eg: your GMail accounts)

More information about that you can find at:

Start fetchmail as daemon at session start-up

In Xfce you can set up a Application Autostart (which are supposed to start at session start up):

  • Settings -> Session and Startup -> Application Autostart tab
  • define a new application autostart as bellow:
    • name: fetchmail (in fact it doesn't matter how you will name it)
    • command: fetchmail -d 300 (-d means run fetchmail as daemon, 300 means run it every 300 seconds ~ 5min)

So, the daemon will start when your X session starts and then will check email accounts defined in .fetchmailrc file for every 300 seconds (~ 5min).

When a new message arrive you will be notified by a balloon message like the one bellow:
check email

Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.

The following two tabs change content below.
X11 check email

Eugen Mihailescu

Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.
X11 check email

Latest posts by Eugen Mihailescu (see all)

Tagged on: ,

Leave a Reply

Your email address will not be published. Required fields are marked *