mdevctl

package: mdevctl

title: mdevctl(8)

summary: Mediated device management utility

text:
# mdevctl(8)

## NAME
mdevctl, lsmdev - Mediated device management utility

## SYNOPSIS
mdevctl {COMMAND} [OPTIONS...]

## DESCRIPTION
mdevctl is a utility for managing and persisting devices in the mediated device device framework of the Linux kernel. Mediated devices are sub-devices of a parent device (ex. a vGPU) which can be dynamically created and potentially used by drivers like vfio-mdev for assignment to virtual machines.

## OPTIONS
The following options are understood:

--addattr=ATTRIBUTE

Add an attribute ATTRIBUTE. Valid for the modify command.

-a|--auto

Automatically start the device on parent availability. Valid for define and modify commands.

-d|--defined

List all defined devices, even if not active. Valid for the list command.

--delattr

Delete an attribute entry. Valid for the modify command.

--dumpjson

Dump the configuration for a device in JSON format when filtered to as single device and used with the list command. When used with the types command, output machine readable type information.

-i|--index=INDEX

Act on the attribute INDEX. Valid for the modify command.

--jsonfile=FILE

Read the configuration for a device from a JSON file FILE. Valid for the define and start commands.

-m|--manual

Do not start a device automatically on parent availability. Valid for the modify command.

-p|--parent=PARENT

Specify or identify the device by its parent device.

-t|--type=TYPE

Specify or identify the device by its type.

-u|--uuid=UUID

Specify or identify the device by its UUID.

--value=VALUE

Set an attribute to VALUE, in the format accepted by the attribute. Valid for the modify command.

-v|--verbose

Increase output verbosity, currently only adds attribute output to the list command.

## COMMANDS
The following commands are understood:

define DEVICESPEC

Define a config for an mdev device, identified either by an UUID (if the device already exists), or by the parent device and either the type or a JSON configuration file, and, optionally, the UUID. If no UUID is specified, one is autogenerated and printed. If no file is used, -a|--auto may be used to specify that the device should be started automatically.

list

List mdev devices. With no options, currently running devices are listed. With -d|--defined, previously defined devices are listed. Can be restricted to list only devices for a given parent or UUID. With --dumpjson output is provided in machine readable JSON format. When a UUID is provided and the output results in a single device, the JSON output format is compatible with the configuration file format.

modify DEVICESPEC

Modify the configuration for an mdev device, identified via its UUID and optionally its parent. Type and startup mode (auto or manual) can be modified by this command. Attributes can be added or deleted. Attributes to be deleted must be specified by their index; if an attribute is specified without an index, it is appended at the end of the attribute list. Running devices are unaffected by this command; changes in the configuration are applied the next time the device is started.

start DEVICESPEC

Start an mdev device, identified by its UUID and optionally its parent, or its parent and type and optionally its UUID, which is generated if not given. If specified via its parent and optionally its UUID, the type may be specified in a JSON configuration file, alongside additional parameters.

stop DEVICESPEC

Stop an mdev device, specified via its UUID.

types

List the mdev device types known to the system by parent device. Output may be limited to a single parent device with the -p|--parent option. JSON output format is used with the --dumpjson option.

undefine DEVICESPEC

Undefine, or remove the configuration for an mdev device, specified by its UUID and optionally its parent. If a UUID exists for multiple parents, all of them will be removed unless restricted to a single parent. Running devices are unaffected by this command.

version

Print mdevctl version.

## NOTE ON DEVICE SPECIFICATION
For a given UUID, only one device with that UUID may be running at the same time. However, it is possible to define multiple devices with the same UUID under different parent devices. Therefore, it is sometimes necessary to specify the parent device alongside the UUID to uniquely identify a device.

## EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise.

## EXAMPLES

```
List running mdev devices:
# mdevctl list
85006552-1b4b-45ef-ad62-de05be9171df 0000:00:02.0 i915-GVTg_V4_4
83c32df7-d52e-4ec1-9668-1f3c7e4df107 0000:00:02.0 i915-GVTg_V4_8 (defined)
```

List defined mdev devices:

```
# mdevctl list -d
83c32df7-d52e-4ec1-9668-1f3c7e4df107 0000:00:02.0 i915-GVTg_V4_8 auto
b0a3989f-8138-4d49-b63a-59db28ec8b48 0000:00:02.0 i915-GVTg_V4_8 auto
5cf14a12-a437-4c82-a13f-70e945782d7b 0000:00:02.0 i915-GVTg_V4_4 manual
```

List mdev types supported on the host system:

```
# mdevctl types
0000:00:02.0

  i915-GVTg_V4_2

    Available instances: 1

    Device API: vfio-pci

    Description: low_gm_size: 256MB high_gm_size: 1024MB fence: 4 resolution: 1920x1200 weight: 8

  i915-GVTg_V4_1

    Available instances: 0

    Device API: vfio-pci

    Description: low_gm_size: 512MB high_gm_size: 2048MB fence: 4 resolution: 1920x1200 weight: 16

  i915-GVTg_V4_8

    Available instances: 4

    Device API: vfio-pci

    Description: low_gm_size: 64MB high_gm_size: 384MB fence: 4 resolution: 1024x768 weight: 2

  i915-GVTg_V4_4

    Available instances: 3

    Device API: vfio-pci

    Description: low_gm_size: 128MB high_gm_size: 512MB fence: 4 resolution: 1920x1200 weight: 4
```

Modify a defined device from automatic start to manual:

```
# mdevctl modify --uuid 83c32df7-d52e-4ec1-9668-1f3c7e4df107 --manual
# mdevctl list -d
83c32df7-d52e-4ec1-9668-1f3c7e4df107 0000:00:02.0 i915-GVTg_V4_8 manual
b0a3989f-8138-4d49-b63a-59db28ec8b48 0000:00:02.0 i915-GVTg_V4_8 auto
5cf14a12-a437-4c82-a13f-70e945782d7b 0000:00:02.0 i915-GVTg_V4_4 manual
```

Stop a running mdev device:

```
# mdevctl stop -u 83c32df7-d52e-4ec1-9668-1f3c7e4df107
```

Start an mdev device that is not defined:

```
# uuidgen
6eba5b41-176e-40db-b93e-7f18e04e0b93
# mdevctl start -u 6eba5b41-176e-40db-b93e-7f18e04e0b93 -p 0000:00:02.0 --type i915-GVTg_V4_1
# mdevctl list
85006552-1b4b-45ef-ad62-de05be9171df 0000:00:02.0 i915-GVTg_V4_4
6eba5b41-176e-40db-b93e-7f18e04e0b93 0000:00:02.0 i915-GVTg_V4_1
```

Promote the new created mdev to a defined device:

```
# mdevctl define --uuid 6eba5b41-176e-40db-b93e-7f18e04e0b93
# mdevctl list -d
83c32df7-d52e-4ec1-9668-1f3c7e4df107 0000:00:02.0 i915-GVTg_V4_8 manual
6eba5b41-176e-40db-b93e-7f18e04e0b93 0000:00:02.0 i915-GVTg_V4_1 manual
b0a3989f-8138-4d49-b63a-59db28ec8b48 0000:00:02.0 i915-GVTg_V4_8 auto
5cf14a12-a437-4c82-a13f-70e945782d7b 0000:00:02.0 i915-GVTg_V4_4 manual
```

### ADVANCED EXAMPLES (ATTRIBUTES AND JSON)

```
# mdevctl list -d
783e6dbb-ea0e-411f-94e2-717eaad438bf matrix vfio_ap-passthrough manual
```

Add some attributes:

```
# mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --addattr=assign_adapter --value=5
# mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --addattr=assign_adapter --value=6
# mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --addattr=assign_domain --value=0xab
# mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --addattr=assign_control_domain --value=0xab
# mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --addattr=assign_domain --value=4
# mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --addattr=assign_control_domain --value=4
# mdevctl list -dv
783e6dbb-ea0e-411f-94e2-717eaad438bf matrix vfio_ap-passthrough manual

  Attrs:

    @{0}: {"assign_adapter":"5"}

    @{1}: {"assign_adapter":"6"}

    @{2}: {"assign_domain":"0xab"}

    @{3}: {"assign_control_domain":"0xab"}

    @{4}: {"assign_domain":"4"}

    @{5}: {"assign_control_domain":"4"}
```

Dump the JSON configuration:

```
# mdevctl list -d -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --dumpjson
{

  "mdev_type": "vfio_ap-passthrough",

  "start": "manual",

  "attrs": [

    {

      "assign_adapter": "5"

    },

    {

      "assign_adapter": "6"

    },

    {

      "assign_domain": "0xab"

    },

    {

      "assign_control_domain": "0xab"

    },

    {

      "assign_domain": "4"

    },

    {

      "assign_control_domain": "4"

    }

  ]
}
```

Remove some attributes:

```
# mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --delattr --index=5
# mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --delattr --index=4
# mdevctl list -dv
783e6dbb-ea0e-411f-94e2-717eaad438bf matrix vfio_ap-passthrough manual

  Attrs:

    @{0}: {"assign_adapter":"5"}

    @{1}: {"assign_adapter":"6"}

    @{2}: {"assign_domain":"0xab"}

    @{3}: {"assign_control_domain":"0xab"}
```

Define an mdev device from a file:

```
# cat vfio_ap_device.json
{

  "mdev_type": "vfio_ap-passthrough",

  "start": "manual",

  "attrs": [

    {

      "assign_adapter": "5"

    },

    {

      "assign_domain": "0x47"

    },

    {

      "assign_domain": "0xff"

    }

  ]
}
# mdevctl define -p matrix --jsonfile vfio_ap_device.json
e2e73122-cc39-40ee-89eb-b0a47d334cae
# mdevctl list -dv
783e6dbb-ea0e-411f-94e2-717eaad438bf matrix vfio_ap-passthrough manual

  Attrs:

    @{0}: {"assign_adapter":"5"}

    @{1}: {"assign_adapter":"6"}

    @{2}: {"assign_domain":"0xab"}

    @{3}: {"assign_control_domain":"0xab"}
e2e73122-cc39-40ee-89eb-b0a47d334cae matrix vfio_ap-passthrough manual

  Attrs:

    @{0}: {"assign_adapter":"5"}

    @{1}: {"assign_domain":"0x47"}

    @{2}: {"assign_domain":"0xff"}
```

