- No bell when running in window
- Additional newline after set of mail, but only if not running in window
- always flush stdout
for (i=0; i < numfolders; i++)
newmail |= watch_mbox(folders[i]->path, folders[i]->prefix, &folders[i]->size, opt_flags);
for (i=0; i < numfolders; i++)
newmail |= watch_mbox(folders[i]->path, folders[i]->prefix, &folders[i]->size, opt_flags);
- if (newmail && (opt_flags & OPT_BELL)) {
- putchar('\007');
+ if (newmail) {
+ if (!(opt_flags & OPT_WINDOW)) {
+ if (opt_flags & OPT_BELL)
+ putchar('\007');
+ putchar('\n');
+ }
#endif
else if (strncasecmp(buf, "Subject: ", 9) == 0)
stringcopy(subject, buf+9, sizeof(subject));
#endif
else if (strncasecmp(buf, "Subject: ", 9) == 0)
stringcopy(subject, buf+9, sizeof(subject));
- else if (strncasecmp(buf, "Priority: ", 10) == 0)
+ else if (strncasecmp(buf, "Priority: urgent", 16) == 0 && buf[16] == '\0')
+ priority = 1;
+ else if (strncasecmp(buf, "X-Priority: 1", 13) == 0 && buf[13] == '\0')
priority = 1;
}
} else if (strncasecmp(buf, "From ", 5) == 0) {
priority = 1;
}
} else if (strncasecmp(buf, "From ", 5) == 0) {