2 @unnumbered Integration with Postfix
4 This section is taken from @url{http://www.postfix.org/nncp_README.html,
5 Postfix and UUCP} manual and just replaces UUCP-related calls with NNCP
8 @strong{Setting up a Postfix Internet to NNCP gateway}
10 Here is how to set up a machine that sits on the Internet and that forwards
11 mail to a LAN that is connected via NNCP.
15 @item You need an @ref{nncp-mail} program that extracts the sender
16 address from mail that arrives via NNCP, and that feeds the mail into
17 the Postfix @command{sendmail} command.
19 @item Define a @command{pipe(8)} based mail delivery transport for
22 /usr/local/etc/postfix/master.cf:
23 nncp unix - n n - - pipe
24 flags=F user=nncp argv=nncp-mail -quiet $nexthop $recipient
27 This runs the @command{nncp-mail} command to place outgoing mail into
28 the NNCP queue after replacing @var{$nexthop} by the the receiving NNCP
29 node and after replacing @var{$recipient} by the recipients. The
30 @command{pipe(8)} delivery agent executes the @command{nncp-mail}
31 command without assistance from the shell, so there are no problems with
32 shell meta characters in command-line parameters.
34 @item Specify that mail for @emph{example.com}, should be delivered via
35 NNCP, to a host named @emph{nncp-host}:
38 /usr/local/etc/postfix/transport:
39 example.com nncp:nncp-host
40 .example.com nncp:nncp-host
43 See the @command{transport(5)} manual page for more details.
45 @item Execute the command @command{postmap /etc/postfix/transport}
46 whenever you change the @file{transport} file.
48 @item Enable @file{transport} table lookups:
51 /usr/local/etc/postfix/main.cf:
52 transport_maps = hash:$config_directory/transport
55 @item Add @emph{example.com} to the list of domains that your site is
56 willing to relay mail for.
59 /usr/local/etc/postfix/main.cf:
60 relay_domains = example.com ...other relay domains...
63 See the @option{relay_domains} configuration parameter description for
66 @item Execute the command @command{postfix reload} to make the changes
71 @strong{Setting up a Postfix LAN to NNCP gateway}
73 Here is how to relay mail from a LAN via NNCP to the Internet.
77 @item You need an @ref{nncp-mail} program that extracts the sender
78 address from mail that arrives via NNCP, and that feeds the mail into
79 the Postfix @command{sendmail} command.
81 @item Specify that all remote mail must be sent via the @command{nncp}
82 mail transport to your NNCP gateway host, say, @emph{nncp-gateway}:
85 /usr/local/etc/postfix/main.cf:
86 relayhost = nncp-gateway
87 default_transport = nncp
90 Postfix 2.0 and later also allows the following more succinct form:
93 /usr/local/etc/postfix/main.cf:
94 default_transport = nncp:nncp-gateway
97 @item Define a @command{pipe(8)} based message delivery transport for
98 mail delivery via NNCP:
101 /usr/local/etc/postfix/master.cf:
102 nncp unix - n n - - pipe
103 flags=F user=nncp argv=nncp-mail -quiet $nexthop $recipient
106 This runs the @command{nncp-mail} command to place outgoing mail into
107 the NNCP queue. It substitutes the hostname (@emph{nncp-gateway}, or
108 whatever you specified) and the recipients before executing the command.
109 The @command{nncp-mail} command is executed without assistance from the
110 shell, so there are no problems with shell meta characters.
112 @item Execute the command @command{postfix reload} to make the changes