1 ## 001_username.dpatch by Kevin Coyner <kcoyner@debian.org>
3 ## DP: Username fix. Original diff from Martin Wickman <martin@wickman.com>
4 ## DP: mailcheck gets confused if username contains an @-sign. This simple
5 ## DP: patch fixes this. I also noticed that some pop3 servers don't understand
6 ## DP: the LAST command. Patch uses STAT information in this case.
7 ## DP: See Debian bug #272749
9 --- mailcheck-1.91.2/mailcheck.c~ 2001-05-11 22:38:50.000000000 +0200
10 +++ mailcheck-1.91.2/mailcheck.c 2004-09-21 21:08:17.000000000 +0200
13 strcpy (box, "INBOX");
14 /* determine username -- look for user@hostname, else use USER */
15 - p = strchr (h, '@');
16 + p = strrchr (h, '@');
21 fgets (buf, BUF_SIZE, fp);
24 - fprintf (stderr, "mailcheck: Error Receiving Stats '%s@%s:%d'\n",
25 + fprintf (stderr, "mailcheck: Error Receiving STAT '%s@%s:%d'\n",
26 user, hostname, port);
30 fgets (buf, BUF_SIZE, fp);
33 - fprintf (stderr, "mailcheck: Error Receiving Stats '%s@%s:%d'\n",
34 - user, hostname, port);
36 + /* Server does not support LAST. Assume total as new */