Browse Source

upgrading package: lmtp2nntp 1.2a7 -> 1.2a8

master
parent
commit
c06ed4f76d
  1. 102
      lmtp2nntp/lmtp2nntp.conf
  2. 10
      lmtp2nntp/lmtp2nntp.spec
  3. 4
      lmtp2nntp/rc.lmtp2nntp

102
lmtp2nntp/lmtp2nntp.conf

@ -1,35 +1,87 @@
##
## lmtp2nntp.conf
## lmtp2nntp.conf -- Mail to News Gateway Configuration
##
# PID, socket and logging file
pidfile '@l_prefix@/var/lmtp2nntp/lmtp2nntp.pid'
bind '@l_prefix@/var/lmtp2nntp/lmtp2nntp.socket'
l2spec ' \
info: prefix(prefix="%%b %%d %%H:%%M:%%S <%%L> lmtp2nntp[%%P]: ",timezone=local) \
-> file(path="@l_prefix@/var/lmtp2nntp/lmtp2nntp.log",append=0,perm=0644) \
'
# --- DAEMON ---
user @l_musr@
childsmax 10
pidfile "@l_prefix@/var/lmtp2nntp/lmtp2nntp.pid"
# run-time parameters
#user @l_musr@
destination news
groupmode envelope
operationmode post
newsgroup *
# --- LMTP SERVER ---
# header rewriting: remove headers
headerrule '500:^(-EF|Path|Received|To|Cc|Bcc|):$1:'
# server communication on TCP socket (address:port)
#acl 127.0.0.1/32
#bind 127.0.0.1:24
# header rewriting: merge values from duplicate headers and separte them with "comma space"
headerrule '510:^(Reply-To):$1:[${msg.header.${1}[#]}${msg.header.${1}[#+1]:+, }]'
# server communication on Unix domain socket (path:permissions)
bind "@l_prefix@/var/lmtp2nntp/lmtp2nntp.socket:660"
# header rewriting: replace empty Subject with text "None"
headerrule '520::Subject:${msg.header.Subject:-None}'
# server communication on stdin/stdout (remove DAEMON section above)
#bind -
# header rewriting: create Message-ID if omitted or illegal (no or more than one '@')
headerrule '530::Message-ID:${msg.header.Message-ID:-@@:s/^.*@.*@.*$//:%createmessageid}'
# server communication limits
timeoutlmtp 0
timeoutlmtpaccept 0
timeoutlmtpread 10
timeoutlmtpwrite 10
size 8388608
# header rewriting: append a header
headerrule '540::Path:lmtp2nntp!not-for-mail'
headerrule '550::X-Gateway:lmtp2nntp'
# ---- NNTP CLIENT ----
# client communication via TCP socket
#client 127.0.0.1
destination 127.0.0.1:nntp
# client communication limits
timeoutnntp 30
timeoutnntpconnect 60
timeoutnntpread 60
timeoutnntpwrite 60
operationmode post
# ---- GATEWAY OPERATION ----
# processing mode
groupmode envelope
mailfrom ".*"
nodename "gateway"
restrictheader "Cc: j\.doe@example\.org"
newsgroup "local.test"
# remove headers (using empty value)
headerrule '500:^(-EF|Path|Received|To|Cc|Bcc|):$1:'
# merge values from duplicate headers and separte them with "comma space"
headerrule '510:^(Reply-To):$1:[${msg.header.${1}[#]}${msg.header.${1}[#+1]:+, }]'
# replace empty Subject with text "None"
headerrule '520::Subject:${msg.header.Subject:-None}'
# create Message-ID if omitted or illegal (no or more than one '@')
headerrule '530::Message-ID:${msg.header.Message-ID:-@@:s/^.*@.*@.*$//:%createmessageid}'
# append a header
headerrule '540::Path:lmtp2nntp!not-for-mail'
# append a header
headerrule '610::X-Gateway:lmtp2nntp'
headerrule '620::Approved:gateway@example.com'
# ---- LOGGING ----
# normal operation
l2spec 'info: prefix(prefix="%b %d %H:%M:%S <%L> lmtp2nntp[%P]: ", timezone=local) \
-> buffer(size=65536) \
-> file(path="@l_prefix@/var/lmtp2nntp/lmtp2nntp.log", append=1, perm=0640)'
# normal and debug operation
#l2spec 'noop -> { \
info: prefix(prefix="%b %d %H:%M:%S <%L> lmtp2nntp[%P]: ", timezone=local) \
-> buffer(size=65536) \
-> file(path="@l_prefix@/var/lmtp2nntp/lmtp2nntp.log", append=1, perm=0640); \
debug: prefix(prefix="%b %d %H:%M:%S <%L> lmtp2nntp[%P]: ", timezone=local) \
-> file(path="@l_prefix@/var/lmtp2nntp/lmtp2nntp.debug", append=0, perm=0640) }'
# raw debug operation only
#l2spec 'debug: fd(fd=2)'

10
lmtp2nntp/lmtp2nntp.spec

@ -32,8 +32,8 @@ Packager: The OpenPKG Project
Distribution: OpenPKG [PLUS]
Group: Mail
License: GPL
Version: 1.2a7
Release: 20030204
Version: 1.2a8
Release: 20030206
# list of sources
Source0: ftp://ftp.ossp.org/pkg/tool/lmtp2nntp/lmtp2nntp-%{version}.tar.gz
@ -84,7 +84,11 @@ AutoReqProv: no
%{SOURCE rc.lmtp2nntp} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
%{l_shtool} install -c -m 644 \
-e 's;@l_prefix@;%{l_prefix};g' \
%{SOURCE lmtp2nntp.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/lmtp2nntp/lmtp2nntp.conf
-e 's;@l_musr@;%{l_musr};g' \
-e 's;@l_mgrp@;%{l_mgrp};g' \
%{SOURCE lmtp2nntp.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/lmtp2nntp/
%{l_shtool} install -c -m 644 \
INSTALL $RPM_BUILD_ROOT%{l_prefix}/etc/lmtp2nntp/lmtp2nntp.info
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%config %{l_prefix}/etc/lmtp2nntp/*'

4
lmtp2nntp/rc.lmtp2nntp

@ -20,12 +20,12 @@
# determine start command
cmd_start="$lmtp2nntp_run_cmd"
cmd_start="$cmd_start -D"
cmd_start="$cmd_start --daemonize"
cmd_start="$cmd_start --include=$lmtp2nntp_run_cfg"
# determine stop command
cmd_stop="$lmtp2nntp_run_cmd"
cmd_stop="$cmd_stop -K"
cmd_stop="$cmd_stop --kill"
cmd_stop="$cmd_stop --include=$lmtp2nntp_run_cfg"
%start -p 200 -u root

Loading…
Cancel
Save