forward(5) — Linux manual page

NAME | DESCRIPTION | FILES | EXAMPLES | SEE ALSO | COLOPHON

FORWARD(5)                 File Formats Manual                FORWARD(5)

NAME         top

       forward — email forwarding information file

DESCRIPTION         top

       Users may put a .forward file in their home directory.  If this
       file exists, smtpd(8) forwards email to the destinations
       specified therein.

       A .forward file contains a list of expansion values, as described
       in aliases(5).  Each expansion value should be on a line by
       itself.  However, the .forward mechanism differs from the aliases
       mechanism in that it disallows file inclusion (:include:) and it
       performs expansion under the user ID of the .forward file owner.

       Permissions on the .forward file are very strict and expansion is
       rejected if the file is group or world-writable; if the home
       directory is group writeable; or if the file is not owned by the
       user.

       Users should avoid editing the .forward file directly, to prevent
       delivery failures from occurring if a message arrives while the
       file is not fully written.  The best option is to use a temporary
       file and use the mv(1) command to atomically overwrite the former
       .forward.  Alternatively, setting the sticky(8) bit on the home
       directory will cause the .forward lookup to return a temporary
       failure, causing mails to be deferred.

FILES         top

       ~/.forward     Email forwarding information.

EXAMPLES         top

       The following file forwards mail to “[email protected]”, and pipes
       the same mail to “examplemda”.

             # empty lines are ignored

             [email protected]        # anything after # is ignored
             "|/path/to/examplemda"

SEE ALSO         top

       aliases(5), smtpd(8)

COLOPHON         top

       This page is part of the OpenSMTPD (a FREE implementation of the
       server-side SMTP protocol) project.  Information about the
       project can be found at https://www.opensmtpd.org/.  If you have
       a bug report for this manual page, see
       ⟨https://github.com/OpenSMTPD/OpenSMTPD/issues⟩.  This page was
       obtained from the project's upstream Git repository
       ⟨https://github.com/OpenSMTPD/OpenSMTPD.git⟩ on 2024-06-14.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2024-06-09.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       [email protected]

GNU                         February 13, 2021                 FORWARD(5)

Pages that refer to this page: mailaddr(7)