summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/makemap.8
blob: a8bf6f207bdf8aec23250af6dd3d36790b94f40c (plain)
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
.\"	$OpenBSD: makemap.8,v 1.4 2009/02/14 18:37:12 jacekm Exp $
.\" Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
.\"	All rights reserved.
.\" Copyright (c) 1988, 1991, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" By using this file, you agree to the terms and conditions set
.\" forth in the LICENSE file which can be found at the top level of
.\" the sendmail distribution.
.\"
.\"
.\"     $Sendmail: makemap.8,v 8.30 2002/06/27 23:41:04 gshapiro Exp $
.\"
.Dd $Mdocdate: February 14 2009 $
.Dt MAKEMAP 8
.Os
.Sh NAME
.Nm makemap ,
.Nm newaliases
.Nd create database maps for smtpd
.Sh SYNOPSIS
.Nm makemap
.Op Fl t Ar type
.Op Fl o Ar dbfile
.Ar file
.Nm newaliases
.Sh DESCRIPTION
.Nm
creates the database maps used by the keyed map lookups in
.Xr smtpd 8 .
It reads input from
.Ar file
and outputs them to
.Ar dbfile .
If
.Ar dbfile
is not specified, output file name is made by appending .db
to
.Ar file .
.Pp
In all cases,
.Nm
reads lines from 
.Ar file
consisting of words separated by whitespace.
The first is the database key,
the remaining specify mapped value.
Database key and value may optionally be separated
using colon character.
.Pp
The 
.Ar type
argument specifies format of resulting map file.
Default map format is suitable for storing simple, unstructured
key-to-value string associations.
However, if mapped value has special meaning,
as in case of virtual domains definition file,
suitable
.Ar type
argument must be provided.
Available output types are:
.Bl -tag -width "aliases"
.It Cm aliases
Mapped value is comma-separated list of mail destinations.
This format can be used for building user aliases and
virtual domains database files.
.El
.Pp
.Ex -std makemap
.Pp
.Nm newaliases 
rebuilds the random access database for the mail aliases file
.Pa /etc/mail/aliases .
It must be run each time this file is changed
in order for the change to take effect.
.Pp
.Ex -std newaliases
.Sh FILES
.Bl -tag -width "/etc/mail/aliasesXXX" -compact
.It Pa /etc/mail/aliases
List of user mail aliases.
.It Pa /etc/mail/virtual
List of hosted virtual domains.
.El
.Sh SEE ALSO
.Xr editmap 8 ,
.Xr smtpd 8 ,
.Xr aliases 5 ,
.Xr mailer.conf 5
.Sh HISTORY
These
.Nm
and
.Nm newaliases
commands first appeared in
.Ox 4.5
as the replacement for equivalent commands shipped with sendmail.