Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fdm(1) [debian man page]

FDM(1)							    BSD General Commands Manual 						    FDM(1)

NAME
fdm -- fetch and deliver mail SYNOPSIS
fdm [-hklmnqv] [-a account] [-D name= value] [-f conffile] [-u user] [-x account] [fetch | poll] DESCRIPTION
The fdm program fetches mail from a POP3 or IMAP server or from stdin and delivers it based on a ruleset in the configuration file. The options are as follows: -a name Process only the specified account. This option may appear multiple times. The account name may include shell glob characters to match multiple accounts. -D name=value This option defines a macro for use when parsing the configuration file. The macro name must be prefixed with $ or % to specify a string or numeric macro. This option may appear multiple times. -f conffile Specify the configuration file location. Default is ~/.fdm.conf, or /etc/fdm.conf if that doesn't exist. -h Look at the HOME environment variable to ascertain the user's home directory. -k Keep all mail after delivery, regardless of whether it matches a drop action. Note that mails kept in this way will be refetched by fdm if it is run again on the same account. -l Log using syslog(3) rather than to stderr. -m Ignore the lock file and run regardless of other instances of fdm. -n Do not process any accounts, just verify the configuration file syntax and exit. -q Quiet mode. Only print errors. -u user Specify the default user for delivery. This overrides the default-user option in the configuration file. -v Request verbose logging. This option may be specified multiple times. -vv will print information on configuration (useful with -n). -vvvv duplicates all traffic to and from remote servers to stdout. This feature is disabled when using the -l flag. -x name Exclude the named account. Multiple -x options may be specified. As with -a, shell glob characters may be used. fetch | poll | cache The fetch command instructs fdm to fetch and deliver messages. The poll command polls the accounts in the configuration file and reports a message count for each. cache allows fdm cache files to be manipulated: see the next section. CACHE COMMANDS
The following cache manipulation commands are supported: cache add path string cache remove path string Add or remove string as a key in the cache at path. cache list [path] List the number of keys in the specified cache, or if path is omitted, in all caches declared in the configuration file. cache dump path Dump the contents of the cache path to stdout. Each key is printed followed by a space and the timestamp as Unix time. cache clear path Delete all keys from the cache at path. FILES
~/.fdm.conf default fdm configuration file /etc/fdm.conf default system-wide configuration file ~/.fdm.lock default lock file /var/db/fdm.lock lock file for root user SEE ALSO
mail(1), fdm.conf(5), sendmail(8) AUTHORS
Nicholas Marriott <nicm@users.sourceforge.net> BSD
December 22, 2008 BSD

Check Out this Related Man Page

pts(7D) 							      Devices								   pts(7D)

NAME
pts - STREAMS pseudo-tty slave driver DESCRIPTION
The pseudo-tty subsystem simulates a terminal connection, where the master side represents the terminal and the slave represents the user process's special device end point. In order to use the pseudo-tty subsystem, a node for the master side driver /dev/ptmx and N nodes for the slave driver (N is determined at installation time) must be installed. The names of the slave devices are /dev/pts/M where M has the values 0 through N-1. When the master device is opened, the corresponding slave device is automatically locked out. No user may open that slave device until its permissions are adjusted and the device unlocked by calling functions grantpt(3C) and unlockpt(3C). The user can then invoke the open system call with the name that is returned by the ptsname(3C) function. See the example below. Only one open is allowed on a master device. Multiple opens are allowed on the slave device. After both the master and slave have been opened, the user has two file descriptors which are end points of a full duplex connection composed of two streams automatically connected at the master and slave drivers. The user may then push modules onto either side of the stream pair. The user needs to push the ptem(7M) and ldterm(7M) modules onto the slave side of the pseudo-terminal subsystem to get terminal semantics. The master and slave drivers pass all messages to their adjacent queues. Only the M_FLUSH needs some processing. Because the read queue of one side is connected to the write queue of the other, the FLUSHR flag is changed to the FLUSHW flag and vice versa. When the master device is closed an M_HANGUP message is sent to the slave device which will render the device unusable. The process on the slave side gets the errno EIO when attempting to write on that stream but it will be able to read any data remaining on the stream head read queue. When all the data has been read, read returns 0 indicating that the stream can no longer be used. On the last close of the slave device, a 0-length message is sent to the master device. When the application on the master side issues a read() or getmsg() and 0 is returned, the user of the master device decides whether to issue a close() that dismantles the pseudo-terminal subsystem. If the master device is not closed, the pseudo-tty subsystem will be available to another user to open the slave device. Since 0-length messages are used to indicate that the process on the slave side has closed and should be interpreted that way by the process on the master side, applications on the slave side should not write 0-length messages. If that occurs, the write returns 0, and the 0-length message is discarded by the ptem mod- ule. The standard STREAMS system calls can access the pseudo-tty devices. The slave devices support the O_NDELAY and O_NONBLOCK flags. EXAMPLES
int fdm fds; char *slavename; extern char *ptsname(); fdm = open("/dev/ptmx", O_RDWR); /* open master */ grantpt(fdm); /* change permission of slave */ unlockpt(fdm); /* unlock slave */ slavename = ptsname(fdm); /* get name of slave */ fds = open(slavename, O_RDWR); /* open slave */ ioctl(fds, I_PUSH, "ptem"); /* push ptem */ ioctl(fds, I_PUSH, "ldterm"); /* push ldterm*/ FILES
/dev/ptmx master clone device /dev/pts/M slave devices (M = 0 -> N-1) SEE ALSO
grantpt(3C), ptsname(3C), unlockpt(3C), ldterm(7M), ptm(7D), ptem(7M) STREAMS Programming Guide SunOS 5.10 21 Aug 1992 pts(7D)
Man Page