{"id":23592594,"url":"https://github.com/filipnet/postfix-bounce-report","last_synced_at":"2025-05-07T19:22:39.247Z","repository":{"id":134496175,"uuid":"292637580","full_name":"filipnet/postfix-bounce-report","owner":"filipnet","description":"Creates an HTML report of blocked e-mail messages from Postfix","archived":false,"fork":false,"pushed_at":"2024-11-08T10:19:10.000Z","size":95,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T13:18:04.434Z","etag":null,"topics":["bash","blacklist","ddns-blacklist","email","html","html-report","linux","mailserver","perl","postfix","postscreen","recipients","reject","submission"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filipnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-03T17:34:15.000Z","updated_at":"2024-11-08T10:19:13.000Z","dependencies_parsed_at":"2024-11-08T11:22:05.244Z","dependency_job_id":"8e83a13a-e349-403d-be39-34ecd5d80736","html_url":"https://github.com/filipnet/postfix-bounce-report","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Fpostfix-bounce-report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Fpostfix-bounce-report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Fpostfix-bounce-report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Fpostfix-bounce-report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipnet","download_url":"https://codeload.github.com/filipnet/postfix-bounce-report/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252941515,"owners_count":21828885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","blacklist","ddns-blacklist","email","html","html-report","linux","mailserver","perl","postfix","postscreen","recipients","reject","submission"],"created_at":"2024-12-27T08:14:48.040Z","updated_at":"2025-05-07T19:22:39.220Z","avatar_url":"https://github.com/filipnet.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postfix-bounce-report\nThe script generates an HTML report based on rejected messages. Another script continuously writes \"recipient addresses\" into a list. If an incoming message is rejected and is present in the list of \"recipients\", the subject of email is changing.\n\n\u003c!-- TOC --\u003e\n\n- [postfix-bounce-report](#postfix-bounce-report)\n    - [FEATURES](#features)\n    - [EXAMPLE](#example)\n    - [HOW TO INSTALL](#how-to-install)\n        - [PREREQUISITES PERL INTERPRETER AND XML EXTENSION](#prerequisites-perl-interpreter-and-xml-extension)\n        - [CLONE REPOSITORY](#clone-repository)\n    - [HOW TO USE](#how-to-use)\n        - [CONFIGURATION](#configuration)\n        - [CREATE SCHEDULED TASKS](#create-scheduled-tasks)\n    - [ADDITIONAL INFORMATION](#additional-information)\n    - [LICENSE](#license)\n\n\u003c!-- /TOC --\u003e\n\n## FEATURES\n- build_submission_recipients.sh\t: Analyzes the postfix maillog for outgoing e-mails and continuously creates a list of recipients\n- postfix-bounce-report.sh\t\t: Analyzes the postfix logfile for bounced emails by DDNS blacklist, optionaly validate/cross check FROM-value against submission list. Script also generates HTML report and send via sendmail\n- The subject is regular \"[INFO] Postfix Bounce Report\", a threshold value can be parameterized where the subject is changed to [WARNING]. For a match with the submission recipients list a [CRITIAL] is created\n- Since a spoofed e-mail address would lead to a CRITICAL, the definition of toplevel domains has been implemented in version 1.1.2. Spoofed addresses are thus recognized and marked accordingly in the HTML report.\n\n## EXAMPLE\n\u003cimg src=\"images/postfix-bounce-report-html-example.png\" alt=\"Postfix Bounce Report HTML Example\" width=\"100%\"/\u003e\n\n## HOW TO INSTALL\n\n### PREREQUISITES PERL INTERPRETER AND XML EXTENSION\n\nInstall XML library to read the XML files\n- Once System is fully updated, you can install libxml2-utils package through command:\n - RedHat-based: ```dnf install perl libxml2-utils```\n - Debian-based: ```apt install perl libxml2-utils```\n\nCheck Perl Version\n- Since the package is installed now, you can check the Perl version through ```perl -v``` command.\n\n### CLONE REPOSITORY\nChange to the root-directory of your linux-system: ```cd ~```\n\nClone the repository to this directory: ```git clone https://github.com/filipnet/postfix-bounce-report.git```\nAfterwards you will find a new folder called \"postfix-bounce-report\" inside your root-directory\nTo make the scripts universally applicable, some settings like email addresses are stored in a separate ```config.xml``` and must be adjusted here, the existing ```config.xml.sample``` renamed and adjusted before.\nPlease note that the scripts must be made executable before the first use. ```chmod +x ~/*.sh```\n\n## HOW TO USE\n\n### CONFIGURATION\nRename the file ```config.xml.sample``` to ```config.xml``` and adapt it to your system environment.\n```\ncd ~/postfix-bounce-report\ncp config.xml.sample config.xml\nvim/nano config.xml\n```\n\n### CREATE SCHEDULED TASKS\n\nCreate a new file in  ```/etc/cron.d/``` directory:\n\n``` touch /etc/cron.d/postfix-bounce-report ```\n\nThe content should be:\n\n```\n# https://github.com/filipnet/postfix-bounce-report\n# Hourly script that collects the recipients for the report\n@hourly root /root/postfix-bounce-report/postfix-build-submission-recipients.sh \u003e /dev/null\n# Daily script that sens out the report as an e-mail\n@daily root /root/postfix-bounce-report/postfix-bounce-report.sh \u003e /dev/null\n```\n\nDescription\n- The script ```postfix-build-submission-recipients.sh``` scans the mail log every hour for sent e-mails, extracts the recipient's address and adds it to the list ```/etc/postfix/submission_recipients``` if not already present.\n- The script ```postfix-bounce-report.sh``` is executed once a day, returns as content an HTML table with cross-check to the submission list, sends it via e-mail.\n\n## ADDITIONAL INFORMATION\nPlease note that the script ```postfix-bounce-report.sh``` always generates the day before. Note if there are no conflict with your log-rotation jobs.\n\n## LICENSE\npostfix-bounce-report and all individual scripts are under the BSD 3-Clause license unless explicitly noted otherwise. Please refer to the LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipnet%2Fpostfix-bounce-report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipnet%2Fpostfix-bounce-report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipnet%2Fpostfix-bounce-report/lists"}