Index: ossp-pkg/lmtp2nntp/00TODO RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/00TODO,v rcsdiff -q -kk '-r1.25' '-r1.26' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/00TODO,v' 2>/dev/null --- 00TODO 2001/09/03 15:06:29 1.25 +++ 00TODO 2001/09/05 09:14:26 1.26 @@ -4,6 +4,14 @@ [B<-b> I] + +Hallo Thomas, wir haben festgestellt, dass wir noch ein feature brauchen. +Momentan waere es moeglich, dass jeder x-beliebige (der die entsprechende +Mail-Adresse kennt) eine Mail an mail.de.cw.net schickt, und diese somit auf +unsern News-Server abgebildet wird. Wir brauchen daher noch einen Filter, der +dies pro Gruppe auf einen definierten, erlaubten Absender erlaubt. +[B<-m> I] + use L2 for logging, grab ID through RFC1891 ENVID, 6.2 [B<-i> I] [B<-l> I] Index: ossp-pkg/lmtp2nntp/lmtp2nntp.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v rcsdiff -q -kk '-r1.39' '-r1.40' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/lmtp2nntp.c,v' 2>/dev/null --- lmtp2nntp.c 2001/09/04 09:46:06 1.39 +++ lmtp2nntp.c 2001/09/05 09:14:26 1.40 @@ -112,6 +112,7 @@ char *option_deliverymodefakedsn; int option_maxmessagesize; int option_waittime; + char *option_mailfrom; char *cpBindh; char *cpBindp; sa_t *saBind; @@ -152,11 +153,13 @@ fprintf(stderr, "USAGE: %s " "[-V]" + "[-b bindaddr[:port]" "[-d deliverymode]" "[-g groupmode]" "[-h host[:port][,host[:port], ...]]" - "[-m maxmessagesize]" - "[-n hostname]" + "[-m mailfrom]" + "[-n nodename]" + "[-s size]" "[-t tracefile]" "[-v]" "[-w waittime]" @@ -194,6 +197,7 @@ ctx->option_deliverymodefakedsn = "5.7.1"; /* Delivery not authorized, message refused */ ctx->option_maxmessagesize = 8 * 1024 * 1024; ctx->option_waittime = -1; + ctx->option_mailfrom = NULL; ctx->cpBindh = NULL; ctx->cpBindp = NULL; ctx->saBind = NULL; @@ -238,7 +242,7 @@ */ /* read in the arguments */ - while ((i = getopt(argc, argv, "Vb:d:g:h:m:n:t:vw:")) != -1) { + while ((i = getopt(argc, argv, "Vb:d:g:h:m:n:s:t:vw:")) != -1) { switch (i) { case 'V': /*POD [B<-V>] (version)*/ fprintf(stdout, "%s\n", lmtp2nntp_version.v_gnu); @@ -373,20 +377,22 @@ } free(azHosts); break; - case 'm': /*POD [B<-m> I] */ - ctx->option_maxmessagesize = atoi(optarg); - if(ctx->option_maxmessagesize < 64) { - fprintf(stderr, "%s:Error: maximum message size is unacceptable small.\n", progname); - exit(ERR_EXECUTION); - } + case 'm': /*POD [B<-m> I] */ + ctx->option_mailfrom = strdup(optarg); break; - case 'n': /*POD [B<-n> I] */ + 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 's': /*POD [B<-s> I] */ + ctx->option_maxmessagesize = atoi(optarg); + if(ctx->option_maxmessagesize < 64) { + fprintf(stderr, "%s:Error: maximum message size is unacceptable small.\n", progname); + exit(ERR_EXECUTION); + } case 't': /*POD [B<-t> I] */ ctx->option_tracing = TRUE; trace_read (-1, optarg, 0); @@ -688,6 +694,8 @@ if (ctx->ns[i].h != NULL) free(ctx->ns[i].h); } + if (ctx->option_mailfrom != NULL) + free(ctx->option_mailfrom); if (ctx->cpBindh != NULL) free(ctx->cpBindh); if (ctx->cpBindp != NULL) Index: ossp-pkg/lmtp2nntp/lmtp2nntp.pod RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp.pod,v rcsdiff -q -kk '-r1.15' '-r1.16' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp.pod,v' 2>/dev/null --- lmtp2nntp.pod 2001/09/04 09:46:06 1.15 +++ lmtp2nntp.pod 2001/09/05 09:14:27 1.16 @@ -34,18 +34,19 @@ B [B<-V>] +[B<-b> I[I<:port>] [B<-d> I] [B<-g> I] [B<-h> I[I<:port>][,I[I<:port>], ...]] -[B<-m> I] -[B<-n> I] +[B<-m> I] +[B<-n> I] +[B<-s> I] [B<-t> I] [B<-v>] [B<-w> I] I [I ...] B -[B<-b> I] [B<-i> I] [B<-l> I] @@ -67,6 +68,14 @@ Print version information. +=item B<-b> I[I<:port>] + +Bind address and/or port to be used by the LMTP client. If an address is +specified but port is omitted the kernel chooses an ephemeral port. If you +want to specify a port but no address replace address with 0.0.0.0. If +completely omitted, 0.0.0.0:0 is assumed which causes the kernel to choose an +address based on routing information and an ephemeral port. + =item B<-d> I Possible values for I are C, C or a string used to @@ -107,16 +116,22 @@ 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. +"MAIL From:" filter to limit sender addresses. If ommitted, anyone can send +mail. The value to be compared includes the angle brackets. Use a PCRE (Perl +compatible reguar expression) for I. =item B<-n> I Own FQDN used in LMTP and NNTP protocols. This overrides the nodename returned by uname(3). +=item B<-s> I + +Size limitation on message in bytes. Default is 8388608 (8M). Values below 64 +are considered unacceptable small. + =item B<-t> I Enable LMTP and NNTP protocol tracing into tracefile. When using C