Fortinet white logo
Fortinet white logo

CLI Reference

profile mail-routing

profile mail-routing

Use this command to configure email routing profiles, including MTA advanced control.

Syntax

config profile mail-routing

edit <profile_name>

config entry

edit <id_entry>

set recipient-pattern <string>

set relay-to-host <string>

set relay-to-port <integer>

set relay-type {host | mx-lookup | mx-lookup-matched-domain | relay-host}

set sender-pattern <string>

next

end

next

end

Variable

Description

Default

recipient-pattern <string>

Enter the recipient pattern.

relay-to-host <string>

Enter a pre-defined relay host.

relay-to-port <integer>

Enter the SMTP port number.

25

relay-type {host | mx-lookup | mx-lookup-matched-domain | relay-host}

Set the relay type:

  • host: Relay matched session to specified SMTP server.

  • mx-lookup: Query the DNS server’s MX record of a domain name you specify for the FQDN or IP address of the SMTP server.

    If there are multiple MX records, FortiMail will load balance between them.

  • mx-lookup-match-domain: Relay through the MX record lookup of the matched recipient domain.

  • relay-host: Relay to a pre-defined relay host.

host

sender-pattern <string> Enter the sender pattern.

profile mail-routing

profile mail-routing

Use this command to configure email routing profiles, including MTA advanced control.

Syntax

config profile mail-routing

edit <profile_name>

config entry

edit <id_entry>

set recipient-pattern <string>

set relay-to-host <string>

set relay-to-port <integer>

set relay-type {host | mx-lookup | mx-lookup-matched-domain | relay-host}

set sender-pattern <string>

next

end

next

end

Variable

Description

Default

recipient-pattern <string>

Enter the recipient pattern.

relay-to-host <string>

Enter a pre-defined relay host.

relay-to-port <integer>

Enter the SMTP port number.

25

relay-type {host | mx-lookup | mx-lookup-matched-domain | relay-host}

Set the relay type:

  • host: Relay matched session to specified SMTP server.

  • mx-lookup: Query the DNS server’s MX record of a domain name you specify for the FQDN or IP address of the SMTP server.

    If there are multiple MX records, FortiMail will load balance between them.

  • mx-lookup-match-domain: Relay through the MX record lookup of the matched recipient domain.

  • relay-host: Relay to a pre-defined relay host.

host

sender-pattern <string> Enter the sender pattern.