.\" $Id: fdm.1,v 1.29 2007/07/31 12:31:20 nicm Exp $ .\" .\" Copyright (c) 2006 Nicholas Marriott .\" .\" 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 August 14, 2006 .Dt FDM 1 .Os .Sh NAME .Nm fdm .Nd "fetch and deliver mail" .Sh SYNOPSIS .Nm fdm .Bk -words .Op Fl klmnqv .Op Fl a Ar account .Oo Fl D Ar name Ns = .Ar value Oc .Op Fl f Ar conffile .Op Fl u Ar user .Op Fl x Ar account .Op Ar fetch | poll .Ek .Sh DESCRIPTION The .Nm program fetches mail from a POP3 or IMAP server or from .Em stdin and delivers it based on a ruleset in the configuration file. .Pp The options are as follows: .Bl -tag -width "-f conffileXXX" .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. .Pp .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 /usr/local/etc/fdm.conf if that doesn't exist. .Pp .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 .Em stderr . .Pp .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. .Pp .It Fl q Quiet mode. Only print errors. .Pp .It Fl u Ar user Specify the default user for delivery. This overrides the .Ic default-user option in the configuration file. .Pp .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 .Em stdout . This feature is disabled when using the .Fl l flag. .Pp .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. .Pp .It Ar fetch | poll The .Ar fetch command instructs .Nm to fetch and deliver messages. The .Ar poll command polls the accounts in the configuration file and reports a message count for each. .Pp .El .Sh FILES .Bl -tag -width "/var/db/fdm.lockXXX" -compact .It Pa ~/.fdm.conf default .Nm configuration file .It Pa /usr/local/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 nicm@users.sourceforge.net