diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2009-09-22 13:05:21 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2009-09-22 13:05:21 +0000 |
commit | 84dc0e747c7bfbb1e28b4eaf7eff0862611eb64d (patch) | |
tree | 2095ffa9340103137f23444819be771905a3992e /usr.sbin | |
parent | 1f7e7007af7bfef7a9dc88c2a09832a90603076f (diff) |
- move the map stuff to makemap.8
- use a single list for smtpd.conf keywords
ok jacekm gilles
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/makemap.8 | 79 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.conf.5 | 120 |
2 files changed, 104 insertions, 95 deletions
diff --git a/usr.sbin/smtpd/makemap.8 b/usr.sbin/smtpd/makemap.8 index 98cde0b84f1..db81fec3834 100644 --- a/usr.sbin/smtpd/makemap.8 +++ b/usr.sbin/smtpd/makemap.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: makemap.8,v 1.7 2009/03/23 21:48:40 jmc Exp $ +.\" $OpenBSD: makemap.8,v 1.8 2009/09/22 13:05:20 jmc Exp $ .\" .\" Copyright (c) 2009 Jacek Masiulaniec <jacekm@openbsd.org> .\" Copyright (c) 2008-2009 Gilles Chechade <gilles@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 23 2009 $ +.Dd $Mdocdate: September 22 2009 $ .Dt MAKEMAP 8 .Os .Sh NAME @@ -27,16 +27,20 @@ .Op Fl t Ar type .Ar file .Sh DESCRIPTION +Maps provide a generic interface for associating textual key to a value. +Such associations may be accessed through a plaintext file, database, or DNS. +The format of these file types is described below. .Nm -creates the database maps used by keyed map lookups in -.Xr smtpd 8 . -It reads input from +itself creates the database maps used by keyed map lookups specified in +.Xr smtpd.conf 5 . +.Pp +.Nm +reads input from .Ar file and writes data to a file whose name is made by adding a .Dq .db suffix to .Ar file . -.Pp In all cases, .Nm reads lines consisting of words separated by whitespace. @@ -69,6 +73,67 @@ virtual domains files. .Pp .El .Ex -std makemap +.Sh MAP TYPES +There are three types of map known to +.Xr smtpd 8 : +.Bl -tag -width Ds +.It alias +Map queried when resolving mail aliases. +Query key is the user part of mail address. +.It virtual +Map used for creating virtual domains. +See the +.Sx VIRTUAL DOMAINS +section below. +.It secrets +Map queried for credentials +when relaying mail via server that requires SMTPAUTH +before accepting mail for relaying. +Query key is the domain name of the server acting as relay. +.El +.Pp +The configuration directives that are valid in the +.Ic map +context are described below: +.Bl -tag -width Ds +.It Ic type Ar maptype +Specifies method of accessing data. +The following map types are supported: +.Bl -tag -width Ds +.It db +Mappings are stored in a file created using +.Nm . +This is the default type if none is specified. +.It dns +Not implemented yet. +.It file +Not implemented yet. +.El +.It Ic source Ar mapsource +Specifies the source of mapping data. +It must be absolute path to a file in case of +.Dq file +and +.Dq db +.Ar maptype , +and a domain name in case of +.Dq dns . +.El +.Sh VIRTUAL DOMAINS +Virtual domains are kept in the virtual map. +To create single virtual address, add +.Dq user@example.com +to the virtual map. +To handle all mail destined to any user at example.com, add +.Dq @example.com +to the virtual map. +.Pp +In addition to adding an entry to the virtual map, +one must add a filter rule that accepts mail for the virtual domain, +for example: +.Bd -literal -offset indent +accept for domain "example.com" deliver to mbox +.Ed .Sh FILES .Bl -tag -width "/etc/mail/aliasesXXX" -compact .It Pa /etc/mail/aliases @@ -80,7 +145,7 @@ List of remote host credentials. .El .Sh SEE ALSO .Xr aliases 5 , -.Xr mailer.conf 5 , +.Xr smtpd.conf 5 , .Xr editmap 8 , .Xr newaliases 8 , .Xr smtpd 8 diff --git a/usr.sbin/smtpd/smtpd.conf.5 b/usr.sbin/smtpd/smtpd.conf.5 index 8cf46f5d65a..b6e5cd10310 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.17 2009/09/21 10:02:50 jmc Exp $ +.\" $OpenBSD: smtpd.conf.5,v 1.18 2009/09/22 13:05:20 jmc 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: September 21 2009 $ +.Dd $Mdocdate: September 22 2009 $ .Dt SMTPD.CONF 5 .Os .Sh NAME @@ -69,9 +69,10 @@ keyword, for example: .Bd -literal -offset indent include "/etc/mail/smtpd.conf.local" .Ed -.Sh GLOBAL CONFIGURATION -The following settings apply globally to -.Xr smtpd 8 : +.Pp +The syntax of +.Nm +is described below. .Bl -tag -width Ds .It Ic hostname Ar name Specify the domain name of the server. @@ -115,61 +116,21 @@ parameter is used, any remote sender that passed SMTPAUTH is treated as if it was the server's local user that was sending the mail. This means that filter rules using "from local" will be matched. -.El -.Sh MAPS -Maps provide generic interface for associating textual key to a value. -Such associations may be accessed through a flat file, database, or DNS. -There are three maps known to smtpd: -.Bl -tag -width Ds -.It alias -Map queried when resolving mail aliases. -Query key is the user part of mail address. -.It virtual -Map used for creating virtual domains. -See the -.Sx VIRTUAL DOMAINS -section below. -.It secrets -Map queried for credentials -when relaying mail via server that requires SMTPAUTH -before accepting mail for relaying. -Query key is the domain name of the server acting as relay. -.El -.Pp -The configuration directives that are valid in the -.Ic map -context are described below: -.Bl -tag -width Ds -.It Ic type Ar maptype -Specifies method of accessing data. -The following map types are supported: -.Bl -tag -width Ds -.It db -Mappings are stored in a file created using +.It Xo +.Ic map Ar map +.No { +.Op Ic type Ar maptype +.Ic source Ar mapsource +.No } +.Xc +Maps are used to provide additional configuration information for +.Xr smtpd 8 , +and are described fully in .Xr makemap 8 . -This is the default type if none is specified. -.It dns -Not implemented yet. -.It file -Not implemented yet. -.El -.It Ic source Ar mapsource -Specifies the source of mapping data. -It must be absolute path to a file in case of -.Dq file -and -.Dq db -.Ar maptype , -and a domain name in case of -.Dq dns . -.El -.Sh FILTER RULES +.It Ic accept | reject .Xr smtpd 8 -has the ability to -.Ar accept -and -.Ar reject -messages based on information gathered during SMTP session. +accepts and rejects messages +based on information gathered during the SMTP session. .Pp For each message processed by the daemon, the filter rules are evaluated in sequential order, @@ -178,11 +139,8 @@ The first matching rule decides what action is taken. If no rule matches the message, the default action is to reject the message. .Pp -Following the -.Ic accept -/ -.Ic reject -decision comes client's IP address filter: +Following the accept/reject +decision comes the client's IP address filter: .Bl -tag -width Ds .It Ic from Ar network The rule will match if connection is made from the specified @@ -277,21 +235,16 @@ is desired, use the .Ic enable auth parameter. .El -.Sh VIRTUAL DOMAINS -Virtual domains are kept in the virtual map. -To create single virtual address, add -.Dq user@example.com -to the virtual map. -To handle all mail destined to any user at example.com, add -.Dq @example.com -to the virtual map. -.Pp -In addition to adding an entry to the virtual map, -one must add a filter rule that accepts mail for the virtual domain, -for example: -.Bd -literal -offset indent -accept for domain "example.com" deliver to mbox -.Ed +.El +.Sh FILES +.Bl -tag -width "/etc/mail/smtpd.confXXX" -compact +.It Pa /etc/mail/smtpd.conf +Default +.Xr smtpd 8 +configuration file. +.It Pa /var/spool/smtpd/ +Spool directories for mail during processing. +.El .Sh EXAMPLES The default .Nm @@ -348,18 +301,9 @@ accept for local deliver to mda "procmail -f -" accept from all for domain example.org deliver to mda "procmail -f -" accept for all relay .Ed -.Sh FILES -.Bl -tag -width "/etc/mail/smtpd.confXXX" -compact -.It Pa /etc/mail/smtpd.conf -Default -.Xr smtpd 8 -configuration file. -.It Pa /var/spool/smtpd/ -Spool directories for mail during processing. -.El .Sh SEE ALSO .Xr mailer.conf 5 , -.Xr smtpctl 8 , +.Xr makemap 8 , .Xr smtpd 8 .Sh HISTORY .Xr smtpd 8 |