I use alpine as my primary mail reader.  While I spend most of my day in the terminal or emacs, it would still be nice to get pretty notification of new mail using notify-bin.  Is there any way I can configure alpine to run a custom command when new mail is recieved?
How can I customize new mail notification in alpine?
email;alpine
There is NewMail FIFO Path configuration option in alpine. Quoting the help:You may have Alpine create a FIFO  special file (also called a named  pipe) where it will send a one-line  message each time a new message is  received in the current folder, the  INBOX, or any open Stayopen Folders.  To protect against two different  Alpines both writing to the same FIFO,  Alpine will only create the FIFO and  write to it if it doesn't already  exist.So, I set the option to '/tmp/alpine.fifo', and wrote simple utility to read messages from the FIFO and invoke 'notify-send':#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <string.h>#include <fcntl.h>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#define FIFO_NAME /tmp/alpine.fifoint main(void){       char s[512];    char cmd[512];    int num;    int fd = open(FIFO_NAME, O_RDONLY);    do {        if ((num = read(fd, s, 300)) == -1)            perror(read);        else {            s[num] = '\0';            sprintf(cmd, notify-send -t 0 'New mail:' '%s', s);            system(cmd);        }    } while (num > 0);    return 0;}Save it to alpine-notifier.c, and compile with 'gcc alpine-notifier.c -o alpine-notifier' command. Start 'alpine-notifier' after alpine is started. Enjoy pop-up notifications.