Sends a report to the specified E-Mail address which contains the following information:
- Total count of processed emails.
- Total count of sent emails.
- Total count of received emails.
- Total count of rejected emails.
- Total count of rejected emails for each Filter and Action.
- Total count of mails to unknown
This version accesses the NoSpamProxy database directly and is much faster than the other version. The drawback is that most NoSpamProxy installations do not allow remote access to the Database so this script needs to be run locally on the Intranet Role.
Download the whole folder (including the SQL scripts) and then run the following command:
Get-RejectionReport -SMTPHost -ReportRecipient -ReportSender [-ReportSubject] [-NumberOfDaysToReport]`
- SMTPHost: Mandatory. Specifies the SMTP Host which will be used to send the email.
- ReportRecipient: Mandatory. Specifies the Recipient of the email.
- ReportSender: Mandatory. Specifies the Sender of the email.
- ReportSubject: Optional. Specifies the Subject of the email. Default value is "Auswertung".
- NumberOfDaysToReport: Optional. Specifies the Number of days to report. Default value is "7".
- SqlServer: Optional. The name of the Database server (including instance name, if any). Defaults to (local)\NoSpamProxyDB.
- Database: Optional. Name the Database to query. Defaults to "NoSpamProxyAddressSynchronization".
- Credential: Optional. Username and password for the SQL authentication on the database server. If not set, Integrated authentication is used, which is the default.
- TreatUnknownAsSpam: Optional. When true, mails to unknown recipients are treatet as spam mails. Defaults to
$true
. - TopAddressesCount: Optional. How many Addresses to include in the top Senders/Recipients/Spammers. Defaults to 10
- ExcludeFromTopAddresses: Optional. Specify addresses to ignore when evaluating top Senders/Recipients. Useful for dropping obvious addresses from the list to get a more informative statistic
.\Get-RejectionReport.ps1 -SMTPHost mail.example.com -ReportRecipient [email protected]' -ReportSender "NoSpamProxy Report Sender <nospamproxy@example.com>"
This Script works for NoSpamProxy version 12.x and higher.