]> Cypherpunks.ru repositories - nncp.git/commitdiff
Descriptive Postfix integration documentation
authorSergey Matveev <stargrave@stargrave.org>
Mon, 16 Jan 2017 09:20:47 +0000 (12:20 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 16 Jan 2017 09:20:47 +0000 (12:20 +0300)
doc/index.texi
doc/postfix.texi [new file with mode: 0644]
doc/usecases.texi

index e80acd9d548f3c2090175fe852dacf069127f81f..ceadf1cd809b607fdf49d112afa1539e7ef7d2e1 100644 (file)
@@ -64,6 +64,7 @@ integration with current SMTP servers are the reasons.
 * Installation::
 * Configuration::
 * Call configuration: Call.
+* Integration with Postfix: Postfix.
 * Commands::
 * Niceness::
 * Spool directory: Spool.
@@ -82,6 +83,7 @@ integration with current SMTP servers are the reasons.
 @include install.texi
 @include cfg.texi
 @include call.texi
+@include postfix.texi
 @include cmds.texi
 @include niceness.texi
 @include spool.texi
diff --git a/doc/postfix.texi b/doc/postfix.texi
new file mode 100644 (file)
index 0000000..c62033b
--- /dev/null
@@ -0,0 +1,115 @@
+@node Postfix
+@unnumbered Integration with Postfix
+
+This section is taken from @url{http://www.postfix.org/nncp_README.html,
+Postfix and nncp} manual and just replaces nncp-related calls with NNCP
+ones.
+
+@strong{Setting up a Postfix Internet to NNCP gateway}
+
+Here is how to set up a machine that sits on the Internet and that forwards
+mail to a LAN that is connected via NNCP.
+
+@itemize
+
+@item You need an @ref{nncp-mail} program that extracts the sender
+address from mail that arrives via NNCP, and that feeds the mail into
+the Postfix @command{sendmail} command.
+
+@item Define a @command{pipe(8)} based mail delivery transport for
+delivery via NNCP:
+@verbatim
+/usr/local/etc/postfix/master.cf:
+nncp      unix  -       n       n       -       -       pipe
+          flags=F user=nncp argv=nncp-mail -quiet $nexthop $recipient
+@end verbatim
+
+This runs the @command{nncp-mail} command to place outgoing mail into
+the NNCP queue after replacing @var{$nexthop} by the the receiving NNCP
+node and after replacing @var{$recipient} by the recipients. The
+@command{pipe(8)} delivery agent executes the @command{nncp-mail}
+command without assistance from the shell, so there are no problems with
+shell meta characters in command-line parameters.
+
+@item Specify that mail for @emph{example.com}, should be delivered via
+NNCP, to a host named @emph{nncp-host}:
+
+@verbatim
+/usr/local/etc/postfix/transport:
+    example.com     nncp:nncp-host
+    .example.com    nncp:nncp-host
+@end verbatim
+
+See the @command{transport(5)} manual page for more details.
+
+@item Execute the command @command{postmap /etc/postfix/transport}
+whenever you change the @file{transport} file.
+
+@item Enable @file{transport} table lookups:
+
+@verbatim
+/usr/local/etc/postfix/main.cf:
+    transport_maps = hash:$config_directory/transport
+@end verbatim
+
+@item Add @emph{example.com} to the list of domains that your site is
+willing to relay mail for.
+
+@verbatim
+/usr/local/etc/postfix/main.cf:
+    relay_domains = example.com ...other relay domains...
+@end verbatim
+
+See the @option{relay_domains} configuration parameter description for
+details.
+
+@item Execute the command @command{postfix reload} to make the changes
+effective.
+
+@end itemize
+
+@strong{Setting up a Postfix LAN to NNCP gateway}
+
+Here is how to relay mail from a LAN via NNCP to the Internet.
+
+@itemize
+
+@item You need an @ref{nncp-mail} program that extracts the sender
+address from mail that arrives via NNCP, and that feeds the mail into
+the Postfix @command{sendmail} command.
+
+@item Specify that all remote mail must be sent via the @command{nncp}
+mail transport to your NNCP gateway host, say, @emph{nncp-gateway}:
+
+@verbatim
+/usr/local/etc/postfix/main.cf:
+    relayhost = nncp-gateway
+    default_transport = nncp
+@end verbatim
+
+Postfix 2.0 and later also allows the following more succinct form:
+
+@verbatim
+/usr/local/etc/postfix/main.cf:
+    default_transport = nncp:nncp-gateway
+@end verbatim
+
+@item Define a @command{pipe(8)} based message delivery transport for
+mail delivery via NNCP:
+
+@verbatim
+/usr/local/etc/postfix/master.cf:
+nncp      unix  -       n       n       -       -       pipe
+          flags=F user=nncp argv=nncp-mail -quiet $nexthop $recipient
+@end verbatim
+
+This runs the @command{nncp-mail} command to place outgoing mail into
+the NNCP queue. It substitutes the hostname (@emph{nncp-gateway}, or
+whatever you specified) and the recipients before executing the command.
+The @command{nncp-mail} command is executed without assistance from the
+shell, so there are no problems with shell meta characters.
+
+@item Execute the command @command{postfix reload} to make the changes
+effective.
+
+@end itemize
index 7492c37738855c3acb58986ea2d57af0a638d4bc..1b6189008aa00afab505b24c56925dd8a3414640 100644 (file)
@@ -28,30 +28,15 @@ yet. Also you must have secure link (SSH, VPN, etc).
 Another possibility is to use POP3/IMAP4 servers, but this is too
 overcomplicated and bloated for the simple task. Not an option. KISS!
 
-@anchor{Postfix}
-
 Just tell both of your Postfixes (on the server and notebook) to drop
 email as a mail via NNCP to specified node. This is done similarly as
-with UUCP and as written in Postfix
-@url{http://www.postfix.org/UUCP_README.html, documentation}.
-
-Search for @verb{|uucp|} related strings in @file{master.cf} and replace
-command to NNCP ones:
-
-@verbatim
-nncp unix - n n - - pipe flags=Fqhu user=nncp argv=nncp-mail -quiet $nexthop $recipient
-@end verbatim
-
-then add transport map, telling that mail for example.com domain can be
-reached through NNCP transport to node @emph{bob}:
-
-@verbatim
-example.com nncp:bob
-@end verbatim
+with UUCP and as written in
+@url{http://www.postfix.org/UUCP_README.html, Postfix documentation}.
 
-Now, all mail will be stored in NNCP @ref{Spool, spool}, that after
-exchanging and tossing will call local @command{sendmail} command to
-deliver them just that was happened on the same machine.
+Look @ref{Postfix, here} for further information. All mail will be
+stored in NNCP @ref{Spool, spool}, that after exchanging and tossing
+will call local @command{sendmail} command to deliver them just that was
+happened on the same machine.
 
 @node UsecaseUnreliable
 @section Unreliable/expensive communication link