Hi,

I have fixed and cleaned up pygn (https://gitlab.com/mcepl/pyg,
originally https://packages.debian.org/sid/pyg) so that now I
have perfectly working mail2news gateway. The problem I have is
how to configure postfix to be part of the other direction
news2mail gateway. Local newsgroups, which should mirror the
email list are marked as moderated and moderator is set to the
email list. Therfore, when local user posts a new message to the
newsgroup it is captured by the newsserver (leafnode-2 in my
case) and sent to the email list "for approval". When the message
shows up in the email list, it is captured by the mail2news
script and the Approved header is added, when it is posted to the
newsgroup.

The problem I have is that whenever the message is sent "for
approval" to the email list, it is sent as by the user news
(which runs the newsserver instance). I know about canonical and
sender_canonical maps, but these give me an opportunity just to
rewrite STATICALLY local user to some static string. However,
what I would need here to allow multiple users producing messages
(each with properly set From: header), so I would like postfix to
do something like this:

        if sender == news@localhost then:
              sender = <whatever address is in From: header>

Is it possible to persuade Postfix to do this? I haven’t found
the way.

Thank you,

Matěj Cepl

Reply via email to