Fortinet white logo
Fortinet white logo

CLI Reference

report mail

report mail

Use this command to configure report profiles that define what information will appear in generated reports.

In addition to log files, FortiMail units require a report profile to be able to generate a report. A report profile is a group of settings that contains the report name, file format, subject matter, and other aspects that the FortiMail unit considers when generating the report.

Syntax

config report mail

edit <profile_name>

set dest-ip-type {ip-group | ip-mask}

set dest-ip-mask <destination_ipv4/mask>

set direction {all | incoming | outgoing | unknown}

set domains {all | <protected-domain_name> ...}

set file-format {html | pdf}

set period-absolute-from <start_str>

set period-absolute-to <end_str>

set period-relative {last-2-weeks | last-7-days | last-14-days | last-30-days | last-N-days | last-N-hours | last-N-weeks | last-month | last-quarter | last-week | not-used | this-month | this-quarter | this-week | this-year | today | yesterday}

set period-relative-value <n_int>

set query-status <query_str>

set recipients <recipient_email>

set schedule {daily | dates | none | weekdays}

set schedule-dates {1 2 ... 30 31}

set schedule-hour <hour_int>

set schedule-weekdays {Monday Tuesday Wednesday Thursday Friday Saturday Sunday}

set sender-domains {<domain_str>...}

end

Variable

Description

Default

<profile_name>

Enter the name of the profile.

dest-ip-mask <destination_ipv4/mask>

Enter the IP address to which reports on logged email messages are destined.

0.0.0.0/32

dest-ip-type {ip-group | ip-mask}

Enter the type of the IP address for sending reports on logged email messages.

ip-mask

direction {all | incoming | outgoing | unknown}

Enter one of the following:

  • all: Report on both incoming and outgoing email.

  • incoming: Report only on email whose recipient is a member of a protected domain.

  • outgoing: Report only on email whose recipient is not a member of a protected domain.

  • unknown: Report on email that does not have a recipient domain name.

both

domains {all | <protected-domain_name> ...}

Enter either all to include all protected domains in the report, or enter a list of one or more protected domains.

all

file-format {html | pdf}

Enter the file format of the generated report.

pdf

period-absolute-from <start_str>

Enter the beginning of the time range in the format yyyy-mm-dd-hh, where yyyy is the year, mm is the month, dd is the day, and hh is the hour in 24-hour clock format.

For example, entering 2008-10-24-09 includes log messages as early as 9 AM on October 24, 2008.

period-absolute-to <end_str>

Enter the end of the time range in the format yyyy-mm-dd-hh, where yyyy is the year, mm is the month, dd is the day, and hh is the hour in 24-hour clock format.

For example, entering 2009-10-24-17 includes log messages as late as 5 PM on October 24, 2009.

period-relative {last-2-weeks | last-7-days | last-14-days | last-30-days | last-N-days | last-N-hours | last-N-weeks | last-month | last-quarter | last-week | not-used | this-month | this-quarter | this-week | this-year | today | yesterday}

Enter the time span of log messages from which to generate the report. If you entered last-N-days, last-N-hours, or last-N-weeks also configure period-relative-value <n_int>.

period-relative-value <n_int>

If you entered last-N-days, last-N-hours, or last-N-weeks as the value for period-relative, enter the value of n.

query-status <query_str>

Enter the name of a query whose result you want to include in the report, such as Mail_Stat_Viruses.

To display a list of available query names, enter a question mark ( ? )

recipients <recipient_email>

Enter a list of one or more recipient email addresses that will receive the report generated from the report profile. Separate each recipient with a comma ( , ).

schedule {daily | dates | none | weekdays}

Enter a value to schedule when the report is automatically generated, or to disable generating reports on schedule if you want to initiate them only manually.

schedule-dates {1 2 ... 30 31}

Enter the dates to generate the reports.

schedule-hour <hour_int>

If you want to automatically generate the report according to a schedule, enter the hour of the day, according to a 24-hour clock, at which you want to generate the report. Also configure the days on which you want to generate the report.

For example, to generate reports at 5 PM, you would enter 17.

schedule-weekdays {Monday Tuesday Wednesday Thursday Friday Saturday Sunday}

Enter the days to generate the reports.

sender-domains {<domain_str>...}

Enter the selected sender domain names (empty means all domains).

