Fortinet white logo
Fortinet white logo

CLI Reference

archive account

archive account

Use this command to configure email archiving accounts.

This command applies only if an email archiving policy is enabled.

Syntax

config archive account

edit <account_name>

[set comment "<comment_str>"]

set status {enable | disable}

set password <password_str>

set forward-address <recipient_email>

set forward-host <mta_fqdn>

set forward-as-attachment {enable | disable}

set index-type {full | header | none}

set imap-access {enable | disable}

set rotation-size <size_int>

set rotation-time <time_int>

set rotation-hour <hour_int>

set quota-full {overwrite | noarchive}

set destination {local | remote}

set local-quota <quota_int>

set local-quota-cache <cache_int>

set retention-period <time_int>

set remote-protocol {ftp | sftp}

set remote-host {<server_ipv4>[:<port_int>] | <server_fqdn>[:<port_int>]}

set remote-username <user_str>

set remote-password <password_str>

set remote-directory <path_str>

end

Variable

Description

Default

<account_name>

Enter the user name of the email archiving account. Do not include spaces in the name.

archive

comment "<comment_str>"

Enter a description or comment.

destination {local | remote}

Select where to store email archives, either:

local

forward-address <recipient_email>

If you require it, enter an email address where FortiMail will forward a copy when it archives an email. Also configure forward-host <mta_fqdn> and forward-as-attachment {enable | disable}.

If no forwarding address exists, then FortiMail will not forward email when it archives it.

forward-host <mta_fqdn>

Enter the FQDN of the MTA to use when forwarding a copy of the archived email.

This setting applies only if forward-address <recipient_email> is not empty.

forward-as-attachment {enable | disable}

Enable or disable forwarding a copy of the archived email as an attachment.

This setting applies only if forward-address <recipient_email> is not empty.

disable

imap-access {enable | disable}

Enable or disable IMAP service for access to locally stored email archives.

Alternatively, administrators can access locally stored email archives through the administrative GUI. See the documentation for email archives in the FortiMail Administration Guide.

disable

index-type {full | header | none}

Select whether to index the email archives for faster search, and what part of each email is indexed:

  • none: Email is not indexed.

  • header: Message headers are indexed.

  • full: The entire email is indexed.

none

local-quota <quota_int>

Enter the disk space usage quota, in gigabytes (GB), for local storage of the email archives.

The valid range is from 1 to a number that varies by the type of local storage:

  • NAS server: No limit.

  • Local hard disk or RAID: Total quota for all of the archiving accounts cannot exceed 80% of the total mail partition. If this quota is met, or if 95% of the total disk space is used, FortiMail will automatically remove the oldest email archive folder in order to free space for the new archive.

5

local-quota-cache <cache_int>

Enter the disk space usage quota, in gigabytes (GB), for local cache before remote storage of the email archives.

The valid range has the same limits as local-quota <quota_int>.

5

password <password_str>

Enter the password for the email archiving account.

quota-full {overwrite | noarchive}

Select what FortiMail should do if it runs out of disk space (local-quota <quota_int>), either:

  • overwrite: Removes the oldest email archive folder in order to make space for the new archive.

  • noarchive: Stop email archiving.

Whenever an archiving account reaches its disk quota, FortiMail may send an alert email to the administrator. See log alertemail recipient.

Note: You cannot manually delete specific archived email messages. The only way to delete all of the email archives is to format the mail data disk.

overwrite

remote-directory <path_str>

Enter the directory path on the remote storage server where FortiMail will store archived email, such as /home/FortiMail/email-archives.

remote-host {<server_ipv4>[:<port_int>] | <server_fqdn>[:<port_int>]}

Enter the IP address or fully qualified domain name of the remote server that will store email archives. If the server listens on a non-IANA-standard port number (depending on the selection in remote-protocol {ftp | sftp}), also append the port number.

remote-password <password_str>

Enter the password for the user name on the remote storage server.

remote-protocol {ftp | sftp}

Select which protocol, either SFTP or FTP, FortiMail will use to transfer email archives to the remote storage server.

sftp

remote-username <user_str>

Enter the user name of the account that FortiMail will use to log into the remote storage server.

retention-period <time_int>

Enter how long, in days, to keep the archive folders. Older folders will be removed.

The valid range is 0 to 3650 days. 0 effectively disables the retention limit; archive folders will not be removed.

365

rotation-hour <hour_int>

Enter the hour of the day to start the mailbox rotation. See also rotation-time <time_int>.

0

rotation-size <size_int>

Enter the maximum size of the current email archiving mail folder in megabytes (MB).

When the mail folder reaches either the rotation size or time specified, whichever comes first, the email archiving mail folder is automatically renamed. FortiMail generates a new mail folder, where it continues saving newer email archives.

The valid range is from 10 to 800 MB.

200

rotation-time <time_int>

Enter the maximum age of the current email archiving mail folder in days.

When the mail folder reaches either the rotation size or time specified, whichever comes first, the email archiving mail folder is automatically renamed. FortiMail generates a new mail folder, where it continues saving newer email archives.

The valid range is from 1 to 365 days.

See also rotation-hour <hour_int>.

7

status {enable | disable}

Enable or disable the email archiving account.

enable

Related topics

archive policy

