Codebase list fdm / master fdm.1
master

Tree @master (Download .tar.gz)

fdm.1 @masterraw · history · blame

.\" $Id$
.\"
.\" Copyright (c) 2006 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
.\" 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 nicholas.marriott@gmail.com