lmtp2nntp.conf 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. ##
  2. ## lmtp2nntp.conf
  3. ##
  4. pidfile '@l_prefix@/var/lmtp2nntp/lmtp2nntp.pid'
  5. bind '@l_prefix@/var/lmtp2nntp/lmtp2nntp.socket'
  6. l2spec ' \
  7. info: prefix(prefix="%%b %%d %%H:%%M:%%S <%%L> lmtp2nntp[%%P]: ",timezone=local) \
  8. -> file(path="@l_prefix@/var/lmtp2nntp/lmtp2nntp.log",append=0,perm=432) \
  9. '
  10. #user @l_musr@ #FIXME
  11. destination news
  12. groupmode envelope
  13. operationmode post
  14. newsgroup *
  15. ### CRUCIAL GATEWAY HEADER REWRITE RULES ###
  16. # remove headers
  17. headerrule '500:^(-EF|Path|Received|To|Cc|Bcc|):$1:'
  18. # merge values from duplicate headers and separte them with "comma space"
  19. headerrule '510:^(Reply-To):$1:[${msg.header.${1}[#]}${msg.header.${1}[#+1]:+, }]'
  20. # replace empty Subject with text "None"
  21. headerrule '520::Subject:${msg.header.Subject:-None}'
  22. # create Message-ID if omitted or illegal (no or more than one '@')
  23. headerrule '530::Message-ID:${msg.header.Message-ID:-@@:s/^.*@.*@.*$//:%createmessageid}'
  24. # append a header
  25. headerrule '540::Path:lmtp2nntp!not-for-mail'
  26. headerrule '550::X-Gateway:lmtp2nntp'