diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-05-22 13:38:32 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-05-22 13:38:32 +0000 |
commit | 87900470d5edab64ef70cdf782b90594f8116d23 (patch) | |
tree | c24dc1a879f26ce5145383dd419ad412625a9b32 | |
parent | fdf03e050c8a52acd40a0bffd466f77c1452ef44 (diff) |
fix examples so they stay do not use external utilities and do not refer
to external domains
prompted by deraadt@
-rw-r--r-- | usr.sbin/smtpd/smtpd.conf.5 | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/usr.sbin/smtpd/smtpd.conf.5 b/usr.sbin/smtpd/smtpd.conf.5 index 5f5c47f0603..e85d9b0cdef 100644 --- a/usr.sbin/smtpd/smtpd.conf.5 +++ b/usr.sbin/smtpd/smtpd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: smtpd.conf.5,v 1.38 2011/03/15 19:24:55 gilles Exp $ +.\" $OpenBSD: smtpd.conf.5,v 1.39 2011/05/22 13:38:31 gilles Exp $ .\" .\" Copyright (c) 2008 Janne Johansson <jj@openbsd.org> .\" Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net> @@ -16,7 +16,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" -.Dd $Mdocdate: March 15 2011 $ +.Dd $Mdocdate: May 22 2011 $ .Dt SMTPD.CONF 5 .Os .Sh NAME @@ -341,13 +341,13 @@ as well as permitting email to remote servers. Some more complex configurations are given below. .Pp This first example is the same as the default configuration, -but all outgoing mail is forwarded to a gmail SMTP server. +but all outgoing mail is forwarded to a remote SMTP server. A secrets file is needed to specify a username and password: .Bd -literal -offset indent # touch /etc/mail/secrets # chmod 640 /etc/mail/secrets # chown root:_smtpd /etc/mail/secrets -# echo "smtp.gmail.com username:password" \*(Gt /etc/mail/secrets +# echo "smtp.example.com username:password" \*(Gt /etc/mail/secrets # makemap /etc/mail/secrets .Ed .Pp @@ -358,21 +358,21 @@ listen on lo0 map aliases { source db "/etc/mail/aliases.db" } map secrets { source db "/etc/mail/secrets.db" } accept for local deliver to mbox -accept for all relay via smtp.gmail.com tls auth "secrets" +accept for all relay via smtp.example.com tls auth "secrets" .Ed .Pp In this second example, the aim is to permit mail relaying for any user that can authenticate using their normal login credentials. An RSA certificate must be provided to prove the server's identity. -The mail server has an external interface pppoe0. -Mail with a local destination should be sent to procmail. +The mail server has an external interface bnx0. +Mail with a local destination should be sent to an external mda. First, the RSA certificate is created: .Bd -literal -offset indent -# openssl genrsa -out /etc/mail/certs/pppoe0.key 4096 -# openssl req -new -x509 -key /etc/mail/certs/pppoe0.key \e - -out /etc/mail/certs/pppoe0.crt -days 365 -# chmod 600 /etc/mail/certs/pppoe0.* +# openssl genrsa -out /etc/mail/certs/mail.example.com.key 4096 +# openssl req -new -x509 -key /etc/mail/certs/mail.example.com.key \e + -out /etc/mail/certs/mail.example.com.crt -days 365 +# chmod 600 /etc/mail/certs/mail.example.com.* .Ed .Pp In the example above, @@ -380,10 +380,10 @@ a certificate valid for one year was created. The configuration file would look like this: .Bd -literal -offset indent listen on lo0 -listen on pppoe0 tls enable auth +listen on bnx0 tls certificate "mail.example.com.crt" enable auth map aliases { source db "/etc/mail/aliases.db" } -accept for local deliver to mda "procmail -f -" -accept from all for domain example.org deliver to mda "procmail -f -" +accept for local deliver to mda "/path/to/mda -f -" +accept from all for domain example.org deliver to mda "/path/to/mda -f -" accept for all relay .Ed .Sh SEE ALSO |