GNU Mailutils Manual (split by node):   Section:   Chapter:FastBack: Programs   Up: mda   FastForward: Libraries   Contents: Table of ContentsIndex: Function Index

3.12.6 Forwarding

A forward file is a special file in the user’s home directory that contains the email address of the mailbox where the user wants to forward his mail. Normally, forward files are processed by MTA. However, there are some MTA that lack this feature. One of them is MeTA1.

Mda provides a forwarding feature that is useful to compensate the lack of it. This feature is controlled by the forward section in the configuration file:

forward {
  # Process forward file.
  file name;
  # Configure safety checks for the forward file.
  file-checks (list);
}

The name of the forward file is given by the file statement in the forward section. A common usage is:

forward {
  file .forward;
}  

The forward file is always searched in the recipient home directory.

Before actually using the forward file, a number of safety checks are performed on it. If the file fails to pass one of these checks, no forwarding is performed and the message is delivered as usual. These checks are configured using the forward.file-checks statement:

forward {
  file .forward;
  file-checks (list);
}  

Its argument is a list of the following keywords:

groupwritablefile
file_iwgrp

The file must not be group writable.

worldwritablefile
file_iwoth

The file must not be world writable.

linkedfileinwritabledir
link

The file cannot be a symlink in a writable directory.

fileingroupwritabledir
dir_iwgrp

The file cannot reside in a group writable directory.

fileinworldwritabledir
dir_iwoth

The file cannot reside in a world writable directory.

all

All of the above checks.

The default is ‘file-checks all’.

Each of these keywords may be prefixed by ‘no’ to disable this particular check. For example:

forward {
  file-checks (nodir_iwoth, nodir_iwgrp);
  file .forward;
}  

GNU Mailutils Manual (split by node):   Section:   Chapter:FastBack: Programs   Up: mda   FastForward: Libraries   Contents: Table of ContentsIndex: Function Index