before release, check for - FIXME - foo - strdup - check printf/log for consistent look'n'feel and uniqness - check printf/log for consistent usage of strerr()/XXX_error() -------------------------------------------------------------------------------- o split already too large lmtp2nntp_main.c into smaller chunks (3-4 files) o move already too complex and intermixed option parsing and processing into two parts (1: parsing, 2: processing) o use dotconf library to provide a configuration file o use var library to provide variable expansion everywhere -------------------------------------------------------------------------------- newsserver fallback: when a server does not respond, mark it "disabled" for a specified time. Until the time is expired, ignore this server. However, if all others fail, ignore the timestamp. use sa_buffer (where sa_timeout is called) option -U currently has to be specified before option -b in order to set the owner/modes of Unix Domains sockets correctly. To fix this, the wholly option handling has to be revamped. on waiting for childs to finish: maximum number of seconds to wait at all and if childs still are running, kill them. This means we have to remember pid_t's. LMTP and NNTP logging by passing the l2 context into their structures. Proper cleanup when exiting through signals. move code out of getopt()-loop split already too large lmtp2nntp.c source into smaller pieces (~ 10-30KB each only) make msg.c a library with functions to add/ remove headers. add artifical delay for error respones to defeat DoS attacks. the name of the variable "errorstring" is confusing since it is used for other strings as well, see processing of -r option Lawrence Greenfield inn permissions require "read" for a STAT, so a "post w/o stat" delivery mode should be implemented. handle duplicate headers, i.e. Reply-To: **** DEVELOPMENT INFORMATION **** Proposal for future URL-style logging option syntax -L streamlog -l syslog:[mask]//[localhost[:port]][/tag=value ...] with /tag=value i.e. facility=local0 -l smtp:[mask]//[localhost[:port]][/tag=value ...] with /tag=value i.e. to=foo@example.com -l file:[mask]//path/file Debugging: $ ./.configure [wegen --with-dmalloc!] $ dmalloc -l dmalloc.log $ dmalloc debug3 **** DEVELOPMENT INFORMATION **** I want to ask how cross posting to multiple lists are handled. For example: User posts to the following two lists which are both mail to news gateways: listone@lists.org -> lists.listsone listtwo@lists.org -> lists.listtwo Obviously both messages will have an identical Message-ID header of which nntp will reject one of the two posts. Ideally this would be caught and the message would be cross posted to both lists.listsone and lists.listtwo groups. Proposal for using -h Newsgroups:${To:s/SEARCH/REPLACE/} with SEARCH/REPLACE being the following regex: perl -e '$_="foo\@bar\nFoo Bar \nfoo\@bar (Foo Bar)\n Foo Bar\n(Foo Bar) foo\@bar\n"; foreach $a (split(/\n/, $_)) { $n=$a; $n=~s/^(?:([^@<>()]+)@[^<>()]+|.*<([^@]+)@[^>]+?>.*|.*?([^@ <>()]+)@[^ <>()]+.*)$/$1$2$3/; print "$a->$n\n" };' 1.) OSSP var needs autoconf environment 2.) OSSP var needs RPM-style [] multivalue expansion 3.) include OSSP var 4.) splitting headers needs to extend known headers into multiple instances 5.) joining headers needs to merge known headers into single instances, delete headers w/o value 6.) add -f configfile option in a mini-library #comments, command[\svalue] Result is: duplicate Reply-To: headers are eleminated by 5.) empty Subject: headers can be handled by -h Subject:${Subject:-empty} missing Message-Id: headers can be handeld by -h Message-Id:${Message-Id:-$_CreateMessageId} illegal Message-Id: two or more @ use -h ${Message-Id:s/^.*@.*@.*$/$_CreateMesssageId/} illegal Message-Id: no @ use -h ${Message-Id:s/^[^@]*$/$_CreateMesssageId/} crossposting problem -h [Newsgroups:see perl example above and use feature 2.)\n] potential to merge post/header modes -h [Newsgroups:${_EnvelopeRCPT}\n] **** DETAILS **** create an array with columns for "header" and every value, index is "header"; -h [pri]:[regex]:header:[val] # merge values from duplicate headers and separte them with "comma space" -h :(Reply-To|To|Cc|Bcc):$0: [%{$0[#]}%{$0[#+1]:+, }] # keep only first value from duplicate headers -h :(X-Firstonly):$0: %{$0[0]} # replace empty Subject with text "None" -h :Subject: %{$Subject:-None} # create Message-ID if omitted or illegal (<> single @) -h :Messageid: %{messagid:s/^([^@+@[^@]+)$/<$1/:s/^[^<].*$/%{tool.createmessageid}/} # append a header -h ::X-Append: Tail # remove a header (empty value) -h ::X-Delete: foreach rule { if (rule has regex) { foreach header { if (regex matches) { createheader substitutevalue writeheader(overwrite_if_existing) } } } else { /* rule has no regex */ createheader substitutevalue writeheader(overwrite_if_existing) } }