Related topics

log alertemail setting

report mail

report mail

Use this command to configure report profiles that define what information will appear in generated reports.

In addition to log files, FortiMail units require a report profile to be able to generate a report. A report profile is a group of settings that contains the report name, file format, subject matter, and other aspects that the FortiMail unit considers when generating the report.

Syntax

config report mail

edit <profile_name>

set dest-ip-type {ip-group | ip-mask}

set dest-ip-mask <destination_ipv4/mask>

set direction {all | incoming | outgoing | unknown}

set domains {all | <protected-domain_name> ...}

set file-format {html | pdf}

set period-absolute-from <start_str>

set period-absolute-to <end_str>

set period-relative {last-2-weeks | last-7-days | last-14-days | last-30-days | last-N-days | last-N-hours | last-N-weeks | last-month | last-quarter | last-week | not-used | this-month | this-quarter | this-week | this-year | today | yesterday}

set period-relative-value <n_int>

set query-status <query_str>

set recipients <recipient_email>

set schedule {daily | dates | none | weekdays}

set schedule-dates {1 2 ... 30 31}

set schedule-hour <hour_int>

set schedule-weekdays {Monday Tuesday Wednesday Thursday Friday Saturday Sunday}

set sender-domains {<domain_str>...}

end

Variable

Description

Default

<profile_name>

Enter the name of the profile.

dest-ip-mask <destination_ipv4/mask>

Enter the IP address to which reports on logged email messages are destined.

0.0.0.0/32

dest-ip-type {ip-group | ip-mask}

Enter the type of the IP address for sending reports on logged email messages.

ip-mask

direction {all | incoming | outgoing | unknown}

Enter one of the following:

  • all: Report on both incoming and outgoing email.

  • incoming: Report only on email whose recipient is a member of a protected domain.

  • outgoing: Report only on email whose recipient is not a member of a protected domain.

  • unknown: Report on email that does not have a recipient domain name.

both

domains {all | <protected-domain_name> ...}

Enter either all to include all protected domains in the report, or enter a list of one or more protected domains.

all

file-format {html | pdf}

Enter the file format of the generated report.

pdf

period-absolute-from <start_str>

Enter the beginning of the time range in the format yyyy-mm-dd-hh, where yyyy is the year, mm is the month, dd is the day, and hh is the hour in 24-hour clock format.

For example, entering 2008-10-24-09 includes log messages as early as 9 AM on October 24, 2008.

period-absolute-to <end_str>

Enter the end of the time range in the format yyyy-mm-dd-hh, where yyyy is the year, mm is the month, dd is the day, and hh is the hour in 24-hour clock format.

For example, entering 2009-10-24-17 includes log messages as late as 5 PM on October 24, 2009.

period-relative {last-2-weeks | last-7-days | last-14-days | last-30-days | last-N-days | last-N-hours | last-N-weeks | last-month | last-quarter | last-week | not-used | this-month | this-quarter | this-week | this-year | today | yesterday}

Enter the time span of log messages from which to generate the report. If you entered last-N-days, last-N-hours, or last-N-weeks also configure period-relative-value <n_int>.

period-relative-value <n_int>

If you entered last-N-days, last-N-hours, or last-N-weeks as the value for period-relative, enter the value of n.

query-status <query_str>

Enter the name of a query whose result you want to include in the report, such as Mail_Stat_Viruses.

To display a list of available query names, enter a question mark ( ? )

recipients <recipient_email>

Enter a list of one or more recipient email addresses that will receive the report generated from the report profile. Separate each recipient with a comma ( , ).

schedule {daily | dates | none | weekdays}

Enter a value to schedule when the report is automatically generated, or to disable generating reports on schedule if you want to initiate them only manually.

schedule-dates {1 2 ... 30 31}

Enter the dates to generate the reports.

schedule-hour <hour_int>

If you want to automatically generate the report according to a schedule, enter the hour of the day, according to a 24-hour clock, at which you want to generate the report. Also configure the days on which you want to generate the report.

For example, to generate reports at 5 PM, you would enter 17.

schedule-weekdays {Monday Tuesday Wednesday Thursday Friday Saturday Sunday}

Enter the days to generate the reports.

sender-domains {<domain_str>...}

Enter the selected sender domain names (empty means all domains).

Related topics

log alertemail setting