Existe a opção de configuração "NewMail FIFO Path" no alpine. Citando a ajuda:
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.
Então, eu configurei a opção para '/tmp/alpine.fifo', e escrevi um utilitário simples para ler mensagens do FIFO e invocar '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.fifo"
int 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] = '#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.fifo"
int 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] = '%pre%';
sprintf(cmd, "notify-send -t 0 'New mail:' '%s'", s);
system(cmd);
}
} while (num > 0);
return 0;
}
';
sprintf(cmd, "notify-send -t 0 'New mail:' '%s'", s);
system(cmd);
}
} while (num > 0);
return 0;
}
Salve-o no alpine-notifier.c e compile com o comando 'gcc alpine-notifier.c -o alpine-notifier'. Inicie o 'alpine-notifier' depois que o alpine for iniciado. Aproveite as notificações pop-up.