File python-decode-spam-headers.spec of Package decode-spam-headers
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pythons python3
Name: python-decode-spam-headers
Version: 0
Release: 0
Summary: Script that helps you understand why your E-Mail ended up in Spam
License: MIT
URL: https://github.com/mgeeky/decode-spam-headers/
Source: %{name}-%{version}.tar.gz
BuildRequires: %{pythons}
BuildRequires: python-rpm-macros
Requires: python3-dateutil
Requires: python3-tldextract
Requires: python3-packaging
Requires: python3-dnspython
Requires: python3-requests
Requires: python3-colorama
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Whether you are trying to understand why a specific e-mail ended up in
SPAM/Junk for your daily Administrative duties or for your Red-Team
Phishing simulation purposes, this script is there for you to help!
This tool accepts on input an *.EML or *.txt file with all the SMTP
headers. It will then extract a subset of interesting headers and using
105+ tests will attempt to decode them as much as possible.
This script also extracts all IPv4 addresses and domain names and performs
full DNS resolution of them.
Resulting output will contain useful information on why this e-mail might
have been blocked.
%prep
%setup -q
%install
install -D decode-spam-headers.py %{buildroot}%{_bindir}/decode-spam-headers
%python_clone -a %{buildroot}%{_bindir}/decode-spam-headers
%post
%python_install_alternative decode-spam-headers
%postun
%python_uninstall_alternative decode-spam-headers
%files
%python_alternative %{_bindir}/decode-spam-headers
%changelog