diff -r -c mh-6.8.4-JP-3.05.orig/mts/sendmail/smail.c mh-6.8.4-JP-3.05/mts/sendmail/smail.c *** mh-6.8.4-JP-3.05.orig/mts/sendmail/smail.c Thu Sep 9 12:03:39 1999 --- mh-6.8.4-JP-3.05/mts/sendmail/smail.c Wed Jan 12 13:46:59 2005 *************** *** 437,443 **** --- 437,447 ---- char *cp; #endif /* MPOP */ + #ifdef POPPORT + if ((sd = client (server, protocol, service, FALSE, response, 0)) != NOTOK) + #else if ((sd = client (server, protocol, service, FALSE, response)) != NOTOK) + #endif return sd; #ifdef MPOP diff -r -c mh-6.8.4-JP-3.05.orig/uip/inc.c mh-6.8.4-JP-3.05/uip/inc.c *** mh-6.8.4-JP-3.05.orig/uip/inc.c Thu Apr 5 01:05:16 2001 --- mh-6.8.4-JP-3.05/uip/inc.c Wed Jan 12 14:29:47 2005 *************** *** 137,142 **** --- 137,147 ---- #define HELPSW 24 "help", 4, + #ifdef POPPORT + #define PORTSW 25 + "port portstr", 0, + #endif + NULL, 0 }; *************** *** 234,239 **** --- 239,248 ---- struct hes_postoffice *po; char *tmphost; #endif + #ifdef POPPORT + char *portstr = NULL; + int port = 0; + #endif /* absolutely the first thing we do is save our privileges, * and drop them if we can. *************** *** 451,456 **** --- 460,472 ---- case NRPOPSW: rpop = 0; continue; + #ifdef POPPORT + case PORTSW: + if (!(portstr = *argp++) || *portstr == '-') + adios (NULLCP, "missing argument to %s", argp[-2]); + port = atoi (portstr); + continue; + #endif } if (*cp == '+' || *cp == '@') { if (folder) *************** *** 518,524 **** --- 534,544 ---- #endif /* SETREUID */ #endif /* SETEUID */ #endif /* hpux */ + #ifdef POPPORT + status = pop_init (host, user, pass, snoop, rpop, port); + #else status = pop_init (host, user, pass, snoop, rpop); + #endif if (rpop > 0) (void) setuid (real_uid); if (status == NOTOK || pop_stat (&nmsgs, &nbytes) == NOTOK) diff -r -c mh-6.8.4-JP-3.05.orig/uip/popi.c mh-6.8.4-JP-3.05/uip/popi.c *** mh-6.8.4-JP-3.05.orig/uip/popi.c Fri Apr 24 06:02:00 1998 --- mh-6.8.4-JP-3.05/uip/popi.c Wed Jan 12 14:07:57 2005 *************** *** 85,91 **** --- 85,97 ---- #define HELPSW 13 "help", 4, + #ifdef POPPORT + #define PORTSW 14 + "port portstr", 0, + #endif + NULL, 0 + }; /* */ *************** *** 136,141 **** --- 142,151 ---- **argp, *arguments[MAXARGS]; struct stat st; + #ifdef POPPORT + char *portstr = NULL; + int port = 0; + #endif invo_name = r1bindex (argv[0], '/'); mts_init (invo_name); *************** *** 222,227 **** --- 232,245 ---- if (!(mshproc = *argp++) || *mshproc == '-') adios (NULLCP, "missing argument to %s", argp[-2]); continue; + + #ifdef POPPORT + case PORTSW: + if (!(portstr = *argp++) || *portstr == '-') + adios (NULLCP, "missing argument to %s", argp[-2]); + port = atol (portstr); + continue; + #endif } if (*cp == '+' || *cp == '@') { if (folder) *************** *** 253,259 **** --- 271,281 ---- } (void) sprintf (mailname, "PO box for %s@%s", user, host); + #ifdef POPPORT + if (pop_init (host, user, pass, snoop, rpop, port) == NOTOK) + #else if (pop_init (host, user, pass, snoop, rpop) == NOTOK) + #endif adios (NULLCP, "%s", response); if (rpop > 0) (void) setuid (getuid ()); diff -r -c mh-6.8.4-JP-3.05.orig/uip/popsbr.c mh-6.8.4-JP-3.05/uip/popsbr.c *** mh-6.8.4-JP-3.05.orig/uip/popsbr.c Mon Apr 2 19:50:01 2001 --- mh-6.8.4-JP-3.05/uip/popsbr.c Wed Jan 12 14:21:26 2005 *************** *** 122,132 **** --- 122,142 ---- /* */ #if defined(RPOP) || defined(APOP) + #ifdef POPPORT + int pop_init (host, user, pass, snoop, rpop, port) + int port; + #else int pop_init (host, user, pass, snoop, rpop) + #endif int rpop; #else + #ifdef POPPORT + int pop_init (host, user, pass, snoop, port) + int port; + #else int pop_init (host, user, pass, snoop) #endif + #endif char *host, *user, *pass; *************** *** 150,162 **** --- 160,184 ---- #ifndef NNTP #ifndef KPOP + #ifdef POPPORT + if ((fd1 = client (host, "tcp", POPSERVICE, rpop, response, port)) == NOTOK) + #else if ((fd1 = client (host, "tcp", POPSERVICE, rpop, response)) == NOTOK) + #endif #else /* KPOP */ (void) sprintf (buffer, "%s/%s", POPSERVICE, "kpop"); + #ifdef POPPORT + if ((fd1 = client (host, "tcp", buffer, rpop, response, port)) == NOTOK) + #else if ((fd1 = client (host, "tcp", buffer, rpop, response)) == NOTOK) #endif + #endif #else /* NNTP */ + #ifdef POPPORT + if ((fd1 = client (host, "tcp", "nntp", rpop, response, port)) == NOTOK) + #else if ((fd1 = client (host, "tcp", "nntp", rpop, response)) == NOTOK) + #endif #endif return NOTOK; diff -r -c mh-6.8.4-JP-3.05.orig/uip/pshsbr.c mh-6.8.4-JP-3.05/uip/pshsbr.c *** mh-6.8.4-JP-3.05.orig/uip/pshsbr.c Mon Apr 2 19:50:24 2001 --- mh-6.8.4-JP-3.05/uip/pshsbr.c Wed Jan 12 14:21:26 2005 *************** *** 122,132 **** --- 122,142 ---- /* */ #if defined(RPOP) || defined(APOP) + #ifdef POPPORT + int pop_init (host, user, pass, snoop, rpop, port) + int port; + #else int pop_init (host, user, pass, snoop, rpop) + #endif int rpop; #else + #ifdef POPPORT + int pop_init (host, user, pass, snoop, port) + int port; + #else int pop_init (host, user, pass, snoop) #endif + #endif char *host, *user, *pass; *************** *** 150,162 **** --- 160,184 ---- #ifndef NNTP #ifndef KPOP + #ifdef POPPORT + if ((fd1 = client (host, "tcp", POPSERVICE, rpop, response, port)) == NOTOK) + #else if ((fd1 = client (host, "tcp", POPSERVICE, rpop, response)) == NOTOK) + #endif #else /* KPOP */ (void) sprintf (buffer, "%s/%s", POPSERVICE, "kpop"); + #ifdef POPPORT + if ((fd1 = client (host, "tcp", buffer, rpop, response, port)) == NOTOK) + #else if ((fd1 = client (host, "tcp", buffer, rpop, response)) == NOTOK) #endif + #endif #else /* NNTP */ + #ifdef POPPORT + if ((fd1 = client (host, "tcp", "nntp", rpop, response, port)) == NOTOK) + #else if ((fd1 = client (host, "tcp", "nntp", rpop, response)) == NOTOK) + #endif #endif return NOTOK; diff -r -c mh-6.8.4-JP-3.05.orig/uip/sendmail.c mh-6.8.4-JP-3.05/uip/sendmail.c *** mh-6.8.4-JP-3.05.orig/uip/sendmail.c Tue Feb 9 20:30:00 1999 --- mh-6.8.4-JP-3.05/uip/sendmail.c Wed Jan 12 13:55:00 2005 *************** *** 529,535 **** --- 529,539 ---- int sd,len; char buf[BUFSIZ], response[BUFSIZ]; + #ifdef POPPORT + if ((sd = client(NULLCP, "tcp", "smtp", 0, response, 0)) == NOTOK) + #else if ((sd = client(NULLCP, "tcp", "smtp", 0, response)) == NOTOK) + #endif adios (NULLCP, "cannot open smtp client process"); (void) signal(SIGCHLD, silentdie); diff -r -c mh-6.8.4-JP-3.05.orig/zotnet/mts/client.c mh-6.8.4-JP-3.05/zotnet/mts/client.c *** mh-6.8.4-JP-3.05.orig/zotnet/mts/client.c Thu Apr 5 01:05:19 2001 --- mh-6.8.4-JP-3.05/zotnet/mts/client.c Wed Jan 12 13:43:22 2005 *************** *** 107,113 **** --- 107,118 ---- /* */ + #ifdef POPPORT + int client (args, protocol, service, rproto, response, port) + int port; + #else int client (args, protocol, service, rproto, response) + #endif char *args, *protocol, *service, /* "pop" or "pop/kpop" */ *************** *** 146,151 **** --- 151,161 ---- return NOTOK; #endif } + + #ifdef POPPORT + if (port) + sp -> s_port = htons (port); + #endif ap = arguments; if (args != NULL && *args != 0)