Another mail checker (for IMAP servers)

Esteemed fellows,

Here is a short Perl script to check for new e-mail messages directly on IMAP servers, without downloading the messages.

I use it from a menu, but, with little effort, you can adapt it to open from a button.

A mandatory screenshot:


  • Multiple mail accounts (IMAP), each one on a menu
  • Any number of messages (well, if you have hundreds of new mails, you will have hundreds of menus…)
  • You may have different MUAs to read your e-mail. i.e.: mutt to read mail from, thunderbird for mail from, etc.


  • Slow if you have a slow internet connection, or a slow IMAP server, or lots of new mails, or many accounts.


  • At least, an IMAP account
  • Perl
  • Perl module: Mail::IMAPTalk (available on CPAN):
# perl -MCPAN -e shell 'install Mail::IMAPTalk'


  1. get the Perl script from …;
  2. put the script wherever you wish;
  3. configure your accounts:
	1 => {
		SERVER_NAME => 'Foo', # Any name you wish
		USERNAME => '',
		PASSWORD => 'pass',
		MUA => '/usr/local/bin/mrxvt -e /usr/local/bin/mutt',
  1. make it executable (chmod 755);
  2. add an entry on FvWM rootmenu (or other at your option) + "Mail" Popup MenuMail
  3. add the following lines to your .fvwmrc
#--------------------- CHECK MAIL ---------------------#
AddToMenu MenuMail
+ DynamicPopupAction Function MenuFvwmMail

DestroyFunc MenuFvwmMail
AddToFunc MenuFvwmMail
+ I DestroyMenu recreate MenuMail
+ I AddToMenu MenuMail
+ I PipeRead '/path/to/script/'
#--------------------- END CHECK MAIL ---------------------#


  • Sometimes menu doesn’t refresh. Am I missing something here?


[color=red]Edited by theBlackDragon:
–> moved from Screenshots & configs[/color]