archive exempt-policy

archive journal

archive account

archive account

Use this command to configure email archiving accounts.

This command applies only if an email archiving policy is enabled.

Syntax

config archive account

edit <account_name>

[set comment "<comment_str>"]

set status {enable | disable}

set password <password_str>

set forward-address <recipient_email>

set forward-host <mta_fqdn>

set forward-as-attachment {enable | disable}

set index-type {full | header | none}

set imap-access {enable | disable}

set rotation-size <size_int>

set rotation-time <time_int>

set rotation-hour <hour_int>

set quota-full {overwrite | noarchive}

set destination {local | remote}

set local-quota <quota_int>

set local-quota-cache <cache_int>

set retention-period <time_int>

set remote-protocol {ftp | sftp}

set remote-host {<server_ipv4>[:<port_int>] | <server_fqdn>[:<port_int>]}

set remote-username <user_str>

set remote-password <password_str>

set remote-directory <path_str>

end

Variable

Description

Default

<account_name>

Enter the user name of the email archiving account. Do not include spaces in the name.

archive

comment "<comment_str>"

Enter a description or comment.

destination {local | remote}

Select where to store email archives, either:

local

forward-address <recipient_email>

If you require it, enter an email address where FortiMail will forward a copy when it archives an email. Also configure forward-host <mta_fqdn> and forward-as-attachment {enable | disable}.

If no forwarding address exists, then FortiMail will not forward email when it archives it.

forward-host <mta_fqdn>

Enter the FQDN of the MTA to use when forwarding a copy of the archived email.

This setting applies only if forward-address <recipient_email> is not empty.

forward-as-attachment {enable | disable}

Enable or disable forwarding a copy of the archived email as an attachment.

This setting applies only if forward-address <recipient_email> is not empty.

disable

imap-access {enable | disable}

Enable or disable IMAP service for access to locally stored email archives.

Alternatively, administrators can access locally stored email archives through the administrative GUI. See the documentation for email archives in the FortiMail Administration Guide.

disable

index-type {full | header | none}

Select whether to index the email archives for faster search, and what part of each email is indexed:

  • none: Email is not indexed.

  • header: Message headers are indexed.

  • full: The entire email is indexed.

none

local-quota <quota_int>

Enter the disk space usage quota, in gigabytes (GB), for local storage of the email archives.

The valid range is from 1 to a number that varies by the type of local storage:

  • NAS server: No limit.

  • Local hard disk or RAID: Total quota for all of the archiving accounts cannot exceed 80% of the total mail partition. If this quota is met, or if 95% of the total disk space is used, FortiMail will automatically remove the oldest email archive folder in order to free space for the new archive.

5

local-quota-cache <cache_int>

Enter the disk space usage quota, in gigabytes (GB), for local cache before remote storage of the email archives.

The valid range has the same limits as local-quota <quota_int>.

5

password <password_str>

Enter the password for the email archiving account.

quota-full {overwrite | noarchive}

Select what FortiMail should do if it runs out of disk space (local-quota <quota_int>), either:

  • overwrite: Removes the oldest email archive folder in order to make space for the new archive.

  • noarchive: Stop email archiving.

Whenever an archiving account reaches its disk quota, FortiMail may send an alert email to the administrator. See log alertemail recipient.

Note: You cannot manually delete specific archived email messages. The only way to delete all of the email archives is to format the mail data disk.

overwrite

remote-directory <path_str>

Enter the directory path on the remote storage server where FortiMail will store archived email, such as /home/FortiMail/email-archives.

remote-host {<server_ipv4>[:<port_int>] | <server_fqdn>[:<port_int>]}

Enter the IP address or fully qualified domain name of the remote server that will store email archives. If the server listens on a non-IANA-standard port number (depending on the selection in remote-protocol {ftp | sftp}), also append the port number.

remote-password <password_str>

Enter the password for the user name on the remote storage server.

remote-protocol {ftp | sftp}

Select which protocol, either SFTP or FTP, FortiMail will use to transfer email archives to the remote storage server.

sftp

remote-username <user_str>

Enter the user name of the account that FortiMail will use to log into the remote storage server.

retention-period <time_int>

Enter how long, in days, to keep the archive folders. Older folders will be removed.

The valid range is 0 to 3650 days. 0 effectively disables the retention limit; archive folders will not be removed.

365

rotation-hour <hour_int>

Enter the hour of the day to start the mailbox rotation. See also rotation-time <time_int>.

0

rotation-size <size_int>

Enter the maximum size of the current email archiving mail folder in megabytes (MB).

When the mail folder reaches either the rotation size or time specified, whichever comes first, the email archiving mail folder is automatically renamed. FortiMail generates a new mail folder, where it continues saving newer email archives.

The valid range is from 10 to 800 MB.

200

rotation-time <time_int>

Enter the maximum age of the current email archiving mail folder in days.

When the mail folder reaches either the rotation size or time specified, whichever comes first, the email archiving mail folder is automatically renamed. FortiMail generates a new mail folder, where it continues saving newer email archives.

The valid range is from 1 to 365 days.

See also rotation-hour <hour_int>.

7

status {enable | disable}

Enable or disable the email archiving account.

enable

Related topics

archive policy

archive exempt-policy

archive journal