Fortinet Document Library

Version:

Version:

Version:

Version:

Version:

Version:


Table of Contents

CLI Reference

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-mask <ip/netmask_str>

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

set direction {both | incoming | outgoing}

set domains {all | <protected-domain_str>}

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_str>

set schedule {daily | dates | none | weekdays}

set schedule-dates <dates_str>

set schedule-hour <time_int>

set schedule-weekdays <days_str>

set sender-domains

end

Variable

Description

Default

<profile_name>

Enter the name of the report profile.

 

dest-ip-mask <ip/netmask_str>

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 {both | incoming | outgoing}

Enter one of the following:

both: 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.

both

domains {all | <protected-domain_str>}

Enter either ALL to include all protected domains in the report, or enter a list of one or more protected domains. Separate each protected domain with a comma ( , ).

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_str>

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.

daily: Generate the report every day.

dates: Generate the report on certain dates in the month. Also configure schedule-dates <dates_str>.

none: If you do not want to automatically generate the report according to a schedule, enter none.
You can still manually initiate the FortiMail unit to generate a report at any time.

weekdays: Generate the report on certain days of the week. Also configure schedule-weekdays <days_str>.

 

schedule-dates <dates_str>

Enter the dates to generate the reports. Separate each date with a comma ( , ). For example, to generate a report on the first and fourteenth of each month, you would enter 1,14.

 

schedule-hour <time_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 <days_str>

Enter the days to generate the reports. Separate each day with a comma ( , ). For example, to generate a report on Friday and Wednesday, you would enter wednesday,friday.

 

sender-domains

Enter the selected sender domain names (empty means ALL)

 

Related topics

log alertemail setting

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-mask <ip/netmask_str>

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

set direction {both | incoming | outgoing}

set domains {all | <protected-domain_str>}

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_str>

set schedule {daily | dates | none | weekdays}

set schedule-dates <dates_str>

set schedule-hour <time_int>

set schedule-weekdays <days_str>

set sender-domains

end

Variable

Description

Default

<profile_name>

Enter the name of the report profile.

 

dest-ip-mask <ip/netmask_str>

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 {both | incoming | outgoing}

Enter one of the following:

both: 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.

both

domains {all | <protected-domain_str>}

Enter either ALL to include all protected domains in the report, or enter a list of one or more protected domains. Separate each protected domain with a comma ( , ).

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_str>

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.

daily: Generate the report every day.

dates: Generate the report on certain dates in the month. Also configure schedule-dates <dates_str>.

none: If you do not want to automatically generate the report according to a schedule, enter none.
You can still manually initiate the FortiMail unit to generate a report at any time.

weekdays: Generate the report on certain days of the week. Also configure schedule-weekdays <days_str>.

 

schedule-dates <dates_str>

Enter the dates to generate the reports. Separate each date with a comma ( , ). For example, to generate a report on the first and fourteenth of each month, you would enter 1,14.

 

schedule-hour <time_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 <days_str>

Enter the days to generate the reports. Separate each day with a comma ( , ). For example, to generate a report on Friday and Wednesday, you would enter wednesday,friday.

 

sender-domains

Enter the selected sender domain names (empty means ALL)

 

Related topics

log alertemail setting