Index: ossp-pkg/lmtp2nntp/lmtp2nntp.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v rcsdiff -q -kk '-r1.35' '-r1.36' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v' 2>/dev/null --- lmtp2nntp.c 2001/08/30 08:35:44 1.35 +++ lmtp2nntp.c 2001/08/30 09:01:59 1.36 @@ -53,7 +53,7 @@ #define ERR_DELIVERY -2 #define STDSTRLEN 128 -#define MAXNEWSSERVICES 3 +#define MAXNEWSSERVICES 16 extern void lmtp_debug_dumplmtp(lmtp_t *lmtp); @@ -130,8 +130,8 @@ */ fprintf(stderr, "USAGE: %s " - "[-V] [-d deliverymode] [-g groupmode] [-h host[:port]] " - "[-m maxmessagesize] [-t tracefile] [-v] newsgroup [newsgroup ...]" + "[-V] [-d deliverymode] [-g groupmode] [-h host[:port][,host[:port], ...]] " + "[-m maxmessagesize] [-n hostname] [-t tracefile] [-v] newsgroup [newsgroup ...]" "\n", command); return; @@ -205,7 +205,7 @@ */ /* read in the arguments */ - while ((i = getopt(argc, argv, "Vd:g:h:m:t:v")) != -1) { + while ((i = getopt(argc, argv, "Vd:g:h:m:n:t:v")) != -1) { switch (i) { case 'V': /*POD [B<-V>] (version)*/ fprintf(stdout, "%s\n", lmtp2nntp_version.v_gnu); @@ -316,6 +316,13 @@ exit(ERR_EXECUTION); } break; + case 'n': /*POD [B<-n> I] */ + if (strlen(optarg) > sizeof(ctx->uname.nodename)-1) { + fprintf(stderr, "%s:Error: nodename \"%s\" to long to option -n.\n", progname, optarg); + exit(ERR_EXECUTION); + } + strcpy(ctx->uname.nodename, optarg); + break; case 't': /*POD [B<-t> I] */ ctx->option_tracing = TRUE; trace_read (-1, optarg, 0); Index: ossp-pkg/lmtp2nntp/lmtp2nntp.pod RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp.pod,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp.pod,v' 2>/dev/null --- lmtp2nntp.pod 2001/08/30 08:35:44 1.10 +++ lmtp2nntp.pod 2001/08/30 09:01:59 1.11 @@ -13,12 +13,12 @@ [B<-g> I] [B<-h> I[I<:port>][,I[I<:port>], ...]] [B<-m> I] +[B<-n> I] [B<-t> I] [B<-v>] I [I ...] B [B<-o> I] -[B<-j> I] [B<-i> I] [B<-T> I] [B<-l> I] @@ -66,7 +66,7 @@ arguments. However, in these modes the command line arguments are filters representing allowed groups. Filters can be specified as wildmat's. -=item [B<-h> I[I<:port>][,I[I<:port>], ...]] +=item B<-h> I[I<:port>][,I[I<:port>], ...] Hostname or address and optional TCP port of a NNTP service. Unless a port is specified, getserbyname(nntp) is queried with fallback to 119/tcp. If C<-h> @@ -81,11 +81,16 @@ In regard to this program they must provide the same groups and talk to each other. -=item [B<-m> I] +=item B<-m> I Maximum message size in bytes. Default is 8388608 (8M). Values below 64 are considered unacceptable small. +=item B<-n> I + +Own FQDN used in LMTP and NNTP protocols. This overrides the nodename returned +by uname(3). + =item B<-t> I Enable LMTP and NNTP protocol tracing into tracefile. When using C @@ -108,10 +113,6 @@ Outgoing network IP address or hostname to bind to. -=item B<-j> I - -Own FQDN used in LMTP and NNTP protocols. - =item B<-i> I Message id of MTA (for logging purposes only).