## FILES
/etc/mdevctl.d/*

Configuration files are in one subdirectory per parent device and named by UUID.

## CONFIGURATION FILE FORMAT
Configuration files are in JSON. Attributes in "attrs" are optional.

```
{

  "mdev_type": "TYPE",

  "start": "auto|manual",

  "attrs": [

    {

      "attribute0": "VALUE"

    },

    {

      "attribute1": "VALUE"

    }

  ]
}
```

## SEE ALSO
udev(7) udevadm(8) driverctl(8)


mdmpd

package: mdmpd

title: mdmpd(8)

summary: daemon to monitor MD multipath devices

text:
# mdmpd(8)

## NAME
mdmpd - daemon to monitor MD multipath devices

## SYNOPSIS
mdmpd

## DESCRIPTION
Enterprise storage requirements often include the desire to have more than one way to talk to a single disk drive so that in the event of some failure to talk to a disk drive via one controller, the system can automatically switch to another controller and keep going. This is called multipath disk access. The linux kernel implements multipath disk access via the software RAID stack known as the md (Multiple Devices) driver. The kernel portion of the md multipath driver only handles routing I/O requests to the proper device and handling failures on the active path. It does not try and find out if a path that has previously failed might be working again. That's what this daemon does. Upon startup, the daemon will fork and place itself in the background. Then it reads the current state of the md raid arrays, saves that state, and then waits for the kernel to tell it something interesting has happened. It then wakes up, checks to see if any paths on a multipath device have failed, and if they have then it starts to poll the failed path once every 15 seconds until it starts working again. Once it starts working again, the daemon will then add the path back into the multipath md device it was originally part of as a new spare path.

## OPTIONS
None. This is a very simple program that only does one thing.

## FILES

### /proc/mdstat
If you're using the /proc filesystem, /proc/mdstat lists all active md devices with information about them. mdmpd requires this to find arrays to monitor paths on and to get notification of interesting events.


memtester

package: memtester

title: memtester(8)

text:
# memtester(8)

## NAME
memtester - stress test to find memory subsystem faults.

## SYNOPSIS
memtester [-p PHYSADDR [-d DEVICE]] <MEMORY> [ITERATIONS]

## DESCRIPTION
memtester is an effective userspace tester for stress-testing the memory subsystem. It is very effective at finding intermittent and non-deterministic faults. Note that problems in other hardware areas (overheating CPU, out-of-specification power supply, etc.) can cause intermittent memory faults, so it is still up to you to determine where the fault lies through normal hardware diagnostic procedures; memtester just helps you determine whether a problem exists.

memtester will malloc(3) the amount of memory specified, if possible. If this fails, it will decrease the amount of memory requested until it succeeds. It will then attempt to mlock(3) this memory; if it cannot do so, testing will be slower and much less effective. Run memtester as root so that it can mlock the memory it tests.

Note that the maximum amount of memory that memtester can test will be less than the total amount of memory installed in the system; the operating system, libraries, and other system limits take some of the available memory. memtester is also limited to the amount of memory available to a single process; for example, on 32-bit machines with more than 4GB of memory, memtester is still limited to less than 4GB.

Note that it is up to you to know how much memory you can safely allocate for testing. If you attempt to allocate more memory than is available, memtester should figure that out, reduce the amount slightly, and try again. However, this can lead to memtester successfully allocating and mlocking essentially all free memory on the system -- if other programs are running, this can lead to excessive swapping and slowing the system down to the point that it is difficult to use. If the system allows allocation of more memory than is actually available (overcommit), it may lead to a deadlock, where the system halts. If the system has an out-of-memory process killer (like Linux), memtester or another process may be killed by the OOM killer.

So choose wisely.

## OPTIONS
-p PHYSADDR

tells memtester to test a specific region of memory starting at physical address PHYSADDR (given in hex), by mmap(2)ing a device specified by the -d option (below, or /dev/mem by default). This is mostly of use to hardware developers, for testing memory-mapped I/O devices and similar. Note that the memory region will be overwritten during testing, so it is not safe to specify memory which is allocated for the system or for other applications; doing so will cause them to crash. If you absolutely must test a particular region of actual physical memory, arrange to have that memory allocated by your test software, and hold it in this allocated state, then run memtester on it with this option.

MEMORY

the amount of memory to allocate and test, in megabytes by default. You can include a suffix of B, K, M, or G to indicate bytes, kilobytes, megabytes, or gigabytes respectively.

ITERATIONS

(optional) number of loops to iterate through. Default is infinite.

## ENVIRONMENT
If the environment variable MEMTESTER_TEST_MASK is set, memtester treats the value as a bitmask of which tests (other than the stuck address test) to run. The value can be specified in decimal, in octal (with a leading 0), or in hexadecimal (with a leading 0x). The specific bit values corresponding to particular tests may change from release to release; consult the list of tests in the source for the appropriate index values for the version of memtester you are running. Note that skipping some tests will reduce the time it takes for memtester to run, but also reduce memtester's effectiveness.

## NOTE
memtester must be run with root privileges to mlock(3) its pages. Testing memory without locking the pages in place is mostly pointless and slow.

## EXIT CODE
memtester's exit code is 0 when everything works properly. Otherwise, it is the logical OR of the following values:

x01

error allocating or locking memory, or invocation error

x02

error during stuck address test

x04

error during one of the other tests

## AUTHOR
Written by Charles Cazabon.

## REPORTING BUGS
Report bugs to <charlesc-memtester-bugs@pyropus.ca>.

## COPYRIGHT
Copyright © 2001-2020 Charles Cazabon

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


title: mf2b(8)

summary: micro fail2ban

text:
# mf2b(8)

## NAME
mf2b - micro fail2ban

## SYNOPSIS
mf2b [-fqv] [-c config-file ] [-l log-file ] [-p pid-file ] [-r chroot-dir ]

## DESCRIPTION
mf2b acts as a replacement to the well-known fail2ban daemon, but with embedded systems in mind. Therefore it has been written in pure C and doesn't depend on external libraries to be present on the target. Despite the similar concept, it's not a drop-in replacement as configuration syntax aligns more with that of logrotate.

## OPTIONS
-c config-file

Read configuration from config-file instead of the default /etc/mf2b.conf.

-f

Do not fork into background. Log output is then sent to stderr instead of syslog when daemonising.

-l log-file

Change log output to log-file instead of the default of stderr or syslog when -f has not been specified. The argument log-file may either be a path to a file log messages are to be appended to, stderr if log messages should go to standard error or syslog if log messages should be sent to the syslog daemon.

-q

Decrease log verbosity from the default of (as in syslog-terminology LOG_ERR down to LOG_CRIT or no logging at all, so (without any -v given before) this option may effectively be passed up to two times.

-p pid-file

Write daemon's process ID to pid-file. If multiple instances are started with the same pid-file specified, the file will contain the latest executed process' ID.

-r chroot-dir

Change root directory to chroot-dir prior to going into normal service. For this to work, mf2b has to be running with effective user ID 0.

-v

Increase log verbosity from the default of (as in syslog-terminology LOG_ERR up to LOG_WARNING, LOG_NOTICE, LOG_INFO, or LOG_DEBUG respectively, so (without any -q given before) this option may effectively be passed up to four times.

## FILES
/etc/mf2b.conf

The default configuration file. See mf2b.conf(5) for further details.

## BUGS
There certainly are, but of course this is subject to change. :)

## AUTHOR
Phil Sutter <phil AT nwl DOT cc>

## SEE ALSO
mf2b.conf(5)


callback

package: mgetty

title: callback(8)

text:
# callback(8)

## NAME
callback - call a user back, presenting a login prompt

## SYNOPSIS
callback [-x<debuglevel>] [-V] [-l<modemlines>] [-m<initstring>] [-s<speed>] [-d] [-S] [phone-number]

## DESCRIPTION
Call the given phone number (if none is given on the command line, ask user for one), and if a CONNECT is established, hand over control to mgetty(8) to present user with a login name prompt.

callback is used for various purposes:

* security: make sure your users are who they pretend to be by calling a well-known phone number.

* cost savings: make your company call you back.

callback can be called directly from the command line (but you must be "root" to do this, otherwise callback can't signal mgetty), or from mgetty's "login.config". See the login.config file shipped with mgetty for an example.

## OPTIONS
-x <debug level>

Use the given level of verbosity for logging - 0 means no logging, 5 is really noisy.

-V

Print version number and quit.

-d

Do not go into the background. This is helpful for debugging.

-l <modem lines>

Use the given modem lines. Multiple lines can be separated by ":", as with sendfax(8). Example: callback -l tty1a:tty2a

-m <init sequence>

Set the modem initialization sequence (as usual: expect send expect ...). This can do nearly everything, as long as it leaves the modem command responses on (that is, no ATQ1 here!) and switches the modem to data mode (AT+FCLASS=0) if it is used in data/fax mode.

-s <speed>

This is the bit rate that should be used for the machine-modem connection. Usually you'll set this via the "speed <nnnn>" option in "callback.config".

-S

Use the line where callback is started from for dialing out. Callback can make use of multiple modem lines, and with this options, you can force it to use just one modem, the one where a call comes in.

## CONFIG FILE
callback will read all its configuration at run-time from a file, usually called /etc/mgetty+sendfax/callback.config. See the documentation in the mgetty.info manual for details.

## DIAGNOSTICS
In most cases, callback can't print any error messages to the console, because it must detach itself immediately from the terminal, in case someone wants to be called back on the modem line he called in. So, nothing to print messages to...

Because of this, all callback errors are logged to a protocol file (the extent of the data written is controlled by the "-x" option), especially including the reason why a call was not made, or what exactly failed.

Just two messages are printed on stdout, and those are self-explaining, a call from a non-root user, and an invalid option.

## INTERNALS
How does it work?

This is a bit tricky, because of the way init(8) handles the utmp(5) file. You can't just have any program ask the user for a login name, and then start a "login shell", it won't work (this is for the same reason mgetty(8) has to be started from /etc/inittab).

So, mgetty has to do the "asking for login name". But I do not want to have all that dialout code in mgetty, bloating it even more.

The way it works is this: callback dials out on a modem device. It will only take a modem device that has a mgetty watching over it (!). When the connection is established (CONNECT), callback will send a signal SIGUSR1 to mgetty, which, in turn, will send the same signal back to signal "I got your signal". callback then exits, and mgetty takes over the existing connection, prompts the user for a login name, and forks off /bin/login.

Conclusion: this will not work with mgetty versions before February 04, 1996 (no support for this signalling), and if it doesn't work for you, please send me BOTH the mgetty and the callback log file, otherwise it's very hard to find the bugs.

## BUGS
callback is "alpha" code, not very stable right now.

callback is fairly dumb concerning retries.

callback must be run as root.

Most of the documentation consists of "reading the source".

## SEE ALSO
mgetty(8), ct(1)

## AUTHOR
callback is Copyright (C) 1993-1996 by Gert Doering, <gert@greenie.muc.de>.


faxrunqd

title: faxrunqd(8)

text:
# faxrunqd(8)

## NAME
faxrunqd - daemon to send fax jobs queued by faxspool(1)

## SYNOPSIS
faxrunqd [-v] [-d] [-l <ttys>] [-u <user>] [-V]

## DESCRIPTION
Runs in the background, and regularily checks the fax queue set up by faxspool(1). Sends all jobs that are due, records results, and takes appropriate action (notify mails etc).

faxrunqd basically does the same as faxrunq(1), just more so. Please read the faxrunq(1) man page if you're not already familiar with the concept.

The advantages of faxrunqd are:

- runs all the time, so you don't have to set up a cron job (but you have to set up an entry in /etc/inittab or start it from /etc/rc*)

- quicker response to new faxes in queue

- can sensibly handle more than one modem

- can handle prioritized fax jobs

- can do 'policy routing' of faxes depending on the fax number

The disadvantages are:

- needs more system ressources if you have only little fax traffic

- requires Perl 5.004

- more tricky to set up and to debug

## SETUP
faxrunqd is started at system boot from /etc/rc.*, or from /etc/inittab. You can also start it from the command line. It does not put itself in the background, so you have to start it with an "&", or from a ":respawn:" line in /etc/inittab. Using /etc/inittab has the advantage that faxrunqd is restarted automatically if something goes wrong and faxrunqd is stopped.

faxrunqd will first read a global configuration file (see below), then (optionally) the faxrunqd policy file (see further below). From then on, it will sit in a loop. It will check the fax queue every 60 seconds for new jobs, and will then distribute them over all available modems. If the job is sent, or fails, it will do the same thing faxrunq(1) would do (send a mail, delete the JOB directory, execute a named program, etc.). Both programs are fully compatible in this respect.

faxrunqd [-v] [-d] [-l <ttys>] [-u <user>] [-V]

## OPTIONS
-v

Tells faxrunqd to write progress information to the log file.

-d

Tells faxrunqd to write debugging information to stdout and the log file (usually used together with -v)

-l <ttyS>

Specifies the list of modem devices to use. Multiple devices are separated with ':', e.g. '-l ttyS0:ttyS1'.

-u <user>

faxrunqd can now (since 1.1.29) run as unprivileged user. If you start it as root from /etc/inittab or from one of the /etc/rc* scripts, it's strongly recommended to use '-u uucp' (to be precise: the user that is owning the outgoing fax spool directory). This will make faxrunqd drop all its privileges at startup, and run as the specified user. Running faxrunqd as root user might lead to security problems - don't do it.

-V

print version number and exit

## CONFIGURATION FILE
Some aspects of the behaviour of faxrunqd can be controlled by a configuration file, usually named /etc/mgetty+sendfax/faxrunq.config (this is the same file that faxrunq(1) uses, but there are additional options for faxrunqd). In this file, you can use the following options:

success-send-mail [y/n]

A boolean parameter that controls whether a mail will be sent after successful completition of the fax job.

failure-send-mail [y/n]

A boolean parameter that controls whether a mail will be sent after the fax job has failed more than the maximum number of times.

success-call-program <name>

Here, you can specify a program that will be run when the fax has been successfully sent. It will be passed two command line parameters. The first is the full path to the fax JOB file (see faxq(5)), the second is the last exit code from sendfax (for success-call-program, this is always "0").

failure-call-program <name>

Similar to the "success-call-program", this program will be run when the fax has been failed too often and faxrunqd gives up. This script could, for example, print out the fax on a printer so that it can be sent manually on a paper fax machine.

update-call-program <name>

This is, again, similar to "success-call-program". It will be called for interim status updates ("we've tried and it was BUSY"), so that frontend programs can display this information. "update-call-program" will only be called for jobs that will be kept in the fax queue for at least one more try.

maxfail-costly <n>

This specifies the number of times that a fax may fail "fatally", that is, causing telephone costs (explained above). The default value is 5.

maxfail-total <m>

This is the absolute maximum number of times that faxrunqd will try to send any given fax. The default value is 10.

delete-sent-jobs [y/n]

Determines whether faxrunqd should delete jobs after sending, or leave them in the fax queue (while moving the "JOB" file to "JOB.done") so that they can be seen at by "faxq -o". The default value is "do not delete sent faxes".

acct-log <path>

Specifies where faxrunqd should protocol success and failure of each try to send a fax job. The default location is /var/spool/fax/outgoing/acct.log.

The options that are specific to faxrunqd are:

fax-devices [tty(s)]

Specifies which ttys should be used for sending jobs. faxrunqd will always explicitely tell sendfax which modem to use, so the settings in sendfax.config are ignored. If you use policy routing (see below), this applies only to fax jobs that do not have a tty set by faxrunqd.policy.

faxrunqd-log [filename]

Specifies where logging information is written to. This is only used if faxrunqd is called with the -v or -d option.

policy-config [filename]

Specifies a file containing rules for "policy routing", see below. Default is "no file".

faxrunqd-max-pages [n]

If this is set to something greater 1 (default is 10), faxrunqd will combine multiple jobs to the same receipient telephone number into one telephone call. The maximum number of pages that the resulting job may have is specified here. Usually it makes no sense to increase this, but in some surroundings it might make sense to turn off this feature by setting it to 1.

sendfax-tty-map [tty] [program path] [args]

Some special cases might require running a non-default sendfax binary for specific ttys (like "testing new version" or "some other call-compatible sendfax applications for non-class-2 modems"). If you want mappings for more than one "special" tty devices, just use the option multiple times. Example: sendfax-tty-map capi0 /usr/sbin/sendfax.capi

queue-length-high [number] [program path] [args]

run the specified command when the number of jobs in the fax queue exceeds number (this could be used to send out a warning by syslog or e-mail when too many modems fail on a busy system, and faxes get stuck). The script will be run only once, unless the queue length falls below the ``low water mark'' threshold and rises again later on.

queue-length-low [number] [program path] [args]

run the specified command when the queue length has been over the ``high water'' threshold, and is back below this number. This can be used to send ``everything is back to normal'' e-mails, or just to reset the alarm threshold.

modem-error-threshold [number] [program path] [args]

this script is called whenever a given modem has more than number consecutive errors. Every successfully sent fax always resets the counter for a given modem to 0. This can be used to notify the sysadmin when a modem breaks (by default, faxrunqd just phases out a problematic modem, but will not report the problem).

delay-rule [errcode] [delay1] [delay2] [...]

fine-tune how long faxrunqd waits before re-sending a failed job after sendfax returned with error code "errcode". "delay1" is used after the first try, "delay2" after the second try, and so on. If faxrunqd needs more tries than delay values are specified, the last one will be re-used. The values given are interpreted as seconds, unless postfixed with 'm' (e.g. "60m"), in which case they are interpreted as minutes.

## POLICY ROUTING
faxrunqd can do some things differently, depending on the phone number where the fax is supposed to be sent to. For example, this might be useful to:

- send in-house faxes over a specific modem connected to a PABX (to avoid paying telco charges)

- send long-distance faxes to the US over a special LD provider, that is, use a specific dial-prefix for those

- use extra high debugging when sending to a known-to-be problematic receipient

etc.

This feature is controlled by a file, containing match / substitute rules. The name of the file is specified with the "policy-config" option in faxrunq.config.

The file is read from top to bottom. Each line starting with a "#" sign is a comment, and is skipped. In every other line, the first field of the line is interpreted as a "match" clause, and compared to the telefone number of an to-be-sent fax job. Regular expressions can be used (see perlre(1)).

If the telefone number is matched, the second field is used to substitute parts of the telefone number, for example, cut off a local prefix, or change a digit, or whatever. If you do not want any substitutions, put a "-" in that field.

The third field specifies the tty lines to use for faxes matched by this line (for example, you might have one modem connected to a long-distance provider, and others for local use or so). Put a "-" in this field if you want to use the default fax modems.

The remaining part of the line are appended to the sendfax command line. With those, you can set a different dial-string ("-D ATD"), or a higher debug level ("-x 9"), or whatever else you can imagine. Do NOT set a tty to use here ("-l ttyS1"), because that would confuse the internal tty handling of faxrunqd, leading to weird effects processing the fax queue!!

Examples:

\# 12345-nnn is sent to "nnn" over a local PABX, modem on tty2

^12345 s/12345// tty2

\# fax to 56789 (exact match) is sent with higher debugging

^56789$ - - -x 8

## FILES
/var/spool/fax/outgoing/stop

if this file exists, faxrunqd will stop whatever it's doing at the moment, wait for all outstanding jobs, and then fall asleep until the file is removed. You can use this to stop queue processing while testing something, or if you know that the modem(s) are unavailable and do not want to run into any error messages, etc.

/var/spool/fax/outgoing/faxqueue_done

Every time faxrunqd runs the fax queue, a time stamp is written into that file. It is used by faxspool to display a warning if the queue hasn't been run recently (so faxes may get stuck).

## SIGNALS
To control faxrunqd's behaviour, you can send it the following signals:

SIGINT

SIGTERM

remove lock file, remove pid file, terminate immediately.

SIGHUP

finish all fax jobs that are currently being sent, then terminate (this is used to signal faxrunqd "I want you to terminate" without disturbing the normal flow of operation - SIGINT/TERM etc. can lead to some faxes being sent twice).

SIGUSR1

close, roll, and re-open log file.

SIGUSR2

dump current modem success/failure statistics to log file.

## BUGS
faxrunqd does not report if a modem goes bad - instead it will just stop using it (which is good for reliable faxing, but bad for error recovery).

## SEE ALSO
faxspool(1), sendfax(8), faxq(1), faxrunq(1), faxqueue(5)

## AUTHOR
faxrunqd is Copyright (C) 1997-2004 by Gert Doering, <gert@greenie.muc.de>. It was inspired by Bodo Bauer's initial faxrunqd, but completely rewritten.


mgetty

title: mgetty(8)

summary: smart modem getty

text:
# mgetty(8)

## NAME
mgetty - smart modem getty

## SYNOPSIS
mgetty [options] ttydevice [gettydefs]

## DESCRIPTION
Mgetty is a ``smart'' getty replacement, designed to be used with hayes compatible data and data/fax modems. Mgetty knows about modem initialization, manual modem answering (so your modem doesn't answer if the machine isn't ready), UUCP locking (so you can use the same device for dial-in and dial-out). Mgetty provides very extensive logging facilities.

This manpage doesn't try to detail mgetty setup in detail, it just lists the most important options. For detailed instructions, see the info file mgetty.info (mgetty.texi).

## OPTIONS
-k <space>

Tells mgetty to leave <space> kbytes free on disk when receiving a fax.

-x <debug level>

Use the given level of verbosity for logging - 0 means no logging, 9 is really noisy. The log file is usually /tmp/log_mg.<device>

-s <speed>

Set the port speed to use, e.g. "-s 19200".

-r

Tells mgetty that it is running on a direct line. UUCP locking is done, but no modem initialization whatsoever.

-p <login prompt>

Use the given string to prompt users for their login names. Various tokens are allowed in this string. These tokens are: @ for the system name, \n, \r, \g, \b, \v, \f, \t for newline, carriage return, bell, backspace, vertical tab, form feed, and tab, respectively. \P and \L will expand to the tty name ("ttyS0"). \Y will give the Caller ID, \I the "CONNECT foobar" string returned by the modem, and \S will output the port speed. \s, \m, \V, \R represent the operating system, the hardware name, the OS version, the OS release. \N and \U give the number of users currently logged in. \C will be changed into the result of ctime(), and \D and \T will output the date and time, respectively. Finally, \<digit> will use digit as octal/decimal/hexadecimal representation of the character to follow. The default prompt is specified at compile time.

-n #

Tells mgetty to pick up the phone after the #th RING. Default is 1.

-R <t>

Tells mgetty to go into "ringback" (aka "ring-twice") mode. That means: the first call is never answered, instead the caller has to hang up after the phone RINGs, wait 30 seconds, and then call again in the next <t> seconds for mgetty to pick up. If no call comes, mgetty will exit. I do not really recommend using this, better get a second phone line for the modem.

-i <issue file>

Output <issue file> instead of /etc/issue before prompting for the user name. The same token substitutions as for the the login prompt are done in this file.

-D

Tells mgetty that the modem is to be treated as a DATA modem, no fax initalization is attempted.

-F

Tells mgetty that DATA calls are not allowed and the modem should be set to Fax-Only.

-C <class>

Tells mgetty how to treat the modem. Possible values for <class> are "auto" (default, try to find out whether the modem supports fax), "cls2" (use the class 2 fax command set, even if the modem supports class 2.0), "c2.0" (use the class 2.0 fax command set), "data" (data only, exactly as the -D switch).

-S <g3 file>

If a call comes in and requests fax polling, mgetty will send the named file. Note: not all fax modems support poll sending.

-I <fax id>

Use the given fax station ID for fax identification. Not used for data modems.

-b

Open the port in blocking mode. Best used in combination with "-r". This is the default if mgetty is called as getty. You may want to use this if you want to make use of the two-device / kernel-locking scheme of the Linux and SunOS operating systems (/dev/ttyS.. and /dev/cua..). I do not recommend it, it's just include for completeness, and to be able to use mgetty as a full-featured getty replacement.

-a

Use autobauding. That is, after a connection is made, mgetty parses the "CONNECT foo" response code of the modem and sets the port speed to the first integer found after the "CONNECT" string, "foo" in this example. You need this if your modem insist on changing its DTE speed to match the line speed. I recommend against using it, better leave the port speed locked at a fixed value. The feature is included because there exist old modems that cannot use a fixed (locked) port speed.

-m 'expect send ...'

Set the "chat sequence" that is used to initialize the modem. For an empty expect part, use empty double quotes (""). Since the sequence contains spaces, you have to enclose all of it in single quotes(''). Example: mgetty -m '"" ATH0 OK'

## FILES
/etc/mgetty+sendfax/mgetty.config

Main configuration file.

/etc/mgetty+sendfax/login.config

controls whether (and when) mgetty should call some other program for user login instead of /bin/login. How this is done is explained in this file.

/etc/mgetty+sendfax/dialin.config

controls acceptance/denial of incoming calls based on the caller's number. Available only if you have "caller ID" and your modem supports it.

/etc/nologin.ttyxx

controls whether mgetty should pick up the phone upon incoming calls. If the file exists, calls are completely ignored. You can use this, for example, to stop mgetty during day time, and let it pick up at night only, by creating and removing /etc/nologin.ttyxx via the cron program at the appropriate time.

/etc/issue

will be printed after a connection is established, and before the with the '-i' option.

/var/log/mgetty/ttyxx.log

Debug log file, see below.

## DIAGNOSTICS
If mgetty doesn't work the way it should, the main source of diagnostic data is the log file. It can be found in "/var/log/mgetty/ttyxx.log" (for the mgetty process handling "ttyxx"). If it doesn't contain enough details, enhance the log level with the '-x' option to mgetty, e.g. "-x 5".

Many of the common problems and solutions are discussed in the mgetty manual and the FAQ. Please see the WWW page at http://alpha.greenie.net/mgetty/ for both.

## BUGS
Not all of mgetty configuration can be done at run-time yet. Things like flow control and file paths (log file / lock file) have to be configured by changing the source and recompiling.

Users never read manuals...

## SEE ALSO
g32pbm(1), sendfax(8), getty(8), mgettydefs(4), mgetty.info

## AUTHOR
mgetty is Copyright (C) 1993 by Gert Doering, <gert@greenie.muc.de>.


faxq-helper

package: mgetty-sendfax

title: faxq-helper(8)

text:
# faxq-helper(8)

## NAME
faxq-helper - privileged helper process to access the fax queue

## SYNOPSIS
faxq-helper <command> [<options>]

## DESCRIPTION
faxq-helper is part of the internal workings of faxspool(1).

Formerly, the /var/spool/fax/outgoing directory was world-writeable, leading to all sort of funny symlink attacks against faxspool(1) and faxrunq(8).

These days, it's owned by the user ``uucp'', and only this user can write to it. To be able to put jobs there, faxspool(1) calls faxq-helper for very clearly defined purposes:

- make a new queue directory

- put a new fax G3 file into this queue directory

- put a JOB file into this queue directory, and activate the fax job

and possibly:

- remove a fax job from the queue (to be used by faxrm and in case of errors)

- re-queue a job that has been suspended due to repeated failures (faxq -r)

To achieve this, faxq-helper is installed set-user-id uucp. If you remove the suid bit, or chown the fax queue directory to a different user, it will stop working.

## RETURN VALUES
faxq-helper has the following exit() values:

0

everything went fine

1

invalid JOB ID specified on the command line

2

some problem with the directory setup of the outgoing queue dir, /var/spool/fax/outgoing (it will print a detailed error message)

3

some problems with the user ID setup of the ``uucp'' user (it will print a detailed error message)

10

failure to process the specified command (it will print a detailed error message)

## SEE ALSO
faxspool(1), faxq(1), faxrm(1), faxqueue(5)

## AUTHOR
faxq-helper is Copyright (C) 2004-2006 by Gert Doering, <gert@greenie.muc.de>.


sendfax

title: sendfax(8)

text:
# sendfax(8)

## NAME
sendfax - send group 3 fax files (G3 files) with a class 2 faxmodem

## SYNOPSIS
sendfax [-p] [-x<debuglevel>] [-v] [-l<modemlines>] [-m<initstring>] [-d<polldirectory>] [-C<modemclass>] [-S] [-n] [-r] [-D<dialprefix>] phone-number [g3file(s)]

## DESCRIPTION
Send the named g3 fax files to the fax machine at "phone number". The g3 files can be created with pbm2g3(1) or GNU's GhostScript with the "digifax" driver.

## OPTIONS
-p

Tells sendfax to try fax polling, that is, get any documents queued in the remote fax machine for you (used for weather maps and the like)

-x <debug level>

Use the given level of verbosity for logging - 0 means no logging, 5 is really noisy.

-v

Give some progress report on stdout.

-l <modem lines>

Use the given modem lines. Multiple lines can be separated by ":". Example: sendfax -l tty1a:tty2a

-m <initstring>

Send an additional init string. This string is sent right after initializing the modem and setting it into class 2 mode. You can use this to set the speaker value, some special registers, whatsoever. The modem must return "OK". If it returns "ERROR", sendfax prints an error message and aborts. You do not have to prepend the "AT" prefix, but it won't do harm either.

-d <directory>

Specify the directory where polled fax files should go to. Defaults to "." for the current directory. Unused if not polling a fax.

-C <class>

Tells sendfax how to treat the modem. Possible values for <class> are "auto" (default, try to find out which fax command set the modem supports), "cls2" (use the class 2 fax command set, even if the modem claims to support class 2.0) and "c2.0" (use the class 2.0 fax command set). Obviously, "data" (which is valid for "mgetty -C ...") is not of much use here.

-S

Assume modem connection on stdin, do not try to lock or initialize anything. To take over existing connection (for interworking with vgetty et.al.) use with a dial string of "T1" (just a short beep, no phone number at all would confuse many modems, a pulse dialed number may confuse the telco switch) and "-m ATX1" (do not wait for dial tone).

-n

Tells sendfax to send the fax pages in ``normal'' (204x98 dpi) mode. Default is ``fine'' mode (204x196 dpi).

-r

If this option is given, sendfax will rename all the fax G3 files to ``<filename>.done'' after successfully sending this. This is intended to be used from ``faxrunq'', to make sure that a partially-sended fax isn't retransmitted as a whole every time. If this option is set, sendfax will not (!) complain if not all files named on the command line exist.

-D <dial prefix>

Override the default (set by sendfax.config or in policy.h) for the 'ATxxx' command to dial the remote number. This is rarely used from the command line, but you might want to use it in combination with faxrunqd's policy routing option (see example in faxrunqd.policy(5)).

-M <max speed>

Sets the maximum transmission (modem to modem) speed. This is only needed in very rare cases, because normally the modems negotiate the correct speed automatically. Example: "-M 7200".

-R <max tries>

Sets the maximum number of attempts to transmit a given page, before sendfax gives up on this page. Normally it's not needed to change this - the default is "(up to) 3 tries" and that works quite well for most environments.

## CONFIG FILE
If compiled accordingly, sendfax can read all its configuration from at run-time from a file, usually called /etc/mgetty+sendfax/sendfax.config. See the documentation in the mgetty.info manual for details.

## DIAGNOSTICS
sendfax returns an error code, according to the reason why the program terminated. If everything went OK, sendfax returns 0. If ``harmless'' errors (didn't cost money) occured, an error code below 10 is returned. If a dial attempt failed after the remote end picked up (it will cost money), a return code of 10 or higher is returned.

In Detail, the return codes are as follows:

0

all pages have been transmitted successfully

1

error on the sendfax command line

2

cannot open fax device (e.g. due to locked modem)

3

cannot initialize modem (e.g. modem switched off)

4

dialup failed with BUSY

5

dialup failed with NO DIALTONE

10

dialup failed with ERROR or NO CARRIER (modem handshake failed)

11

waiting for XON failed (rarely seen)

12

transmitting or polling page(s) failed (connection dropped)

Very detailed debug information is written to the log file. It can be found in "/var/log/mgetty/sendfax.log". If it doesn't contain enough details, enhance the log level with the "-x" option to sendfax, e.g. "-x 5".

Many of the common problems and solutions are discussed in the mgetty manual and the FAQ. Please see the WWW page at http://alpha.greenie.net/mgetty/ for both.

## REFERENCES
The standard for Group 3 fax is defined in CCITT Recommendation T.4.

## BUGS
sendfax should be able to put a header on the page.

sendfax should be able to read TIFF g3 input files.

## SEE ALSO
g3cat(1), pbm2g3(1), mgetty(1), faxspool(1), faxrunq(1), faxrunqd(8)

## AUTHOR
sendfax is Copyright (C) 1993 by Gert Doering, <gert@greenie.muc.de>.


vgetty

package: mgetty-voice

title: vgetty(8)

text:
# vgetty(8)

## NAME
vgetty - voice extension to the mgetty+sendfax program

## SYNOPSIS
vgetty [options] ttydevice

vgetty is not meant to be run from the command line. It should be run from the /etc/inittab file so it can respawn after each call. Here is a typical inittab entry:

S0:345:respawn:/usr/sbin/vgetty ttyS0

If you already have a line in your inittab file which invokes mgetty, replace it with vgetty, since it replaces/extends its functionality.

## DESCRIPTION
vgetty is an extension to the mgetty+sendfax program which provides an interface to voice-capable modems. Use it to operate your modem as a simple answering machine or build your own sophisticated voice messaging system. vgetty handles all the voice-modem specific protocols, giving application programs a uniform, modem-independent voice library. Supported modems include many common serial modems from 3com/USRobotics, Elsa, Multitech, ZyXEL, and others. Caller ID and Distinctive Ring are supported provided you have subscribed to these services from your phone company. Software-based modems (winmodems) are not supported.

vgetty comes with tools to convert au/wav/voc sound files to/from the format used by most supported modems. Basic editing and filtering of sound files is included as well. See pvf(1) for more information.

## OPTIONS
vgetty accepts the same options as mgetty. The one's relevant to voice mode are given here. See mgetty(8) for other options related to data and fax modes.

-a

Use autobauding (change port speed to modem CONNECT speed). There is no voice modem that needs this, the option is just documented for completeness.

-m 'expect send ...'

Set the chat sequence that is used to initialize the modem. For an empty expect part, use empty double quotes (""). Since the sequence contains spaces, you will have to enclose all of it in single quotes (''). Example: vgetty -m '"" ATH0 OK'

-n <rings>

Set the number of rings after which vgetty will answer the phone

-s <speed>

Set the serial port speed to use, e.g. "-s 38400". This is the speed of communication between the computer and modem in bits/sec (baud).

-x <log level>

Set the log verbosity level. Zero (0) means no logging, six (6) is really noisy. Use level six (6) when sending problem reports to the maintainer. The log file is /var/log/vgetty.ttyXX.

## ENVIRONMENT
vgetty sets the following environment variables when calling external programs:

CALLER_ID

The caller's telephone number.

CALLED_ID

The number the caller has dialed. Useful for ISDN with multiple incoming phone numbers on the same physical line.

CONNECT

The connect string as reported by the modem (e.g. "38400/V.32bis/V.42bis ... ", etc.).

DEVICE

The tty device being used (e.g. "ttyS0"). Useful for handling multiple devices ("messages on this line are for work, messages on the other line are personal").

## RESOURCES
vgetty is included in the mgetty+sendfax distribution. For the latest release, go to:

ftp://alpha.greenie.net/mgetty/source

The vgetty maintainer's home page is at:

http://www-internal.alphanet.ch/~schaefer/vgetty.html

Send problem reports to:

vgetty-maintainer@alphanet.ch

For information on mgetty, go to:

http://alpha.greenie.net/mgetty

The mgetty mailing list is at mgetty@muc.de. The mailing list is mirrored to the de.alt.comm.mgetty newsgroup.

## FILES
/etc/mgetty+sendfax/voice.conf

Main configuration file for vgetty. Many options here override the equivalents found in /etc/mgetty+sendfax/mgetty.config

/etc/nologin.ttyXX

If this file exists, vgetty will not answer calls on device ttyXX.

/var/log/vgetty.ttyXX

Debug log file for vgetty.

/var/spool/voice/messages/Index

List of greeting messages to use.

/var/spool/voice/.code

Access code for remote playback of messages using the dtmf.sh script

/var/spool/voice/.flag

vgetty touches this file when a new message is received

/var/spool/voice/.timestamp

Used by the dtmf.sh script to record last time of message playback

## DIAGNOSTICS
If vgetty doesn't work they way you think it should, check the log file. By default, it is located in /var/log/vgetty.ttyXX (for the vgetty process handling device ttyXX, e.g. ttyS0).

## BUGS
vgetty supports most standard voice modems, but many modems are not fully compliant with relevant standards or contain firmware bugs. If you have problems, try upgrading your modem to the latest firmware revision. If you discover a bug with how vgetty reacts to your modem, please email the maintainer (vgetty-maintainer@alphanet.ch) describing your problem. Include relevant excerpts from the log file (set log level to six first), and details about your modem (including firmware revision) and operating system.

## SEE ALSO
mgetty(8), pvf(1)

## COPYRIGHT
vgetty is Copyright (c) 1997-2001 Marc Schaefer (schaefer@alphanet.ch) and many others, before and after.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This man page was written by Barry Stewart <bstewart@smyrnacable.net>, and has CVS version: $Id: vgetty.8,v 1.1 2001/12/22 18:43:22 marcs Exp $


milter-greylist

package: milter-greylist

title: milter-greylist(8)

text:
# milter-greylist(8)

## NAME
milter-greylist - grey listing filter for sendmail

## SYNOPSIS
milter-greylist [-A] [-a autowhite_delay] [-c] [-D] [-d dumpfile] [-f configfile] [-h] [-l] [-q] [-r] [-S] [-T] [-u username[:groupname]] [-v] [-w greylist_delay] [-L cidrmask] [-M prefixlen] [-P pidfile] -p socket

## DESCRIPTION
milter-greylist is a mail filter for sendmail that implements grey listing, a spam filtering technique proposed by Evan Harris.

Grey listing works by assuming that contrarily to legitimate MTA, spam engines will not retry sending their junk mail on a temporary error. The filter will always temporarily reject mail on a first attempt, and accept it after some time has elapsed.

If spammers ever try to resend rejected messages, we can assume they will not stay idle between the two sends. Odds are good that the spammer will send a mail to an honey pot address and get blacklisted in a distributed black list before the second attempt.

Of course, the filter can be configured to not apply grey listing to some hosts or networks. You can whitelist friendly SMTP servers, and you should whitelist your own network, otherwise your SMTP clients will have real trouble to send e-mail. Whitelisting localhost is also a must.

milter-greylist works with two files. greylist.conf is the configuration file. It holds the whitelist of addresses that will not suffer grey list filtering. It is read once upon milter-greylist startup, then it will be automatically reloaded whenever a new message gets in and if it had been modified. You should not send milter-greylist a kill -1 as it will just terminate it (libmilter works that way).

See greylist.conf(5) for documentation on the file's format.

The second file is greylist.db. milter-greylist will regularly dump its grey list database into this file, which is used on startup to restore the previous grey list state. If the file does not exist or is unreadable, milter-greylist will start with an empty grey list.

The default location for the grey list database and the socket for communicating with sendmail is /var/milter-greylist/. That directory must be owned and writeable by the user id under which milter-greylist runs.

The following options are available; if present, they override their equivalents specified in the configuration file:

-A

Normally, milter-greylist does not greylist senders that succeeded SMTP AUTH. This option disables that feature and causes authentication to be ignored. Equivalent to the noauth option in the configuration file.

-a autowhite_delay

Configure auto-whitelisting. After a tuple (sender IP, sender e-mail, recipient e-mail) has been accepted, other identical tuples will get accepted for autowhite_delay. The default is one day. Use zero to disable auto-whitelisting. A suffix can be added to specify seconds (s), minutes (m), hours (h), days (d) or weeks (w). Without any suffix, values are treated as seconds. Equivalent to the autowhite option in the configuration file.

-c

Only check the configuration file and exit. Return value is 0 if the configuration is valid, or an error code from <sysexit.h> otherwise.

-D

Do not fork; run in the foreground instead. Without this flag, milter-greylist will become a daemon. Equivalent to the nodetach option in the configuration file.

-d dumpfile

Location of the dump file. Default is /var/milter-greylist/greylist.db. Equivalent to the dumpfile option in the configuration file.

-f configfile

Location of the config file. Default is /etc/mail/greylist.conf.

-h

Show usage information.

-L cidrmask

Use cidrmask as a matching mask when checking IPv4 addresses entries in the greylist. This is aimed as a workaround to mail farms that re-emit messages from different IP addresses. With -L 24, the matching mask is 255.255.255.0, and all addresses within the same class C network are considered the same. Default is -L 32, which corresponds to all addresses considered different.

-M prefixlen

Use prefixlen as a matching mask when checking IPv6 addresses entries in the greylist. This is aimed as a workaround to mail farms that re-emit messages from different IP addresses. With -M 64, the matching mask is ffff:ffff:ffff:ffff::, and all addresses within the same subnet are considered the same. Default is -M 128, which corresponds to all IPv6 addresses considered different.

-l

Enable debug output in the access-list management code.

-P pidfile

write the daemon's PID to pidfile. Equivalent to the pidfile option in the configuration file.

-p socket

Use socket as the socket used by sendmail(8) to communicate with milter-greylist.

-q

Quiet mode. milter-greylist will not tell SMTP clients how much time they have to wait before the message will be accepted. Equivalent to the quiet option in the configuration file.

-r

Display milter-greylist version and build environment, then exit.

-S

If milter-greylist was built with SPF support, then SPF-compliant senders bypass greylisting. This flag causes messages to be greylisted regardless of whether they are SPF-compliant or not. Equivalent to the nospf option in the configuration file.

-T

Enable test mode. This alters the meaning of rcpt lines in greylist.conf, so that only messages sent to recipient addresses listed there are selected for greylisting. This option and the rcpt lines have been deprecated in favor of ACL, so do not use it.

-u username[:groupname]

Drop root privileges and switch to username (and optionally groupname) credentials. Make sure this user (and group) has write access to greylist.db. Equivalent to the user option in the configuration file.

-v

Enable debug output. milter-greylist will send messages (and debug output if it is given the -v flag) to syslogd(8) with facility LOG_MAIL. Equivalent to the verbose option in the configuration file.

-w greylist_delay

sets the minimum delay between the first attempt and the time the message can be accepted. Default is 30 minutes. A suffix can be added to specify seconds (s), minutes (m), hours (h), days (d) or weeks (w). Without any suffix, values are treated as seconds. Equivalent to the greylist option in the configuration file.

## GREYLIST MX SYNC
milter-greylist is now able to sync the greylist between multiple MX. In order to enable this feature, you need to list the peer MXs in greylist.conf(5) like this:

peer 192.0.2.17

peer 192.0.2.18

When peers are configured, milter-greylist will listen on the port defined for the mxglsync service in /etc/services (defaults to 5252), and it will connect to peers at this port. Each time an entry is added or deleted on one MX, it will be propagated to the others.

The protocol is quite simple, just telnet to your MX at port 5252, and type help to see how it works. Note that connections will only be accepted from peer MXs, even localhost will be rejected (and don't ever add localhost as a peer for MX sync, as you will cause each entry in the greylist to be added twice).

If an MX is down, changes to the greylist will be queued until it gets back up again. The queue length is limited (default is 1024 entries), and if it overflows, newer entries will be discarded.

## AUTHORS
Emmanuel Dreyfus <manu@netbsd.org>

milter-greylist received many contributions from (in alphabetical order): Adrian Dabrowski, Aida Shinra, Adam Katz, Alexander Lobodzinski, Alexandre Cherif, Alexey Popov, Andrew McGill, Attila Bruncsak, Benoit Branciard, Bernhard Schneider, Bob Smith, Constantine A. Murenin, Chris Bennett, Christian Pelissier, Cyril Guibourg, Dan Hollis, David Binderman, Denis Solovyov, Elrond, Enrico Scholz, Eugene Crosser, Fabien Tassin, Fredrik Pettai, Gary Aitken, Georg Horn, Gert Doering, Greg Troxel, Guido Kerkewitz, Hajimu Umemoto, Hideki ONO, Ivan F. Martinez, Jacques Beigbeder, Jean Benoit, Jean-Jacques Puig, Jeff Rife, Jim Klimov, Jobst Schmalenbach, Joe Pruett, Joel Bertrand, Johann E. Klasek, Johann Klasek, John Thiltges, John Wood, Jorgen Lundman, Kazuyuki Yoshida, Klas Heggemann, Kouhei Sutou, Laurence Moindrot, Lev Walkin, Manuel Badzong, Markus Wennrich, Mart Pirita, Martin Paul, Matt Kettler, Mattheu Herrb, Matthias Scheler, Matthieu Herrb, Michael Fromme, Moritz Both, Nerijus Baliunas, Ole Hansen, Pavel Cahyna, Pascal Lalonde, Per Holm, Petar Bogdanovic, Petr Kristof, Piotr Wadas, R P Herrold, Ralf S. Engelschall, Ranko Zivojnovic, Remy Card, Rick Adams, Rogier Maas, Romain Kang, Rudy Eschauzier, Stephane Lentz, Steven Hiscocks, Thomas Scheunemann, Tim Mooney, Vincent Dufresne, Wolfgang Solfrank, and Yaroslav Boychuk.

Thanks to Helmut Messerer and Thomas Pfau for their feedback on the first releases of this software.

## SEE ALSO
greylist.conf(5), sendmail(8), syslogd(8).

Evan Harris's paper:

http://projects.puremagic.com/greylisting/

milter-greylist's web site:

http://hcpnet.free.fr/milter-greylist/


mingetty

package: mingetty

title: mingetty(8)

summary: minimal getty for consoles

text:
# mingetty(8)

## NAME
mingetty - minimal getty for consoles

## SYNOPSIS
mingetty [--noclear] [--long-hostname] tty

## DESCRIPTION
mingetty is a minimal getty for use on virtual consoles. Unlike agetty(8), mingetty is not suitable for serial lines. I recommend using mgetty(8) for this purpose.

## OPTIONS
--noclear

Do not clear the screen before prompting for the login name (the screen is normally cleared).

--long-hostname

By default the hostname is only printed until the first dot. With this option enabled, the full text from gethostname() is shown.

## ISSUE ESCAPES
mingetty recognizes the following escapes sequences which might be embedded in the /etc/issue file:

\d

insert current day (localtime),

\l

insert line on which mingetty is running,

\m

inserts machine architecture (uname -m),

\n

inserts machine's network node hostname (uname -n),

\o

inserts domain name,

\r

inserts operating system release (uname -r),

\t

insert current time (localtime),

\s

inserts operating system name,

\u

resp. \U the current number of users which are currently logged in. \U inserts "n users", where as \u only inserts "n".

\v

inserts operating system version (uname -v).

## EXAMPLE
"Linux eos i386 #1 Tue Mar 19 21:54:09 MET 1996" was produced by putting "\s \n \m \v" into /etc/issue.

## FILES
/etc/issue, /var/run/utmp.

## SEE ALSO
mgetty(8), agetty(8).

## AUTHOR
Copyright © 1996 Florian La Roche <florian@suse.de> or <florian@jurix.jura.uni-sb.de>. Man-page written by David Frey <David.Frey@eos.lugs.ch> and Florian La Roche.


title: mini_httpd(8)

text:
# mini_httpd(8)

## NAME
mini_httpd - small HTTP server

## SYNOPSIS
mini_httpd [-C configfile] [-p port] [-d dir] [-dd data_dir] [-c cgipat] [-u user] [-h hostname] [-r] [-v] [-l logfile] [-i pidfile] [-T charset] [-P P3P] [-M maxage] [-S] [-E certfile] [-Y cipher] [-D] [-V]

## DESCRIPTION
mini_httpd is a small HTTP server. Its performance is not great, but for low or medium traffic sites it's quite adequate. It implements all the basic features of an HTTP server, including:

*

GET, HEAD, and POST methods.

*

CGI.

*

Basic authentication.

*

Security against ".." filename snooping.

*

The common MIME types.

*

Trailing-slash redirection.

*

index.html, index.htm, index.cgi

*

Directory listings.

*

Multihoming / virtual hosting.

*

Standard logging.

*

Custom error pages.

It can also be configured to do SSL/HTTPS.

mini_httpd was written for a couple reasons. One, as an experiment to see just how slow an old-fashioned forking web server would be with today's operating systems. The answer is, surprisingly, not that slow - on FreeBSD 3.2, mini_httpd benchmarks at about 90% the speed of Apache. The other main reason for writing mini_httpd was to get a simple platform for experimenting with new web server technology, for instance SSL.

## OPTIONS
-C

Specifies a config-file to read. All options can be set either by command-line flags or in the config file. See below for details.

-p

Specifies an alternate port number to listen on. The default is 80. The config-file option name for this flag is "port".

-d

Specifies a directory to chdir() to at startup. This is merely a convenience - you could just as easily do a cd in the shell script that invokes the program. The config-file option name for this flag is "dir".

-dd

Specifies a directory to chdir() to after chrooting. If you're not chrooting, you might as well do a single chdir() with the -d flag. If you are chrooting, this lets you put the web files in a subdirectory of the chroot tree, instead of in the top level mixed in with the chroot files. The config-file option name for this flag is "data_dir".

-c

Specifies a wildcard pattern for CGI programs, for instance "**.cgi" or "cgi-bin/*". The default is no CGI. The config-file option name for this flag is "cgipat".

-u

Specifies what user to switch to after initialization when started as root. The default is "nobody". The config-file option name for this flag is "user".

-h

Specifies a hostname to bind to, for multihoming. The default is to bind to all hostnames supported on the local machine. The config-file option name for this flag is "host".

-r

Do a chroot() at initialization time, restricting file access to the program's current directory. See below for details. The config-file option names for this flag are "chroot" and "nochroot".

-v

Do virtual hosting. See below for details. The config-file option name for this flag is "vhost".

-l

Specifies a log file name. The default is no logging. The config-file option name for this flag is "logfile".

-i

Specifies a file to write the process-id to. If no file is specified, no process-id is written. You can use this file to send signals to mini_httpd. The config-file option name for this flag is "pidfile".

-T

Specifies the character set to use with text MIME types. The default is "UTF-8". The config-file option name for this flag is "charset".

-P

Specifies a P3P server privacy header to be returned with all responses. See http://www.w3.org/P3P/ for details. Mini_httpd doesn't do anything at all with the string except put it in the P3P: response header. The config-file option name for this flag is "p3p".

-M

Specifies the number of seconds to be used in a "Cache-Control: max-age" header to be returned with all responses. An equivalent "Expires" header is also generated. The default is no Cache-Control or Expires headers, which is just fine for most sites. The config-file option name for this flag is "maxage".

-S

If mini_httpd is configured to do SSL/HTTPS, then the -S flag is available to enable this feature. The config-file option name for this flag is "ssl".

-E

If mini_httpd is configured to do SSL/HTTPS, then you can specify a server certificate with this flag. You can make a certificate with the command "make cert". The default is "mini_httpd.pem" (in the directory where you start mini_httpd). The config-file option name for this flag is "certfile".

-Y

If mini_httpd is configured to do SSL/HTTPS, then you can specify a cipher set with this flag. Examples of cipher sets: "RC4-MD5", "DES-CBC3-SHA", "AES256-SHA". The default is to let each browser negotiate ciphers separately, and unless you know what you're doing it's best to let them do so. The config-file option name for this flag is "cipher".

-D

This was originally just a debugging flag, however it's worth mentioning because one of the things it does is prevent mini_httpd from making itself a background daemon. Instead it runs in the foreground like a regular program. This is necessary when you want to run mini_httpd wrapped in a little shell script that restarts it if it exits. The config-file option name for this flag is "debug".

-V

Shows mini_httpd's version and then exits.

## CGI
mini_httpd supports the CGI 1.1 spec.

In order for a CGI program to be run, its name must match the pattern you specify with the -c flag This is a simple shell-style filename pattern. You can use * to match any string not including a slash, or ** to match any string including slashes, or ? to match any single character. You can also use multiple such patterns separated by |. The patterns get checked against the filename part of the incoming URL. Don't forget to quote any wildcard characters so that the shell doesn't mess with them.

## BASIC AUTHENTICATION
Basic Authentication uses a password file called ".htpasswd", in the directory to be protected. This file is formatted as the familiar colon-separated username/encrypted-password pair, records delimited by newlines. The protection does not carry over to subdirectories. The utility program htpasswd(1) is included to help create and modify .htpasswd files.

## CHROOT
chroot() is a system call that restricts the program's view of the filesystem to the current directory and directories below it. It becomes impossible for remote users to access any file outside of the initial directory. The restriction is inherited by child processes, so CGI programs get it too. This is a very strong security measure, and is recommended. The only downside is that only root can call chroot(), so this means the program must be started as root. However, the last thing it does during initialization is to give up root access by becoming another user, so this is safe.

Note that with some other web servers, such as NCSA httpd, setting up a directory tree for use with chroot() is complicated, involving creating a bunch of special directories and copying in various files. With mini_httpd it's a lot easier, all you have to do is make sure any shells, utilities, and config files used by your CGI programs and scripts are available. If you have CGI disabled, or if you make a policy that all CGI programs must be written in a compiled language such as C and statically linked, then you probably don't have to do any setup at all.

However, one thing you should do is tell syslogd about the chroot tree, so that mini_httpd can still generate syslog messages. Check your system's syslodg man page for how to do this. In FreeBSD you would put something like this in /etc/rc.conf:

```
    syslogd_flags="-l /usr/local/www/data/dev/log"
```

Substitute in your own chroot tree's pathname, of course. Don't worry about creating the log socket, syslogd wants to do that itself. (You may need to create the dev directory.) In Linux the flag is -a instead of -l, and there may be other differences.

## MULTIHOMING
Multihoming means using one machine to serve multiple hostnames. For instance, if you're an internet provider and you want to let all of your customers have customized web addresses, you might have www.joe.acme.com, www.jane.acme.com, and your own www.acme.com, all running on the same physical hardware. This feature is also known as "virtual hosts". There are three steps to setting this up.

One, make DNS entries for all of the hostnames. The current way to do this, allowed by HTTP/1.1, is to use CNAME aliases, like so:

```
  www.acme.com IN A 192.100.66.1

  www.joe.acme.com IN CNAME www.acme.com

  www.jane.acme.com IN CNAME www.acme.com
```

However, this is incompatible with older HTTP/1.0 browsers. If you want to stay compatible, there's a different way - use A records instead, each with a different IP address, like so:

```
  www.acme.com IN A 192.100.66.1

  www.joe.acme.com IN A 192.100.66.200

  www.jane.acme.com IN A 192.100.66.201
```

This is bad because it uses extra IP addresses, a somewhat scarce resource. But if you want people with older browsers to be able to visit your sites, you still have to do it this way. Step two. If you're using the modern CNAME method of multihoming, then you can skip this step. Otherwise, using the older multiple-IP-address method you must set up IP aliases or multiple interfaces for the extra addresses. You can use ifconfig(8)'s alias command to tell the machine to answer to all of the different IP addresses. Example:

```
  ifconfig le0 www.acme.com

  ifconfig le0 www.joe.acme.com alias

  ifconfig le0 www.jane.acme.com alias
```

If your OS's version of ifconfig doesn't have an alias command, you're probably out of luck. Third and last, you must set up mini_httpd to handle the multiple hosts. The easiest way is with the -v flag. This works with either CNAME multihosting or multiple-IP multihosting. What it does is send each incoming request to a subdirectory based on the hostname it's intended for. All you have to do in order to set things up is to create those subdirectories in the directory where mini_httpd will run. With the example above, you'd do like so:

```
  mkdir www.acme.com www.joe.acme.com www.jane.acme.com
```

If you're using old-style multiple-IP multihosting, you should also create symbolic links from the numeric addresses to the names, like so:

```
  ln -s www.acme.com 192.100.66.1

  ln -s www.joe.acme.com 192.100.66.200

  ln -s www.jane.acme.com 192.100.66.201
```

This lets the older HTTP/1.0 browsers find the right subdirectory. There's an optional alternate step three if you're using multiple-IP multihosting: run a separate mini_httpd process for each hostname, using the -h flag to specify which one is which. This gives you more flexibility, since you can run each of these processes in separate directories or with different options. Example:

```
  ( cd /usr/www ; mini_httpd -h www.acme.com )

  ( cd /usr/www/joe ; mini_httpd -u joe -h www.joe.acme.com )

  ( cd /usr/www/jane ; mini_httpd -u jane -h www.jane.acme.com )
```

But remember, this multiple-process method does not work with CNAME multihosting - for that, you must use a single mini_httpd process with the -v flag.

## CUSTOM ERRORS
mini_httpd lets you define your own custom error pages for the various HTTP errors. There's a separate file for each error number, all stored in one special directory. The directory name is "errors", at the top of the web directory tree. The error files should be named "errNNN.html", where NNN is the error number. So for example, to make a custom error page for the authentication failure error, which is number 401, you would put your HTML into the file "errors/err401.html". If no custom error file is found for a given error number, then the usual built-in error page is generated.

If you're using the virtual hosts option, you can also have different custom error pages for each different virtual host. In this case you put another "errors" directory in the top of that virtual host's web tree. mini_httpd will look first in the virtual host errors directory, and then in the server-wide errors directory, and if neither of those has an appropriate error file then it will generate the built-in error.

## NON-LOCAL REFERRERS
Sometimes another site on the net will embed your image files in their HTML files, which basically means they're stealing your bandwidth. You can prevent them from doing this by using non-local referrer filtering. With this option, certain files can only be fetched via a local referrer. The files have to be referenced by a local web page. If a web page on some other site references the files, that fetch will be blocked. There are three config-file variables for this feature:

urlpat

A wildcard pattern for the URLs that should require a local referrer. This is typically just image files, sound files, and so on. For example:

```
  urlpat=**.jpg|**.gif|**.au|**.wav
```

For most sites, that one setting is all you need to enable referrer filtering.

noemptyreferrers

By default, requests with no referrer at all, or a null referrer, or a referrer with no apparent hostname, are allowed. With this variable set, such requests are disallowed.

localpat

A wildcard pattern that specifies the local host or hosts. This is used to determine if the host in the referrer is local or not. If not specified it defaults to the actual local hostname.

## SIGNALS
mini_httpd will terminate cleanly upon receipt of a number of different signals, which you can send via the standard Unix kill(1) command. Any of SIGTERM, SIGINT, or SIGUSR1 will do the trick. All requests in progress will be completed. The network socket used to accept new connections gets closed immediately, which means a fresh mini_httpd can be started up right away. This is convenient when you're rotating your log files.

In addition, a SIGHUP will attempt to close and re-open the log file. This is a little tricky to set up correctly, for instance if you are using chroot() then the log file must be within the chroot tree, but it's definitely doable.

## CERTIFICATES
If you're going to serve SSL/HTTPS you will need a server certificate. There are a bunch of companies that will issue one for you; see the lists at http://www.apache-ssl.org/#Digital_Certificates and http://www.modssl.org/docs/2.4/ssl_faq.html#ToC23

You can also create one for yourself, using the openssl tool. Step one - create the key and certificate request:

```
    openssl req -new > cert.csr
```

Step two - remove the passphrase from the key:

```
    openssl rsa -in privkey.pem -out key.pem
```

Step three - convert the certificate request into a signed certificate:

```
    openssl x509 -in cert.csr -out cert.pem -req -signkey key.pem -days 365
```

This creates four files. The ones you want are cert.pem and key.pem. You don't need cert.csr and privkey.pem, and may remove them.

## SEE ALSO
htpasswd(1), weblog_parse(1), http_get(1)

## AUTHOR
Copyright © 1999,2000 by Jef Poskanzer <jef@mail.acme.com>. All rights reserved.


title: mini_sendmail(8)

text:
# mini_sendmail(8)

## NAME
mini_sendmail - accept email on behalf of real sendmail

## SYNOPSIS
mini_sendmail [-f<name>] [-t] [-s<server>] [-p<port>] [-T<timeout>] [-v] address ...

## DESCRIPTION
With no flags, mini_sendmail reads its standard input up to an end-of-file and sends a copy of the message found there to all of the addresses listed.

The message is sent by connecting to a local SMTP server. This means mini_sendmail can be used to send email from inside a chroot(2) area.

-f

Sets the name of the "from" person (i.e. the sender of the mail).

-t

Read message for recipients. To:, Cc:, and Bcc: lines will be scanned for recipient addresses. The Bcc: line will be deleted before transmission.

-s

Specifies the SMTP server to use. Without this it uses localhost.

-p

Specifies the port to use. Without this it uses 25, the standard SMTP port.

-T

Specifies timeout - defaults to one minute.

-v

Verbose mode - shows the conversation with the SMTP server.

## SEE ALSO
sendmail(8)

## AUTHOR
Copyright © 1999 by Jef Poskanzer <jef@mail.acme.com>. All rights reserved.


minidlnad

package: minidlna

title: minidlnad(8)

summary: MiniDLNA DLNA/UPnP-AV Server

text:
# minidlnad(8)

## NAME
minidlnad - MiniDLNA DLNA/UPnP-AV Server

## SYNOPSIS
minidlnad options

## DESCRIPTION
minidlna is a lightweight but very functional DLNA/UPnP-AV server allowing easy sharing of your media files including pictures to any capable device or client on your local wired and wireless network. Common PC software like totem is a good lightweight and fast choice for Linux/BSD; more fully featured software for Linux, Windows and MAC is XBMC, also Mediahouse on Android, and any media sharing capable DVR/TV etc.

## OPTIONS
minidlna's options are normally set from the global /etc/minidlna.conf file.

```
But there may be times when you need to temporarily alter some of these options,
you can do this by running minidlna with the following command line switches.
```

-R Rescan

This forces minidlna to rescan all of the media_dir directories.

-f config_file

Run minidlna with a different configuration file than the global default.

-p port

Allows to run minidlna on a different port.

-w presentation_url

Change the default presentation url address.

-d debug

minidlna will run in the foreground with debug output.

-P pid_filename

Specify a location for the PID file.

-m model

Force minidlna to report a specific model number.

-s serial

Force minidlna to report a specific serial number.

-t notify_interval

Change the notify interval, in seconds. Defaults to 895 seconds.

-h help

Show basic switch options for running minidlna.

-V Version

Shows the program version number and exits.

## VERSION
This man page corresponds to minidlna version 1.1.0

## AUTHOR

```
minidlna developed by Justin Maggard  https://sourceforge.net/projects/minidlna/
man page written by Noel Butler <noelb@ausics.net>
```

## FILES
/usr/sbin/minidlnad

## SEE ALSO

minidlna.conf(5)


miredo

package: miredo

title: miredo(8)

summary: Teredo IPv6 tunneling for Unix

text:
# miredo(8)

## NAME
miredo - Teredo IPv6 tunneling for Unix

## SYNOPSIS
miredo [-c config_file] [-f] [-u user] [ server_name]

## DESCRIPTON
Miredo is a daemon program providing a Teredo tunnel service compatible with the "Teredo: Tunneling IPv6 over UDP through NATs" Internet proposed standard (RFC 4380). It can provide either Teredo client or Teredo relay functionality.

This is mostly useful to provide IPv6 connectivity to users behind NAT, most of which do not support IPv6 at all. Many NATs do not even support proto-41 forwarding, so it is not possible to set up a 6to4 or point-to-point IPv6-over-IPv4 tunnel through them.

A Teredo relay is an IPv6 router which forwards IPv6 packets between the IPv6 Internet and Teredo clients by encapsulating these IPv6 packets over UDP/IPv4.

A Teredo client is an IPv6-enabled host which is located behind an IPv4-only Network Address Translator (a.k.a. NAT), and encapsulates its IPv6 traffic inside UDP over IPv4 packets.

A Teredo server is a special Teredo relay which is required for Teredo clients to setup their IPv6 connectivity through Teredo. A Teredo server must have to global static subsequent IPv4 addresses. It receives packets from Teredo clients and Teredo relays on UDP port 3544.

## OPTIONS
-c config_file or --config config_file

Specify an alternate configuration file for Miredo instead of the default, /etc/miredo/miredo.conf.

-f or --foreground

Do not detach from the console. Run the program in the foreground.

-h or --help

Display some help and exit.

-u username or --user username

Override the user that the program will run as. By default, it runs as nobody.

-V or --version

Display program version and license and exit.

server_name

This optional command argument specifies a Teredo server to use. It will override any ServerAddress directive found in the configuration file. It is ignored if RelayType is not set to "client" (see miredo.conf).

## SECURITY
Miredo requires root privileges to create its IPv6 tunneling network interface, and to set it up properly. Once its initialization is complete, it will setgid and setuid (see option -u), so as to decrease the system's exposure to potential security issues. However, if Miredo runs as a Teredo client, it needs root privileges when running, to change the tunneling network interface settings automatically. To prevent possible root compromise, Miredo implements priveleges separation. The process that handles data from the network is not privileged.

While that is not specific to nor dependent on Miredo, it should be noted that Teredo connectivity allows anyone behind a NAT to obtain global public IPv6 connectivity. It might break some corporate policy. If that is an issue, outgoing UDP packets with destination port 3544 should be blocked at the perimeter firewall.

## SIGNALS
SIGHUP Force a reload of the daemon.

SIGINT, SIGTERM Shutdown the daemon.

SIGUSR1, SIGUSR2 Do nothing, might be used in future versions.

## FILES
/etc/miredo/miredo.conf

The default configuration file.

//run/miredo.pid

The process-id file.

## SEE ALSO
miredo.conf(5), miredo-server(8), ipv6(7), route(8), ip(8)

## AUTHOR
Rémi Denis-Courmont <remi at remlab dot net>

http://www.remlab.net/miredo/


miredo-checkconf

title: miredo-checkconf(8)

text:
# miredo-checkconf(8)

## NAME
miredo-checkconf - Miredo configuration file syntax checking tool

## SYNOPSIS
miredo-checkconf [config_file]

## DESCRIPTON
miredo-checkconf checks the syntax of a configuration file for Miredo. miredo-checkconf exits with an error code if the syntax was found to be incorrect, contained unused directives or if the file could not be opened.

## OPTIONS
-h or --help

Display some help and exit.

-V or --version

Display program version and exit.

config_file

This optional argument specifies the path to the configuration file to be checked. If not given, the default /etc/miredo/miredo.conf will be assumed.

## BUGS
miredo-checkconf cannot check the syntax of a configuration file for miredo-server.

## FILES
/etc/miredo/miredo.conf

The default configuration file.

## SEE ALSO
miredo.conf(5), miredo(8)

## AUTHOR
Rémi Denis-Courmont <remi at remlab dot net>

http://www.remlab.net/miredo/


miredo-server

package: miredo-server

title: miredo-server(8)

summary: Teredo server for Unix

text:
# miredo-server(8)

## NAME
miredo-server - Teredo server for Unix

## SYNOPSIS
miredo-server [-c config_file] [-f] [-u user] [server_name]

## DESCRIPTON
Miredo-server is an Unix daemon program which implements a Teredo server as specified by the "Teredo: Tunneling IPv6 over UDP through NATs" Internet proposed standard (RFC 4380).

A Teredo server is required for Teredo clients to setup their IPv6 connectivity through Teredo. A Teredo server must have two global static subsequent IPv4 addresses. It receives packets from Teredo clients and Teredo relays on UDP port 3544.

## OPTIONS
-c config_file or --config config_file

Specify an alternate configuration file for Miredo instead of the default, /etc/miredo/miredo-server.conf.

-f or --foreground

Do not detach from the console. Run the program in the foreground.

-h or --help

Display some help and exit.

-u username or --user username

Override the user that the program will run as. By default, it runs as nobody.

-V or --version

Display program version and license and exit.

## SECURITY
miredo-server requires root privileges to create open a raw IPv6 socket that is used to emit ICMPv6 Echo Request packets. Once its initialization is complete, it will setgid and setuid (see option -u), so as to

decrease the system's exposure to potential security issues.

## SIGNALS
SIGHUP Force a reload of the daemon.

SIGINT, SIGTERM Shutdown the daemon.

SIGUSR1, SIGUSR2 Do nothing, might be used in future versions.

## FILES
/etc/miredo/miredo-server.conf

The default configuration file.

//run/miredo-server.pid

The process-id file.

## SEE ALSO
miredo-server.conf(5), miredo(8), ipv6(7)

## AUTHOR
Rémi Denis-Courmont <remi at remlab dot net>

http://www.remlab.net/miredo/


mkelfImage

package: mkelfimage

title: mkelfImage(8)

text:
# mkelfImage(8)

## NAME
mkelfImage - make an elf network bootable image for linux

## SYNOPSIS
mkelfImage [--command-line=command line] [--kernel=path to vmlinux] [--ramdisk=path to ramdisk] [--output=file] [--ramdisk-base=<start addr>]

## DESCRIPTION
mkelfImage is a program that makes a elf boot image for linux kernel images. The image should work with any i386 multiboot compliant boot loader, an ELF bootloader that passes no options, a loader compliant with the linuxBIOS elf booting spec or with the linux kexec kernel patch. A key feature here is that nothing relies upon BIOS calls, but they are made when necessary. This is useful for systems running linuxbios.

## BUGS
Not all kernel parameters can be passed with the multiboot image format. ip configuration is not automatically passed to a node. The ramdisk base is hard coded to 8MB by default. This man page need to be updated.

## SEE ALSO
The kexec kernel patch. LinuxBIOS. Etherboot. The multiboot standard.

## COPYRIGHT
mkelfImage is under the GNU Public License version 2

## AUTHOR
Eric Biederman <ebiederman@lnxi.com>


updatedb

package: mlocate

title: updatedb(8)

summary: update a database for mlocate

text:
# updatedb(8)

## NAME
updatedb - update a database for mlocate

## SYNOPSIS
updatedb [OPTION]...

## DESCRIPTION
updatedb creates or updates a database used by locate(1). If the database already exists, its data is reused to avoid rereading directories that have not changed.

updatedb is usually run daily by cron(8) to update the default database.

## EXIT STATUS
updatedb returns with exit status 0 on success, 1 on error.

## OPTIONS
The PRUNE_BIND_MOUNTS, PRUNEFS, PRUNENAMES and PRUNEPATHS variables, which are modified by some of the options, are documented in detail in updatedb.conf(5).

-f, --add-prunefs FS

Add entries in white-space-separated list FS to PRUNEFS.

-n, --add-prunenames NAMES

Add entries in white-space-separated list NAMES to PRUNENAMES.

-e, --add-prunepaths PATHS

Add entries in white-space-separated list PATHS to PRUNEPATHS.

-U, --database-root PATH

Store only results of scanning the file system subtree rooted at PATH to the generated database. The whole file system is scanned by default. locate(1) outputs entries as absolute path names which don't contain symbolic links, regardless of the form of PATH.

--debug-pruning

Write debugging information about pruning decisions to standard error output.

-h, --help

Write a summary of the available options to standard output and exit successfully.

-o, --output FILE

Write the database to FILE instead of using the default database.

--prune-bind-mounts FLAG

Set PRUNE_BIND_MOUNTS to FLAG, overriding the configuration file.

--prunefs FS

Set PRUNEFS to FS, overriding the configuration file.

--prunenames NAMES

Set PRUNENAMES to NAMES, overriding the configuration file.

--prunepaths PATHS

Set PRUNEPATHS to PATHS, overriding the configuration file.

-l, --require-visibility FLAG

Set the “require file visibility before reporting it” flag in the generated database to FLAG. If FLAG is 0 or no, or if the database file is readable by "others" or it is not owned by slocate, locate(1) outputs the database entries even if the user running locate(1) could not have read the directory necessary to find out the file described by the database entry.

If FLAG is 1 or yes (the default), locate(1) checks the permissions of parent directories of each entry before reporting it to the invoking user. To make the file existence truly hidden from other users, the database group is set to slocate and the database permissions prohibit reading the database by users using other means than locate(1), which is set-gid slocate.

Note that the visibility flag is checked only if the database is owned by slocate and it is not readable by "others".

-v, --verbose

Output path names of files to standard output, as soon as they are found.

-V, --version

Write information about the version and license of locate on standard output and exit successfully.

## EXAMPLES
To create a private mlocate database as an user other than root, run

updatedb -l 0 -o db_file -U source_directory

Note that all users that can read db_file can get the complete list of files in the subtree of source_directory.

## FILES
/etc/updatedb.conf

A configuration file. See updatedb.conf(5).

/var/lib/mlocate/mlocate.db

The database updated by default.

## SECURITY
Databases built with --require-visibility no allow users to find names of files and directories of other users, which they would not otherwise be able to do.

## NOTES
The accompanying locate(1) utility was designed to be compatible to slocate and attempts to be compatible to GNU locate where possible. This is not the case for updatedb.

## AUTHOR
Miloslav Trmac <mitr@redhat.com>

## SEE ALSO
locate(1), mlocate.db(5), updatedb.conf(5)


mfscgiserv

package: moosefs-cgiserv

title: mfscgiserv(8)

text:
# mfscgiserv(8)

## NAME
mfscgiserv - start HTTP/CGI server for Moose File System monitoring

## SYNOPSIS
mfscgiserv [-H BIND_HOST] [-P BIND_PORT] [-R ROOT_PATH] [-t LOCKTIMEOUT] [-f [-v]] [ACTION]

mfscgiserv -h

## DESCRIPTION
mfscgiserv is a very simple HTTP server capable of running CGI scripts for Moose File System monitoring.

## OPTIONS
-h

print usage information and exit

-H BIND_HOST

local address to listen on (default: any)

-P BIND_PORT

port to listen on (default: 9425)

-R ROOT_PATH

local path to use as HTTP document root (default is CGIDIR set up at configure time)

-f

run in foreground, don't daemonize

-v

log requests on stderr

-t LOCKTIMEOUT

how long to wait for lockfile (in seconds; default is 60 seconds)

ACTION

is one of start, stop, restart or test. Default action is restart. The test action will yield one of two responses: "mfscgiserv pid: PID" or "mfscgiserv is not running".

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

MooseFS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 (only).

MooseFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html


mfschunkserver

package: moosefs-chunkserver

title: mfschunkserver(8)

text:
# mfschunkserver(8)

## NAME
mfschunkserver - start, restart or stop Moose File System chunkserver process

## SYNOPSIS
mfschunkserver [-c CFGFILE] [-u] [-f] [-t LOCKTIMEOUT] [ACTION]

mfschunkserver -v

mfschunkserver -h

## DESCRIPTION
mfschunkserver is the data server of Moose File System.

## OPTIONS
-v

print version information and exit

-h

print usage information and exit

-c CFGFILE

specify alternative path of configuration file (default is mfschunkserver.cfg in system configuration directory)

-u

log undefined configuration values (when default is assumed)

-f

run in foreground, don't daemonize

-t LOCKTIMEOUT

how long to wait for lockfile (in seconds; default is 60 seconds)

ACTION

is the one of start, stop, restart, reload, test or kill. Default action is restart. The test action will yield one of two responses: "mfschunkserver pid: PID" or "mfschunkserver is not running". The kill action will send a SIGKILL to the currently running chunkserver process. SIGHUP or reload action forces mfschunkserver to reload all configuration files.

## FILES
mfschunkserver.cfg

configuration file for MooseFS chunkserver process; refer to mfschunkserver.cfg(5) manual for details

mfshdd.cfg

list of directories (mountpoints) used for MooseFS storage; refer to mfshdd.cfg(5) manual for details

.mfschunkserver.lock

lock file of running MooseFS chunkserver process (created in data directory)

data.csstats

chunkserver charts state (created in data directory)

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

MooseFS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 (only).

MooseFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfsmaster(8), mfsmount(8), mfschunkserver.cfg(5), mfshdd.cfg(5)


mfschunktool

title: mfschunktool(8)

text:
# mfschunktool(8)

## NAME
mfschunktool - checks chunk integrity offline

## SYNOPSIS
mfschunktool [-f] [-r] [-n] [-e] [-x] chunk_file ...

## DESCRIPTION
mfschunktool checks chunk integrity using stored CRC checksums in chunk's header. It can also 'repair' chunk (fix stored checksums). This tool may be useful to check last written chunks after possible data corruption (power down etc.)

Options:

-f

turn on fast mode (in this mode only last block is tested - usually this is enough to find corrupted chunks)

-r

turn on repair mode (if checksums on given chunk don't match then they will be overwritten by checksums calculated using actual data)

-n

turn on name fixing mode (if the chunk file name is not correct but there is proper file header, the tool will rename given file using data stored in the header)

-e

turn on empty block crc check for 1.0 version chunks (force checking crc values for non existing blocks - may fail in case of chunks that were truncated)

-x

turn on reporting successful check (print 'OK' message when everything is correct)

## REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

## COPYRIGHT
Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o.

This file is part of MooseFS.

MooseFS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 (only).

MooseFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html

## SEE ALSO
mfschunkserver(8)