head 1.20; access; symbols LMTP2NNTP_1_2a7:1.19 LMTP2NNTP_1_2a6:1.17 LMTP2NNTP_1_2a5:1.17 LMTP2NNTP_1_2a4:1.16 LMTP2NNTP_1_2a3:1.16; locks; strict; comment @# @; 1.20 date 2003.02.05.15.34.19; author thl; state dead; branches; next 1.19; 1.19 date 2003.01.30.19.45.19; author rse; state Exp; branches; next 1.18; 1.18 date 2003.01.28.16.34.07; author thl; state Exp; branches; next 1.17; 1.17 date 2002.04.18.13.12.41; author thl; state Exp; branches; next 1.16; 1.16 date 2002.03.04.15.54.28; author thl; state Exp; branches; next 1.15; 1.15 date 2002.01.31.15.54.53; author thl; state Exp; branches; next 1.14; 1.14 date 2002.01.31.15.53.43; author thl; state Exp; branches; next 1.13; 1.13 date 2002.01.31.15.42.31; author thl; state Exp; branches; next 1.12; 1.12 date 2002.01.31.15.32.51; author thl; state Exp; branches; next 1.11; 1.11 date 2002.01.31.14.20.09; author thl; state Exp; branches; next 1.10; 1.10 date 2002.01.31.13.44.05; author thl; state Exp; branches; next 1.9; 1.9 date 2002.01.31.10.40.07; author thl; state Exp; branches; next 1.8; 1.8 date 2002.01.31.09.03.58; author thl; state Exp; branches; next 1.7; 1.7 date 2002.01.30.16.41.02; author thl; state Exp; branches; next 1.6; 1.6 date 2002.01.23.15.55.21; author thl; state Exp; branches; next 1.5; 1.5 date 2002.01.23.14.12.52; author thl; state Exp; branches; next 1.4; 1.4 date 2002.01.14.12.23.21; author thl; state Exp; branches; next 1.3; 1.3 date 2002.01.10.10.37.38; author thl; state Exp; branches; next 1.2; 1.2 date 2002.01.09.13.54.25; author thl; state Exp; branches; next 1.1; 1.1 date 2002.01.09.07.42.29; author thl; state Exp; branches; next ; desc @@ 1.20 log @update documentation @ text @ # # LMTP2NNTP example.conf # ### DAEMON ### childsmax 10 #see -C aka --childsmax daemonize #see -D aka --daemonize kill #see -K aka --kill pidfile "/tmp/pid" #see -P aka --pidfile veryverbose #see -V aka --veryverbose # obsolete since v1.2 # remove the "buffer" channel from l2spec acl 10.0.0.0/8 #see -a aka --acl acl 172.16.0.0/12 acl 192.168.0.0/16 acl 127.0.0.1/32 bind 127.0.0.1:12345 #see -b aka --bind, use IPv4:port #bind "/tmp/uds:600" # UNIX domain socket path:permissions ### GATEWAY ### client 127.0.0.1:45678 #see -c aka --client destination 127.0.0.1:nntp #see -d aka --destination groupmode envelope #see -g aka --groupmode headervalue 'X-gateway: lmtp2nntp gateway' #see -h aka --headervalue #include "sampleconfig.two" # -i aka --include # -l is obsolete since v1.2, see l2spec l2spec ' \ debug: prefix(prefix="%%b %%d %%H:%%M:%%S <%%L> lmtp2nntp[%%P]: ",timezone=local) \ -> buffer(size=65536) \ -> file(path="2.log",append=0,perm=0666) \ ' #see -l aka --l2spec mailfrom "any.*@@example\.org" #see -m aka --mailfrom nodename "gateway.example.com" #see -n aka --nodename operationmode post #see -o aka --operationmode restrictheader "Cc: j\.doe@@example\.org" #see -r aka --restrictheader size 555000 #see -s aka --size timeoutlmtp 0 #see --timeoutlmtp, default for accept, read, write timeoutlmtpaccept 0 #see --timeoutlmtpaccept timeoutlmtpread 10 #see --timeoutlmtpread timeoutlmtpwrite 10 #see --timeoutlmtpwrite timeoutnntp 30 #see --timeoutnntp, default for connect, read, write timeoutnntpconnect 360 #see --timeoutnntpconnect timeoutnntpread 60 #see --timeoutnntpread timeoutnntpwrite 60 #see --timeoutnntpwrite user nobody #see -u aka --user version #see -v aka --version newsgroup "test" newsgroup "alt.test" #see man page for information about newsgroup ### CRUCIAL GATEWAY HEADER REWRITE RULES ### # merge values from duplicate headers and separte them with "comma space" headerrule 500:(Reply-To|To|Cc|Bcc):$0: [%{$0[#]}%{$0[#+1]:+, }] # keep only first value from duplicate headers headerrule 510:(X-Firstonly):$0: %{$0[0]} # replace empty Subject with text "None" headerrule 520:Subject: %{$Subject:-None} # create Message-ID if omitted or illegal (<> single @@) headerrule 530:Message-id: %{messagid:s/^([^@@+@@[^@@]+)$/<$1/:s/^[^<].*$/%{tool.createmessageid}/} # append a header headerrule 540::X-Append: Tail # remove a header (empty value) headerrule 550::X-Delete: @ 1.19 log @remove trailing whitespaces from source tree @ text @@ 1.18 log @l2 has learned octal notation in the meantime @ text @d2 1 a2 1 # d4 1 a4 1 # d18 1 a18 1 acl 127.0.0.1/32 d20 1 a20 1 #bind "/tmp/uds:600" # UNIX domain socket path:permissions @ 1.17 log @typo @ text @d33 3 a35 5 -> file(path="2log",append=0,perm=432) \ ' # -> file(path="2log",append=0,perm=0666) FIXME l2 should support octal notation #' #-> buffer(size=65536) \ #add this after prefix for log buffering # -l aka --l2spec @ 1.16 log @Integration done replacing headervalue with new headerrule stuff. This version is v1.2a3 and runs live on visp.engelschall.com @ text @d70 1 a70 1 headerrule 530:Messageid: %{messagid:s/^([^@@+@@[^@@]+)$/<$1/:s/^[^<].*$/%{tool.createmessageid}/} @ 1.15 log @bugfix @ text @d56 22 @ 1.14 log @moved --version option @ text @d52 1 a52 1 user gate #see -u aka --user @ 1.13 log @moved --user option @ text @d53 1 a53 1 # -v aka --version is not available in the configfile @ 1.12 log @moved --timeout_XXX options @ text @d52 1 a52 1 uid gate #see -u aka --uid @ 1.11 log @moved --headervalue option @ text @d44 1 d48 1 @ 1.10 log @moved --destination option @ text @d27 1 a27 1 headervalue X-gateway "lmtp2nntp gateway" #see -h aka --headervalue @ 1.9 log @moved --client option @ text @d25 1 a25 1 destination news.example.com #see -d aka --destination @ 1.8 log @moved --acl option @ text @d24 1 a24 1 client 127.0.0.2 #see -c aka --client @ 1.7 log @flush. first options moved. introduced exception handling. @ text @d15 3 a17 3 acl 10/8 #see -a aka --acl acl 172.16/12 acl 192.168/16 @ 1.6 log @flag options no longer have an optarg @ text @d31 6 a36 3 l2spec prefix(prefix="%%b %%d %%H:%%M:%%S <%%L> lmtp2nntp[%%P]: ",timezone=local) \ -> buffer(size=65536) \ -> file(path=%s,append=1,perm=%d) \ @ 1.5 log @can now read flat example.conf through include option @ text @d9 2 a10 2 daemonize yes #see -D aka --daemonize kill 4711 #see -K aka --kill d28 1 a28 1 include "sampleconfig.two" # -i aka --include @ 1.4 log @first steps toward popt @ text @d6 1 a6 57 # include "sampleconfig.two" # -i aka --include childsmax 10 #see -C aka --childsmax daemonize yes #see -D aka --daemonize # -K aka --kill is not available in the configfile pidfile /tmp/pid #see -P aka --pidfile acl 10/8 #see -a aka --acl acl 172.16/12 acl 192.168/16 acl 127.0.0.1/32 bind 127.0.0.1:12345 #see -b aka --bind, use IPv4:port #bind /tmp/uds:600 # UNIX domain socket path:permissions #LMTP timeoutaccept 0 #see -t aka --timeout timeoutread 10 timeoutwrite 10 size 555000 #see -s aka --size mailfrom any.*@@example\.org #see -m aka --mailfrom nodename gateway.example.com #see -n aka --nodename #NNTP, multiple sections allowed client 127.0.0.2 #see -c aka --client destination news.example.com #see -d aka --destination operationmode post #see -o aka --operationmode timeoutconnect 360 timeoutread 60 timeoutwrite 60 #main and globals groupmode envelope #see -g aka --groupmode # -l is obsolete since v1.2, see l2spec # -V is obsolete since v1.2; remove the "buffer" channel from l2spec l2spec 'prefix(prefix="%%b %%d %%H:%%M:%%S <%%L> lmtp2nntp[%%P]: ",timezone=local) \ -> buffer(size=65536) \ -> file(path=%s,append=1,perm=%d)' \ # -l aka --l2spec uid gate #see -u aka --uid # -v aka --version is not available in the configfile newsgroup test newsgroup alt.test #see man page for information about newsgroup headervalue X-gateway "lmtp2nntp gateway" #see -h aka --headervalue restrictheader "Cc: j\.doe@@example\.org" #see -r aka --restrictheader client 1.2.3.4 #must produce an error d8 43 @ 1.3 log @replaced dotconf library with own code and str_token @ text @d44 1 a44 1 l2spec "prefix(prefix="%%b %%d %%H:%%M:%%S <%%L> lmtp2nntp[%%P]: ",timezone=local) \ d46 1 a46 1 -> file(path=%s,append=1,perm=%d)" \ @ 1.2 log @configfile example with sections and evaluation of code to parse it @ text @d12 1 a12 1 pidfile "/tmp/pid" #see -P aka --pidfile d18 1 a18 1 #bind "/tmp/uds:600" # UNIX domain socket path:permissions d26 2 a27 2 mailfrom "any.*@@example\.org" #see -m aka --mailfrom nodename "gateway.example.com" #see -n aka --nodename d44 1 a44 1 l2spec prefix(prefix="%%b %%d %%H:%%M:%%S <%%L> lmtp2nntp[%%P]: ",timezone=local) \ d46 1 a46 1 -> file(path=%s,append=1,perm=%d) \ d51 2 a52 2 newsgroup "test" newsgroup "alt.test" #see man page for information about newsgroup @ 1.1 log @first draft of a configuration file example @ text @d3 1 a3 1 # LMTP2NNTP exsample.conf d6 1 a6 1 ### DAEMON ### d8 55 a62 41 childsmax 10 #see -C aka --childsmax daemonize yes #see -D aka --daemonize # -K aka --kill is not available in the configfile pidfile "/tmp/pid" #see -P aka --pidfile # -V is obsolete since v1.2; remove the "buffer" channel from l2spec acl 10/8 #see -a aka --acl acl 172.16/12 acl 192.168/16 acl 127.0.0.1/32 bind 127.0.0.1:12345 #see -b aka --bind, use IPv4:port #bind "/tmp/uds:600" # UNIX domain socket path:permissions ### GATEWAY ### client 127.0.0.2 #see -c aka --client destination news.example.com #see -d aka --destination groupmode envelope #see -g aka --groupmode headervalue X-gateway "lmtp2nntp gateway" #see -h aka --headervalue include "sampleconfig.two" # -i aka --include # -l is obsolete since v1.2, see l2spec l2spec prefix(prefix="%%b %%d %%H:%%M:%%S <%%L> lmtp2nntp[%%P]: ",timezone=local) \ -> buffer(size=65536) \ -> file(path=%s,append=1,perm=%d) \ # -l aka --l2spec mailfrom "any.*@@example\.org" #see -m aka --mailfrom nodename "gateway.example.com" #see -n aka --nodename operationmode post #see -o aka --operationmode restrictheader "Cc: j\.doe@@example\.org" #see -r aka --restrictheader size 555000 #see -s aka --size timeout lmtp:accept 0 #see -t aka --timeout timeout lmtp:read 10 timeout lmtp:write 10 timeout nntp:connect 360 timeout nntp:read 60 timeout nntp:write 60 uid gate #see -u aka --uid # -v aka --version is not available in the configfile newsgroup "test" newsgroup "alt.test" #see man page for information about newsgroup @