Scheduled maintenance — back soon.

~/blog/x11-check-e-mail

X11 check email

by eugen

2 Nov 2011

cat:linuxX11

tags:#email#fetchmail

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 imap.gmail.com with proto IMAP and options no dns
user '<your account name>' pass '<account password>' is 'local_user' here options ssl mda "notify-send -i /usr/share/icons/Tango/48x48/actions/mail-message-new.png -c mail -u normal <your account name> %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: http://www.freebsd.org/doc/handbook/mail-fetchmail.html 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

Comments

No comments yet

Be the first to leave a comment.

Leave a comment

Name and email required · moderated before publish · plain text only