##
##  lmtp2nntp.conf
##

#   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) \
                '

#   run-time parameters
#user           @l_musr@
destination     news
groupmode       envelope
operationmode   post
newsgroup       *

# header rewriting: remove headers
headerrule      '500:^(-EF|Path|Received|To|Cc|Bcc|):$1:'

# 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]:+, }]'

# header rewriting: replace empty Subject with text "None"
headerrule      '520::Subject:${msg.header.Subject:-None}'

# header rewriting: create Message-ID if omitted or illegal (no or more than one '@')
headerrule      '530::Message-ID:${msg.header.Message-ID:-@@:s/^.*@.*@.*$//:%createmessageid}'

# header rewriting: append a header
headerrule      '540::Path:lmtp2nntp!not-for-mail'
headerrule      '550::X-Gateway:lmtp2nntp'

