1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
|
Description: Fix typos and syntax issues in manpages
Author: Ryan Kavanagh <rak@debian.org>
Origin: Debian
Forwarded: https://github.com/OpenSMTPD/OpenSMTPD-extras/pull/62
Last-Update: 2019-11-19
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: opensmtpd-extras/extras/tables/table-passwd/table-passwd.5
===================================================================
--- opensmtpd-extras.orig/extras/tables/table-passwd/table-passwd.5 2019-11-20 10:37:47.025013330 -0500
+++ opensmtpd-extras/extras/tables/table-passwd/table-passwd.5 2019-11-20 10:37:47.021013687 -0500
@@ -79,7 +79,7 @@
.Sh AUTHORS
.An -nosplit
.Nm
-was intially written by
+was initially written by
.An Gilles Chehade Aq Mt gilles@poolp.org
and further improved by
.An Joerg Jung Aq Mt jung@openbsd.org .
Index: opensmtpd-extras/extras/tables/table-redis/table-redis.5
===================================================================
--- opensmtpd-extras.orig/extras/tables/table-redis/table-redis.5 2019-11-20 10:37:47.025013330 -0500
+++ opensmtpd-extras/extras/tables/table-redis/table-redis.5 2019-11-20 10:37:47.021013687 -0500
@@ -52,96 +52,94 @@
.Dl This is the IP of the master redis server.
.Dl To connect via an unix socket use unix:/path/to/sock
.Dl The default is 127.0.0.1
-
+.\"
.Cd master_port
.Dl This is the port used to connect to the master redis server.
.Dl The default is 6379
-
+.\"
.Cd slave
.Dl This is the IP of the slave redis server, if any.
.Dl To connect via an unix socket use unix:/path/to/sock
-
+.\"
.Cd slave_port
.Dl This is the port used to connect to the slave redis server if any.
-
+.\"
.Cd database
.Dl The database number to use.
.Dl The default is 0.
-
+.\"
.Cd password
.Dl The password to use to authenticate to the redis server if any.
-
+.\"
.Cd query_domain
.Dl This is used to provide a query for a domain query call. All the '%s' are replaced
.Dl with the appropriate data, in this case it would be the right hand side of the SMTP address.
.Dl This expects one string to be returned with a matching domain name.
-
+.\"
.Cd query_userinfo
.Dl This is used to provide a query for looking up user information.
.Dl All the '%s' are replaced with the appropriate data, in this case it
.Dl would be the left hand side of the SMTP address.
.Dl This expects three fields to be returned an int containing a UID, an int containing a GID
.Dl and a string containing the home directory for the user.
-
+.\"
.Cd query_credentials
.Dl This is used to provide a query for looking up credentials. All the '%s' are replaced
.Dl with the appropriate data, in this case it would be the left hand side of the SMTP address.
.Dl the query expects that there are two strings returned one with a
.Dl user name one with a password in encrypted format.
-
+.\"
.Cd query_alias
.Dl This is used to provide a query to look up aliases. All the '%s' are replaced
.Dl with the appropriate data, in this case it would be the left hand side of the SMTP address.
.Dl This expects one string to be returned with the user name the alias resolves to.
.Dl If the query returns an array, all the data will be concatenated into one string with ',' as a separator
-
+.\"
.Cd query_mailaddr
.Dl This is used to provide a query to check if a mail address exists.
.Dl All the '%s' are replaced with the appropriate data, in this case it would be the SMTP address.
.Dl This expects an integer as a reply, 0 = false and 1 = true
-
-.Pp
+.\"
.Sh EXAMPLES
Due to the nature of redis, multiple schemas can be used. Those provided here a known to work.
.Pp
.Cd domain
.Dl # redis-cli sadd domains example.net
-
+.\"
.Dl in the redis table configuration file :
.Dl query_domain SISMEMBER domains %s
-
+.\"
.Cd userinfo
.Dl Hash works well for users
.Dl # redis-cli HSET user:foo uid 1001
.Dl # redis-cli HSET user:foo gid 1001
.Dl # redis-cli HSET user:foo maildir "/mail/foo"
-
+.\"
.Dl in the redis table configuration file :
.Dl query_userinfo HMGET user:%s uid gid maildir
-
+.\"
.Cd credentials
.Dl We can extend the hash for our user to put credential in it
.Dl # redis-cli HSET user:foo login foo
.Dl # redis-cli HSET user:foo passwd encrypted_password
-
+.\"
.Dl in the redis table configuration file :
.Dl query_credentials HMGET user:%s login passwd
-
+.\"
.Cd alias
.Dl Using redis sorted list :
.Dl # redis-cli LPUSH aliases:foo@example.net foo
.Dl # redis-cli LPUSH aliases:bar@example.net foo
-
+.\"
.Dl in the redis table configuration file :
.Dl query_alias LRANGE aliases:%s 0 -1
-
+.\"
.Cd mailaddr
.Dl # redis-cli sadd mailaddr foo@example.net
-
+.\"
.Dl in the redis table configuration file :
.Dl query_mailaddr SISMEMBER mailaddr %s
-
-
+.\"
.Sh SEE ALSO
.Xr encrypt 1 ,
.Xr smtpd.conf 5 ,
Index: opensmtpd-extras/extras/tables/table-sqlite/table-sqlite.5
===================================================================
--- opensmtpd-extras.orig/extras/tables/table-sqlite/table-sqlite.5 2019-11-20 10:37:47.025013330 -0500
+++ opensmtpd-extras/extras/tables/table-sqlite/table-sqlite.5 2019-11-20 10:40:23.023112418 -0500
@@ -51,9 +51,9 @@
utility or
.Xr smtpctl 8
encrypt command.
-
+.\"
.Sh SQLITE TABLE CONFIG FILE
-
+.\"
The following configuration options are available:
.Pp
.Bl -tag -width Ds
@@ -67,7 +67,7 @@
dbpath /etc/mail/smtp.sqlite
.Ed
.Pp
-
+.\"
.It Xo
.Ic query_alias
.Ar SQL statement
@@ -77,7 +77,7 @@
the SMTP address. This expects one VARCHAR to be returned with the user name
the alias resolves to.
.Pp
-
+.\"
.It Xo
.Ic query_credentials
.Ar SQL statement
@@ -89,7 +89,7 @@
.Xr crypt 3
format.
.Pp
-
+.\"
.It Xo
.Ic query_domain
.Ar SQL statement
@@ -99,7 +99,7 @@
right hand side of the SMTP address. This expects one VARCHAR to be returned
with a matching domain name.
.Pp
-
+.\"
.It Xo
.Ic query_mailaddrmap
.Ar SQL statement
@@ -108,28 +108,28 @@
is replaced with the appropriate data. This expects one VARCHAR to be returned
with the address the sender is allowed to send mails from.
.El
-
+.\"
A generic SQL statement would be something like:
.Bd -literal -offset indent
query_ SELECT value FROM table WHERE key=?;
.Ed
-
+.\"
.Sh EXAMPLES
Example based on the OpenSMTPD FAQ: Building a Mail Server
The filtering part is excluded in this example.
-
+.\"
The configuration below is for a medium-size mail server which handles
multiple domains with multiple virtual users and is based on several
assumptions. One is that a single system user named vmail is used for all
virtual users. This user needs to be created:
-
+.\"
.Bd -literal
# useradd -g =uid -c "Virtual Mail" -d /var/vmail -s /sbin/nologin vmail
# mkdir /var/vmail
# chown vmail:vmail /var/vmail
.Ed
-
-.Ic Pa sqlite schema
+.\"
+.Ic sqlite schema
.Bd -literal -compact
CREATE TABLE virtuals (
id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -148,7 +148,7 @@
INSERT INTO domains VALUES (1, "example.com");
INSERT INTO domains VALUES (2, "example.net");
INSERT INTO domains VALUES (3, "example.org");
-
+.\"
INSERT INTO virtuals VALUES (1, "abuse@example.com", "bob@example.com");
INSERT INTO virtuals VALUES (2, "postmaster@example.com", "bob@example.com");
INSERT INTO virtuals VALUES (3, "webmaster@example.com", "bob@example.com");
@@ -157,20 +157,20 @@
INSERT INTO virtuals VALUES (6, "postmaster@example.net", "alice@example.net");
INSERT INTO virtuals VALUES (7, "webmaster@example.net", "alice@example.net");
INSERT INTO virtuals VALUES (8, "alice@example.net", "vmail");
-
+.\"
INSERT INTO credentials VALUES (1, "bob@example.com", "$2b$08$ANGFKBL.BnDLL0bUl7I6aumTCLRJSQluSQLuueWRG.xceworWrUIu");
INSERT INTO credentials VALUES (2, "alice@example.net", "$2b$08$AkHdB37kaj2NEoTcISHSYOCEBA5vyW1RcD8H1HG.XX0P/G1KIYwii");
.Ed
-
-.Ic Pa /etc/mail/sqlite.conf
+.\"
+.Pa /etc/mail/sqlite.conf
.Bd -literal -compact
dbpath /etc/mail/smtp.sqlite
query_alias SELECT destination FROM virtuals WHERE email=?;
query_credentials SELECT email, password FROM credentials WHERE email=?;
query_domain SELECT domain FROM domains WHERE domain=?;
.Ed
-
-.Ic Pa /etc/mail/smtpd.conf
+.\"
+.Pa /etc/mail/smtpd.conf
.Bd -literal -compact
table domains sqlite:/etc/mail/sqlite.conf
table virtuals sqlite:/etc/mail/sqlite.conf
@@ -179,7 +179,7 @@
listen on egress port 587 tls-require pki mail.example.com auth <credentials>
accept from any for domain <domains> virtual <virtuals> deliver to mbox
.Ed
-
+.\"
.Sh FILES
.Bl -tag -width "/etc/mail/sqlite.conf" -compact
.It Pa /etc/mail/sqlite.conf
@@ -191,7 +191,7 @@
.Xr sqlite3 1
database file.
.El
-
+.\"
.Sh TODO
Documenting the following query options:
.Bd -literal -offset indent -compact
@@ -201,7 +201,7 @@
.Ic query_mailaddr
.Ic query_addrname
.Ed
-
+.\"
.Sh SEE ALSO
.Xr smtpd.conf 5 ,
.Xr smtpctl 8 ,
|