diff -up ./curs_main.c-notify ./curs_main.c
--- ./curs_main.c-notify	2010-09-13 19:19:55.000000000 +0200
+++ ./curs_main.c	2010-11-25 17:36:17.893821555 +0100
@@ -498,6 +498,8 @@ int mutt_index_menu (void)
 	  mutt_message _("New mail in this mailbox.");
 	  if (option (OPTBEEPNEW))
 	    beep ();
+          if (CommandNew != NULL)
+             system(CommandNew);
 	} else if (check == M_FLAGS)
 	  mutt_message _("Mailbox was externally modified.");
 
@@ -516,11 +518,18 @@ int mutt_index_menu (void)
      /* check for new mail in the incoming folders */
      oldcount = newcount;
      if ((newcount = mutt_buffy_check (0)) != oldcount)
+     {
        menu->redraw |= REDRAW_STATUS;
+     }
      if (do_buffy_notify)
      {
-       if (mutt_buffy_notify () && option (OPTBEEPNEW))
- 	beep ();
+       if (mutt_buffy_notify ()) 
+       {
+          if (option (OPTBEEPNEW))
+ 	    beep ();
+          if (CommandNew != NULL)
+            system(CommandNew);
+       }
      }
      else
        do_buffy_notify = 1;
diff -up ./globals.h-notify ./globals.h
--- ./globals.h-notify	2009-08-25 21:08:52.000000000 +0200
+++ ./globals.h	2010-11-25 17:00:00.236821201 +0100
@@ -39,6 +39,7 @@ WHERE char *Attribution;
 WHERE char *AttachCharset;
 WHERE char *AttachFormat;
 WHERE char *Charset;
+WHERE char *CommandNew;
 WHERE char *ComposeFormat;
 WHERE char *ConfigCharset;
 WHERE char *ContentType;
diff -up ./init.h-notify ./init.h
--- ./init.h-notify	2010-09-15 17:39:31.000000000 +0200
+++ ./init.h	2010-11-25 16:56:19.688822044 +0100
@@ -389,6 +389,12 @@ struct option_t MuttVars[] = {
   ** When \fIunset\fP, Mutt will not collapse a thread if it contains any
   ** unread messages.
   */
+  { "command_new",	DT_PATH, R_NONE, UL &CommandNew, 0 },
+  /*
+  ** .pp
+  ** When this variable is \fIset\fP, mutt will run the specified command
+  ** when there is a new mail
+  */
   { "compose_format",	DT_STR,	 R_BOTH, UL &ComposeFormat, UL "-- Mutt: Compose  [Approx. msg size: %l   Atts: %a]%>-" },
   /*
   ** .pp
