1 ## 002_advanced_counting.dpatch by Tomas Hoger <thoger@pobox.sk>
3 ## DP: Advanced mail counting, brief mode, maildir handling fixes,
4 ## DP: possibility to specify alternate config file.
6 diff -ruN mailcheck-1.91.1/mailcheck.1 mailcheck-1.91.1+2/mailcheck.1
7 --- mailcheck-1.91.1/mailcheck.1 2001-05-11 22:46:07.000000000 +0200
8 +++ mailcheck-1.91.1+2/mailcheck.1 2005-07-02 16:31:01.000000000 +0200
11 +.TH MAILCHECK 1 "2 July 2005"
14 -mailcheck \- Check multiple mailboxes and/or Maildirs for mail
15 +mailcheck \- Check multiple mailboxes and/or Maildirs for new mail
22 -is a simple, configurable tool that allows multiple mailboxes to be
23 -checked for the existence of mail. For local mail, it supports both
24 -the traditional mbox format and the newer Maildir (qmail) format.
25 -Mail can also be checked for on remote servers using either the POP3 or
28 -Typically, one would invoke
30 -in /etc/profile or a user-specific login script.
31 -E-mail junkies may also find it useful to invoke
33 -occasionally to check for new mail in alternate mailboxes.
37 -to keep track of messages arriving in mailboxes corresponding
38 -to several mailing lists he subscribes to.
39 +\fBmailcheck\fP [-lbcsh] [-f rcfile]
42 +\fBmailcheck\fP is a simple, configurable tool that allows multiple
43 +mailboxes to be checked for the existence of mail. For local mail, it
44 +supports both the traditional mbox format and the newer Maildir format. Mail
45 +can also be checked for on remote servers using either the POP3 or IMAP
48 +Typically, one would invoke \fBmailcheck\fP in /etc/profile or a
49 +user-specific login script. E-mail junkies may also find it useful to
50 +invoke \fBmailcheck\fP occasionally to check for new mail in alternate
53 +The author uses \fBmailcheck\fP to keep track of messages arriving in
54 +mailboxes corresponding to several mailing lists he subscribes to.
63 -file exists, mailcheck will exit silently. This option is intended
64 -to be used on systems that invoke mailcheck from a global login script
68 +Runs \fBmailcheck\fP in login mode. If a \fI~/.hushlogin\fP file exists,
69 +mailcheck will exit silently. This option is intended to be used on
70 +systems that invoke mailcheck from a global login script such as
74 +Brief mode. Produces less verbose output. If mailbox or Maildir is inside
75 +user's home direcory, only relative path is printed to output.
78 +Use more advanced counting method. While counting mails, \fBmailcheck\fP
79 +looks inside mboxes and Maildirs and count new and unread messages
80 +separately. If mbox/maildir does not contain any new or unread mail, it's
81 +excluded from report. Produced output contains more valuable information, but
82 +this method is more time-consuming.
85 +Print "no mail" summary. If no new mail message is found, print at least "no
86 +mail message" at the end. Only makes sense in combination with \fB\-c\fP.
89 +Specify alternative rc file location. If provided, default locations (see
90 +\fBFILES\fP) are not checked.
93 +Print short usage information.
99 -is simple. Upon startup,
101 -looks for a file called
103 -in the user's home directory. If that file does not exist, the
104 -default configuration file
106 +Configuring \fBmailcheck\fP is simple. Upon startup, \fBmailcheck\fP looks
107 +for a file called \fB.mailcheckrc\fP in the user's home directory. If that
108 +file does not exist, the default configuration file \fB/etc/mailcheckrc\fP
111 -Lines beginning with a hash sign (
113 -) are treated as comments and will not be processed.
114 -Lines beginning with
118 -are parsed like URLs and used to connect to network mail servers.
120 -are treated as pathnames to mailbox files or Maildir directories.
122 -Environment variables in the format
124 -will be expanded inline. For example:
126 -.B /var/spool/mail/$(USER)
127 -Will check the user's mailbox in
131 -Will check the default Maildir used by qmail installations.
133 -When connecting to POP3 or IMAP servers, the account password is not
134 -stored in the mailcheckrc file. Instead, the
136 -file in the user's home directory is used. This file, originally
137 -intended for use with
141 -should be readable only by the user owning it. It stores
142 -server/user/password combinations in the form:
150 +Lines beginning with a hash sign (\fB#\fP) are treated as comments and will
151 +not be processed. Lines beginning with \fBpop3:\fP or \fBimap:\fP are
152 +parsed like URLs and used to connect to network mail servers. All other
153 +lines are treated as pathnames to mailbox files or Maildir directories.
155 +Environment variables in the format \fB$(NAME)\fP will be expanded inline.
158 +\fB/var/spool/mail/$(USER)\fP
159 +Will check the user's mailbox in \fB/var/spool/mail\fP.
161 +\fB$(HOME)/Mailbox\fP
162 +Will check the default mailbox used by qmail installations.
164 +When connecting to POP3 or IMAP servers, the account password is not stored
165 +in the mailcheckrc file. Instead, the \fB.netrc\fP file in the user's home
166 +directory is used. This file, originally intended for use with
167 +\fIftp\fP(1) and later used by \fIfetchmail\fP(1), should be readable only
168 +by the user owning it. It stores server/user/password combinations in the
171 +machine \fIservername\fP login \fIusername\fP password \fIpassword\fP
182 -what password to use for a given server/user combination when checking
184 +This tells \fBmailcheck\fP what password to use for a given server/user
185 +combination when checking POP3 or IMAP mail.
188 Copyright (C) 1996, 1997, 1998, 2001, Jefferson E. Noxon.
190 @@ -119,14 +112,22 @@
191 the Free Software Foundation; either version 2 of the License, or
192 (at your option) any later version.
194 -On Debian GNU/Linux see /usr/doc/copyright/GPL
195 +On Debian GNU/Linux see /usr/share/common-licenses/GPL
198 Mailcheck was written for Debian GNU/Linux by Jefferson E. Noxon
199 <jeff@planetfall.com>.
202 POP3 and IMAP support was added by Rob Funk <rfunk@funknet.net>.
204 +Several enhancements by Tomas Hoger <thoger@pobox.sk>.
207 It is probably not a good idea to store passwords in a .netrc file.
209 +No SSL/TLS support for POP3 and IMAP.
212 -biff(1), mail(1), fetchmail(1), netrc(5), ftp(1)
213 +netrc(5), mbox(5), maildir(5), login(1), fetchmail(1)
215 diff -ruN mailcheck-1.91.1/mailcheck.c mailcheck-1.91.1+2/mailcheck.c
216 --- mailcheck-1.91.1/mailcheck.c 2001-05-11 22:38:50.000000000 +0200
217 +++ mailcheck-1.91.1+2/mailcheck.c 2005-10-27 21:14:58.000000000 +0200
221 * Copyright 1996, 1997, 1998, 2001 Jefferson E. Noxon <jeff@planetfall.com>
222 + * 2001 Rob Funk <rfunk@funknet.net>
223 + * 2003, 2005 Tomas Hoger <thoger@pobox.sk>
225 * This file may be copied under the terms of the GNU Public License
226 * version 2, incorporated herein by reference.
229 /* Command line parameters:
230 * -l: login mode; program exits quietly if ~/.hushlogin exists.
231 + * -b: brief mode; less verbose output mode
232 + * -c: use more advanced counting method
233 + * -s: print "no mail" summary if needed
234 + * -f: specify alternative rc file location
243 +#define BUF_SIZE (2048)
245 extern int sock_connect (char *hostname, int port);
248 /* Global variables */
249 char *Homedir; /* Home directory pathname */
250 -int Login_mode; /* TRUE if the '-l' switch is set */
252 -#define BUF_SIZE (2048)
253 +unsigned short have_mail= 0; /* Any mail found? */
255 + unsigned short login_mode; /* see '-l' option */
256 + unsigned short brief_mode; /* see '-b' option */
257 + unsigned short advanced_count; /* see '-c' option */
258 + unsigned short show_summary; /* see '-s' option */
259 + char *rcfile_path; /* see '-f' option */
260 +} Options= {0, 0, 0, 0, NULL};
263 +/* Print usage information. */
267 + printf("Usage: mailcheck [-bchls] [-f rcfile]\n"
270 + " -b - brief output mode\n"
271 + " -c - use more advanced counting method for mboxes and maildirs\n"
272 + " -l - login mode, honor ~/.hushlogin file\n"
273 + " -s - show \"no mail\" summary, if no new mail was found\n"
274 + " -f - specify alternative rcfile location\n"
275 + " -h - show this help screen\n"
279 -/* Open an rc file. Return NULL if we can't find one. */
280 +/* Open an rc file. Exit with error message, if attempt to open rcfile failed.
281 + * Otherwise, return valid FILE* .
289 - snprintf (namebuf, sizeof (namebuf), "%s/.mailcheckrc", Homedir);
290 - if (!access (namebuf, R_OK))
291 - return fopen (namebuf, "r");
293 - return fopen ("/etc/mailcheckrc", "r");
294 + /* if rcfile path was provided, do not try default locations */
295 + if (Options.rcfile_path != NULL) {
296 + if ((rcfile= fopen(Options.rcfile_path, "r")) == NULL) {
297 + fprintf(stderr, "error: couldn't open rcfile '%s'\n",
298 + Options.rcfile_path);
303 + snprintf(namebuf, sizeof (namebuf), "%s/.mailcheckrc", Homedir);
305 + if ((rcfile= fopen(namebuf, "r")) == NULL) {
306 + if ((rcfile= fopen("/etc/mailcheckrc", "r")) == NULL) {
307 + fprintf (stderr, "mailcheck: couldn't open /etc/mailcheckrc "
308 + "nor %s/.mailcheckrc\n", Homedir);
319 return expand_envstr (path);
322 +/* Should entry in maildir be ignored? */
324 +ignore_maildir_entry(const char *dir, const struct dirent *entry) {
325 + char fname[BUF_SIZE];
326 + struct stat filestat;
328 + /* *all* dotfiles should be ignored in maildir, not only . and .. ! */
329 + if (entry->d_name[0] == '.')
332 + /* also count only regular files
333 + * use dirent's d_type if possible, otherwise stat file (which is much
335 +#ifdef _DIRENT_HAVE_D_TYPE
336 + if (entry->d_type != DT_UNKNOWN) {
337 + if (entry->d_type != DT_REG)
341 +#endif /* _DIRENT_HAVE_D_TYPE */
342 + snprintf(fname, sizeof(fname), "%s/%s", dir, entry->d_name);
343 + fname[sizeof(fname) - 1]= '\0';
345 + if (stat(fname, &filestat) != 0) {
346 + fprintf(stderr, "mailcheck: failed to stat file: %s\n", fname);
350 + if (!S_ISREG(filestat.st_mode))
352 +#ifdef _DIRENT_HAVE_D_TYPE
354 +#endif /* _DIRENT_HAVE_D_TYPE */
359 +/* Count files in subdir of maildir (new/cur/tmp). */
361 count_entries (char *path)
364 struct dirent *entry;
367 - mdir = opendir (path);
369 + if ((mdir= opendir(path)) == NULL)
372 - while ((entry = readdir (mdir)))
374 + while ((entry = readdir (mdir))) {
375 + if (ignore_maildir_entry(path, entry))
388 +/* Get password for given account on given host from ~/.netrc file. */
390 getpw (char *host, char *account)
392 @@ -227,6 +321,124 @@
396 +/* Count mails in unix mbox. */
398 +check_mbox(const char *path, int *new, int *read, int *unread)
400 + char linebuf[BUF_SIZE];
403 + unsigned short in_header= 0; /* do we parse mail header or mail body? */
405 + if ((mbox= fopen(path, "r")) == NULL) {
406 + fprintf(stderr, "mailcheck: unable to open mbox %s\n", path);
414 + while (fgets(linebuf, sizeof(linebuf), mbox)) {
416 + if (strncmp(linebuf, "From ", 5) == 0) { /* 5 == strlen("From ") */
422 + if (linebuf[0] == '\n') {
425 + else if (strncmp(linebuf, "Status: ", 8) == 0) { /* 8 == strlen("Status: ") */
426 + linelen= strlen(linebuf);
428 + if (linelen >= 10 &&
429 + ((linebuf[8] == 'R' && linebuf[9] == 'O') ||
430 + (linebuf[8] == 'O' && linebuf[9] == 'R'))) {
434 + else if (linelen >= 9 && linebuf[8] == 'O') {
447 +/* Count mails in maildir. Slightely modified original Jeff's version. Just
448 + * counts files in maildir/new and maildir/cur. */
450 +check_maildir_old(const char *path, int *new, int *cur)
452 + char dir[BUF_SIZE];
454 + snprintf(dir, sizeof(dir), "%s/new", path);
455 + *new= count_entries(dir);
456 + snprintf(dir, sizeof(dir), "%s/cur", path);
457 + *cur= count_entries(dir);
459 + if (*new == -1 || *cur == -1)
465 +/* Count mails in maildir. Newer, more sophisticated, but also more time
466 + * consuming version. */
468 +check_maildir(const char *path, int *new, int *read, int *unread) {
469 + char dir[BUF_SIZE];
471 + struct dirent *entry;
474 + /* new mail - standard way */
475 + snprintf(dir, sizeof(dir), "%s/new", path);
476 + *new= count_entries(dir);
480 + /* older mail - check also mail status */
481 + snprintf(dir, sizeof(dir), "%s/cur", path);
482 + if ((mdir= opendir(dir)) == NULL)
487 + while ((entry = readdir (mdir))) {
488 + if (ignore_maildir_entry(dir, entry))
491 + if ((pos= strchr(entry->d_name, ':')) == NULL) {
494 + else if (*(pos + 1) != '2') {
495 + fprintf(stderr, "mailcheck: ooops, unsupported experimental info "
496 + "semantics on %s/%s\n", dir, entry->d_name);
499 + else if (strchr(pos, 'S') == NULL) {
500 + /* search for seen ('S') flag */
513 +/* Count mails in pop3 mailbox. */
515 check_pop3 (char *path, int *new_p, int *cur_p)
521 +/* Count mails in imap mailbox. */
523 check_imap (char *path, int *new_p, int *cur_p)
525 @@ -330,13 +543,15 @@
526 port = getnetinfo (path, hostname, box, user, pass);
529 - fprintf (stderr, "mailcheck: Unable to get login information for %s\n", path);
530 + fprintf (stderr, "mailcheck: Unable to get login information for %s\n",
535 if ((fd = sock_connect (hostname, port)) == -1)
537 - fprintf (stderr, "mailcheck: Not Connected To Server '%s:%d'\n", hostname, port);
538 + fprintf (stderr, "mailcheck: Not Connected To Server '%s:%d'\n",
543 @@ -397,103 +612,243 @@
548 +/* Check for mail in given mail path (could be mbox, maildir, pop3 or imap). */
550 check_for_mail (char *tmppath)
553 - char *mailpath = expand_envstr (tmppath);
554 - char maildir[BUF_SIZE];
555 - int new = 0, cur = 0;
558 - if (!stat (mailpath, &st))
560 - /* Is it a maildir? */
561 - if (S_ISDIR (st.st_mode))
563 - sprintf (maildir, "%s/cur", mailpath);
564 - cur = count_entries (maildir);
565 - sprintf (maildir, "%s/new", mailpath);
566 - new = count_entries (maildir);
568 - if ((cur < 0) || (new < 0))
571 - "mailcheck: %s is not a valid maildir -- skipping.\n",
578 - printf ("You have %d new and %d saved messages in %s\n",
579 - new, cur, mailpath);
585 - printf ("You have %d saved messages in %s\n", cur, mailpath);
591 - printf ("You have %d new messages in %s\n", new, mailpath);
595 + int brief_name_offset= 0;
597 + /* expand environment variables in path specifier */
598 + mailpath= expand_envstr (tmppath);
600 + /* in brief mode, print relative paths for mailboxes/maildirs inside home
602 + if (Options.brief_mode &&
603 + strncmp(mailpath, Homedir, strlen(Homedir)) == 0) {
604 + brief_name_offset= strlen(Homedir) + 1;
607 + if (!stat (mailpath, &st)) {
608 + /* Is it regular file? (if yes, it should be mailbox ;) */
609 + if (S_ISREG (st.st_mode)) {
610 + /* Use advanced counting? */
611 + if (!Options.advanced_count) {
612 + if (st.st_size != 0) {
613 + if (!Options.brief_mode) {
614 + printf ("You have %smail in %s\n",
615 + (st.st_mtime > st.st_atime) ? "new " : "", mailpath);
617 + printf ("%s: %smail message(s)\n", mailpath + brief_name_offset,
618 + (st.st_mtime > st.st_atime) ? "new " : "contains saved ");
622 + } else { /* advanced count */
623 + int new, read, unread;
624 + if (check_mbox(mailpath, &new, &read, &unread) == -1)
627 - /* It's an mbox. */
628 - else if (st.st_size != 0)
629 - printf ("You have %smail in %s\n",
630 - (st.st_mtime > st.st_atime) ? "new " : "", mailpath);
631 + if (!Options.brief_mode) {
632 + if (new > 0 && unread > 0) {
633 + printf("You have %d new and %d unread messages in %s\n",
634 + new, unread, mailpath);
636 + } else if (new > 0) {
637 + printf("You have %d new messages in %s\n",
640 + } else if (unread > 0) {
641 + printf("You have %d unread messages in %s\n",
647 + if (new > 0 && unread > 0) {
648 + printf("%s: %d new and %d unread message(s)\n",
649 + mailpath + brief_name_offset, new, unread);
651 + } else if (new > 0) {
652 + printf("%s: %d new message(s)\n",
653 + mailpath + brief_name_offset, new);
655 + } else if (unread > 0) {
656 + printf("%s: no new mail, %d unread message(s)\n",
657 + mailpath + brief_name_offset, unread);
665 - /* Is it POP3 or IMAP? */
666 - if (!strncmp (mailpath, "pop3:", 5))
667 - retval = check_pop3 (mailpath, &new, &cur);
668 - else if (!strncmp (mailpath, "imap:", 5))
669 - retval = check_imap (mailpath, &new, &cur);
674 + /* Is it directory? (if yes, it should be maildir ;) */
675 + /* for maildir specification, see: http://cr.yp.to/proto/maildir.html */
676 + else if (S_ISDIR (st.st_mode)) {
677 + if (!Options.advanced_count) { /* use old counting method */
680 + if (check_maildir_old(mailpath, &new, &cur) == -1) {
682 + "mailcheck: %s is not a valid maildir -- skipping.\n", mailpath);
686 + if (!Options.brief_mode) { /* traditional output */
687 + if (cur > 0 && new > 0) {
688 printf ("You have %d new and %d saved messages in %s\n",
689 - new, cur, mailpath);
691 - printf ("You have %d saved messages in %s\n", cur, mailpath);
693 + new, cur, mailpath);
695 + } else if (new > 0) {
696 printf ("You have %d new messages in %s\n", new, mailpath);
698 + } else if (cur > 0) {
699 + printf ("You have %d saved messages in %s\n", cur, mailpath);
702 + } else { /* brief output */
703 + if (cur > 0 && new > 0) {
704 + printf ("%s: %d new and %d saved message(s)\n",
705 + mailpath + brief_name_offset, new, cur);
707 + } else if (new > 0) {
708 + printf ("%s: %d new message(s)\n",
709 + mailpath + brief_name_offset, new);
711 + } else if (cur > 0) {
712 + printf ("%s: %d saved message(s)\n",
713 + mailpath + brief_name_offset, cur);
720 + else { /* new counting method */
721 + int new, read, unread;
723 + if (check_maildir(mailpath, &new, &read, &unread) == -1) {
725 + "mailcheck: %s is not a valid maildir -- skipping.\n", mailpath);
729 + if (!Options.brief_mode) {
730 + if (new > 0 && unread > 0) {
731 + printf("You have %d new and %d unread messages in %s\n",
732 + new, unread, mailpath);
734 + } else if (new > 0) {
735 + printf("You have %d new messages in %s\n",
738 + } else if (unread > 0) {
739 + printf("You have %d unread messages in %s\n",
745 + if (new > 0 && unread > 0) {
746 + printf("%s: %d new and %d unread message(s)\n",
747 + mailpath + brief_name_offset, new, unread);
749 + } else if (new > 0) {
750 + printf("%s: %d new message(s)\n",
751 + mailpath + brief_name_offset, new);
753 + } else if (unread > 0) {
754 + printf("%s: no new mail, %d unread message(s)\n",
755 + mailpath + brief_name_offset, unread);
761 + fprintf(stderr, "mailcheck: error, %s is not mbox or maildir\n",
765 + else if (strncmp(mailpath, "pop3:", 5) == 0 ||
766 + strncmp(mailpath, "imap:", 5) == 0) {
768 + int new= 0, cur= 0;
770 + /* Is it POP3 or IMAP? */
771 + if (!strncmp (mailpath, "pop3:", 5))
772 + retval = check_pop3 (mailpath, &new, &cur);
774 + retval = check_imap (mailpath, &new, &cur);
779 + if (!Options.brief_mode) { /* traditional output */
780 + if (cur > 0 && new > 0) {
781 + printf ("You have %d new and %d saved messages in %s\n",
782 + new, cur, mailpath);
784 + } else if (new > 0) {
785 + printf ("You have %d new messages in %s\n", new, mailpath);
787 + } else if (cur > 0) {
788 + printf ("You have %d saved messages in %s\n", cur, mailpath);
791 + } else { /* brief output */
792 + if (cur > 0 && new > 0) {
793 + printf ("%s: %d new and %d saved message(s)\n",
794 + mailpath + brief_name_offset, new, cur);
796 + } else if (new > 0) {
797 + printf ("%s: %d new message(s)\n",
798 + mailpath + brief_name_offset, new);
800 + } else if (cur > 0) {
801 + printf ("%s: %d saved message(s)\n",
802 + mailpath + brief_name_offset, cur);
808 + fprintf(stderr, "mailcheck: invalid line '%s' in rc-file\n", mailpath);
812 /* Process command-line options */
814 process_options (int argc, char *argv[])
821 + while ((opt= getopt(argc, argv, "bchlsf:")) != -1)
823 - result = getopt (argc, argv, "l");
831 + Options.brief_mode= 1;
834 + Options.advanced_count= 1;
842 + Options.login_mode= 1;
845 + Options.show_summary= 1;
848 + Options.rcfile_path= optarg;
856 main (int argc, char *argv[])
858 @@ -501,43 +856,53 @@
862 - Homedir = getenv ("HOME");
865 - fprintf (stderr, "%s: couldn't read environment variable HOME.\n",
869 + ptr= getenv ("HOME");
871 + fprintf (stderr, "mailcheck: couldn't read environment variable HOME.\n");
874 + Homedir= strdup(ptr);
877 process_options (argc, argv);
880 + if (Options.login_mode)
882 - /* If we can stat .hushlogin successfully, we should exit. */
883 + /* If we can stat .hushlogin successfully and it is regular file, we
885 snprintf (buf, sizeof (buf), "%s/.hushlogin", Homedir);
886 - if (!stat (buf, &st))
887 + if (!stat (buf, &st) && S_ISREG(st.st_mode))
891 - rcfile = open_rcfile ();
894 - fprintf (stderr, "%s: couldn't open /etc/mailcheckrc "
895 - "or %s/.mailcheckrc.\n", argv[0], Homedir);
898 + rcfile= open_rcfile();
900 while (fgets (buf, sizeof (buf), rcfile))
902 /* eliminate newline */
903 ptr = strchr (buf, '\n');
908 /* If it's not a blank line or comment, look for mail in it */
909 if (strlen (buf) && (*buf != '#'))
910 check_for_mail (buf);
913 + if (Options.show_summary && !have_mail) {
914 + if (Options.brief_mode) {
915 + printf("no new mail\n");
918 + printf("No new mail.\n");
928 +/* vim:set ts=8 sw=2: */
930 diff -ruN mailcheck-1.91.1/mailcheckrc mailcheck-1.91.1+2/mailcheckrc
931 --- mailcheck-1.91.1/mailcheckrc 2001-05-11 21:58:56.000000000 +0200
932 +++ mailcheck-1.91.1+2/mailcheckrc 2005-06-30 21:48:17.000000000 +0200
935 # If you're using qmail's Maildir feature, you'll probably want to
939 +# For qmail's mbox file in user's home directory:
942 # Mailcheck also supports remote POP3 and IMAP mailboxes. Most users
944 # If you have a remote POP3 mailbox, use a line like the following
945 # if your username is the same there as here.
948 # If your POP3 username is different there than here:
949 #pop3://username@servernameint
951 # In either case, you need to put an entry in $HOME/.netrc for the password.
952 # .netrc is in the form:
954 # machine mail.example.com login rmf1 password MyPasWrd
956 # where mail.example.com, rmf1, and MyPasWrd are the values for your account,
957 # and machine, login, and password are literal text in the file.
959 diff -ruN mailcheck-1.91.1/netrc.c mailcheck-1.91.1+2/netrc.c
960 --- mailcheck-1.91.1/netrc.c 2001-05-11 22:16:25.000000000 +0200
961 +++ mailcheck-1.91.1+2/netrc.c 2005-06-30 21:36:54.000000000 +0200
967 - ("mailcheck: %s:%d: warning: found \"%s\" before any host names\n"),
968 + _("mailcheck: %s:%d: warning: found \"%s\" before any "
970 file, ln, premature_token);
972 premature_token = NULL;
977 - _("mailcheck: %s:%d: warning: unknown token \"%s\"\n"), file,
979 + _("mailcheck: %s:%d: warning: unknown token "
980 + "\"%s\"\n"), file, ln, tok);