forked from nicm/fdm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fdm.1
166 lines (166 loc) · 4.11 KB
/
fdm.1
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
.\" $Id$
.\"
.\" Copyright (c) 2006 Nicholas Marriott <[email protected]>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd December 22, 2008
.Dt FDM 1
.Os
.Sh NAME
.Nm fdm
.Nd "fetch and deliver mail"
.Sh SYNOPSIS
.Nm fdm
.Bk -words
.Op Fl hklmnqv
.Op Fl a Ar account
.Op Fl D Ar name Ns = Ns Ar value
.Op Fl f Ar conffile
.Op Fl u Ar user
.Op Fl x Ar account
.Op Cm fetch | poll | cache
.Ek
.Sh DESCRIPTION
The
.Nm
program fetches mail from a POP3 or IMAP server or from
.Dv stdin
and delivers it based on a ruleset in the configuration file.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl a Ar name
Process only the specified account.
This option may appear multiple times.
The account name may include shell glob characters to match multiple accounts.
.It Fl D Ar name Ns = Ns Ar value
This option defines a macro for use when parsing the configuration file.
The macro name must be prefixed with
.Li $
or
.Li %
to specify a string or numeric macro.
This option may appear multiple times.
.It Fl f Ar conffile
Specify the configuration file location.
Default is
.Pa ~/.fdm.conf ,
or
.Pa /etc/fdm.conf
if that doesn't exist.
.It Fl h
Look at the
.Ev HOME
environment variable to ascertain the user's home directory.
.It Fl k
Keep all mail after delivery, regardless of whether it matches a
.Ic drop
action.
Note that mails kept in this way will be refetched by
.Nm
if it is run again on the same account.
.It Fl l
Log using
.Xr syslog 3
rather than to
.Dv stderr .
.It Fl m
Ignore the lock file and run regardless of other instances of
.Nm .
.It Fl n
Do not process any accounts, just verify the configuration file syntax and exit.
.It Fl q
Quiet mode. Only print errors.
.It Fl u Ar user
Specify the default user for delivery.
This overrides the
.Ic default-user
option in the configuration file.
.It Fl v
Request verbose logging.
This option may be specified multiple times.
.Fl vv
will print information on configuration (useful with
.Fl n ) .
.Fl vvvv
duplicates all traffic to and from remote servers to
.Dv stdout .
This feature is disabled when using the
.Fl l
flag.
.It Fl x Ar name
Exclude the named account.
Multiple
.Fl x
options may be specified.
As with
.Fl a ,
shell glob characters may be used.
.It Cm fetch | poll | cache
The
.Cm fetch
command instructs
.Nm
to fetch and deliver messages.
The
.Cm poll
command polls the accounts in the configuration file and reports a message
count for each.
.Cm cache
allows
.Nm
cache files to be manipulated: see the next section.
.El
.Sh CACHE COMMANDS
The following cache manipulation commands are supported:
.Bl -tag -width Ds
.It Ic cache Ic add Ar path Ar string
.It Ic cache Ic remove Ar path Ar string
Add or remove
.Ar string
as a key in the cache at
.Ar path .
.It Ic cache Ic list Op Ar path
List the number of keys in the specified cache, or if
.Ar path
is omitted, in all caches declared in the configuration file.
.It Ic cache Ic dump Ar path
Dump the contents of the cache
.Ar path
to
.Dv stdout .
Each key is printed followed by a space and the timestamp as Unix time.
.It Ic cache Ic clear Ar path
Delete all keys from the cache at
.Ar path .
.El
.Sh FILES
.Bl -tag -width Ds -compact
.It Pa ~/.fdm.conf
default
.Nm
configuration file
.It Pa /etc/fdm.conf
default system-wide configuration file
.It Pa ~/.fdm.lock
default lock file
.It Pa /var/db/fdm.lock
lock file for root user
.El
.Sh SEE ALSO
.Xr mail 1 ,
.Xr fdm.conf 5 ,
.Xr sendmail 8
.Sh AUTHORS
.An Nicholas Marriott Aq Mt [email protected]