## mailfront

# Plugin: add-received

This plugin adds headers to the start of the message as detailed below.

## Configuration

`$FIXUP_RECEIVED_HOST`
  Received host to match
`$FIXUP_RECEIVED_IP`
  Received IP to match
`$HEADER_ADD`
  Additional headers
`$PROTO`
  This and the following four environment variables are inserted into their respective parts in the standard `Received:` header described below.
`${$PROTO}LOCALHOST`
`${$PROTO}LOCALIP`
`${$PROTO}REMOTEHOST`
`${$PROTO}REMOTEIP`

## Sender Action

None

## Recipient Action

None

## Data Action

If `$FIXUP_RECEIVED_HOST` and `$FIXUP_RECEIVED_IP` are set and do not exactly match the current local host and IP, a `Received:` header is added to show a transition from one to the other. Then a standard `Received:` header is added. Finally, if `$HEADER_ADD` is set, its contents are added to the message headers.

The standard `Received:` header has the following format:

    Received: from helo_domain (remotehost [remoteip]
            by localhost ([remoteip])
            with protocol via transport; date

## Message Action

None