aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorGerd Moellmann1999-12-10 09:53:01 +0000
committerGerd Moellmann1999-12-10 09:53:01 +0000
commit476b279958670c44467e61c0e31a822da490fee3 (patch)
tree93f55312e6095c079f550c3738b771d8c6dfdcef /lib-src
parentdfa1c6ae2c3ff364c935f383170093826a950284 (diff)
downloademacs-476b279958670c44467e61c0e31a822da490fee3.tar.gz
emacs-476b279958670c44467e61c0e31a822da490fee3.zip
(popmail): Allow mailbox specifications of the
form `po:username:hostname'.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/movemail.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index df5cb5a2d1f..ed13e9f6be8 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -685,8 +685,20 @@ char ibuffer[BUFSIZ];
685char obuffer[BUFSIZ]; 685char obuffer[BUFSIZ];
686char Errmsg[80]; 686char Errmsg[80];
687 687
688popmail (user, outfile, preserve, password, reverse_order) 688/*
689 char *user; 689 * The full legal syntax for a POP mailbox specification for movemail
690 * is "po:username:hostname". The ":hostname" is optional; if it is
691 * omitted, the MAILHOST environment variable will be consulted. Note
692 * that by the time popmail() is called the "po:" has been stripped
693 * off of the front of the mailbox name.
694 *
695 * If the mailbox is in the form "po:username:hostname", then it is
696 * modified by this function -- the second colon is replaced by a
697 * null.
698 */
699
700popmail (mailbox, outfile, preserve, password, reverse_order)
701 char *mailbox;
690 char *outfile; 702 char *outfile;
691 int preserve; 703 int preserve;
692 char *password; 704 char *password;
@@ -699,8 +711,13 @@ popmail (user, outfile, preserve, password, reverse_order)
699 char *getenv (); 711 char *getenv ();
700 popserver server; 712 popserver server;
701 int start, end, increment; 713 int start, end, increment;
714 char *user, *hostname;
715
716 user = mailbox;
717 if ((hostname = index(mailbox, ':')))
718 *hostname++ = '\0';
702 719
703 server = pop_open (0, user, password, POP_NO_GETPASS); 720 server = pop_open (hostname, user, password, POP_NO_GETPASS);
704 if (! server) 721 if (! server)
705 { 722 {
706 error ("Error connecting to POP server: %s", pop_error); 723 error ("Error connecting to POP server: %s", pop_error);