Fortinet white logo
Fortinet white logo

CLI Reference

mail

mail

Use this command to configure mail servers on your FortiAnalyzer unit.

Syntax

config system mail

edit <id>

set auth {enable | disable}

set auth-type {certificate | psk}

set from <string>

set local-cert {Fortinet_Local | Fortinet_Local2}

set passwd <passwd>

set port <integer>

set secure-option {default | none | smtps | starttls}

set server <string>

set user <string>

end

Variable

Description

<id>

Enter the mail service ID of the entry you would like to edit or type a new name to create an entry (character limit = 63).

auth {enable | disable}

Enable/disable authentication (default = disable).

auth-type {certificate | psk}

Select the SMTP authentication type (default = psk):

  • certificate: Use local certificate to authenticate.

  • psk: Use username and password to authenticate.

from <string>

Set the SMTP default username for sending.

local-cert {Fortinet_Local | Fortinet_Local2}

Choose from the two available local certificates.

This variable is available only when the auth-type is certificate.

passwd <passwd>

Enter the SMTP account password value (character limit = 127).

This variable is available only when the auth-type is psk.

port <integer>

Enter the SMTP server port (1 - 65535, default = 25).

secure-option {default | none | smtps | starttls}

Select the communication secure option:

  • default:Try STARTTLS, proceed as plain text communication otherwise (default).
  • none: Communication will be in plain text format.
  • smtps: Communication will be protected by SMTPS.
  • starttls: Communication will be protected by STARTTLS.

server <string>

Enter the SMTP server name.

user <string>

Enter the SMTP account user name.

This variable is available only when the auth-type is psk.

mail

mail

Use this command to configure mail servers on your FortiAnalyzer unit.

Syntax

config system mail

edit <id>

set auth {enable | disable}

set auth-type {certificate | psk}

set from <string>

set local-cert {Fortinet_Local | Fortinet_Local2}

set passwd <passwd>

set port <integer>

set secure-option {default | none | smtps | starttls}

set server <string>

set user <string>

end

Variable

Description

<id>

Enter the mail service ID of the entry you would like to edit or type a new name to create an entry (character limit = 63).

auth {enable | disable}

Enable/disable authentication (default = disable).

auth-type {certificate | psk}

Select the SMTP authentication type (default = psk):

  • certificate: Use local certificate to authenticate.

  • psk: Use username and password to authenticate.

from <string>

Set the SMTP default username for sending.

local-cert {Fortinet_Local | Fortinet_Local2}

Choose from the two available local certificates.

This variable is available only when the auth-type is certificate.

passwd <passwd>

Enter the SMTP account password value (character limit = 127).

This variable is available only when the auth-type is psk.

port <integer>

Enter the SMTP server port (1 - 65535, default = 25).

secure-option {default | none | smtps | starttls}

Select the communication secure option:

  • default:Try STARTTLS, proceed as plain text communication otherwise (default).
  • none: Communication will be in plain text format.
  • smtps: Communication will be protected by SMTPS.
  • starttls: Communication will be protected by STARTTLS.

server <string>

Enter the SMTP server name.

user <string>

Enter the SMTP account user name.

This variable is available only when the auth-type is psk.