Dear Maintainer, Noah,
I'm working on making the libmail-dmarc-perl package a package that
belongs to the Ubuntu main repository (5-10 years of support by the Ubuntu team), through a MIR (Main Inclusion request) process [1].
The main reason behind that is that this package is used by spamassassin
(already in main). Curious thing is that, by now, spamassassin is the
only package that uses libmail-dmarc-perl as dependency, which supposes an advantage
in our case.
spamassassin only uses the validation feature of Mail::DMARC and, as we
can read in the INSTALL.md file of src:libmail-dmarc-perl, line 21:
'''
NOTE: Most of the dependencies are optionally required for the DMARC reporting features. Mail::DMARC will perform validation with only these modules:
Regexp::Common
Config::Tiny
File::ShareDir
Net::DNS::Resolver
Net::IP
Socket6
'''
I checked also in the spamassassin's code that the validation feature is only used: Spamassasin dmarc plugin [2] only uses the MAIL::DMARC::PurePerl module [3] and, inside it, the validate function in particular [4]. However, is true that it also could use the save_aggregate function if the dmarc_save_reports variable is set throught mail-dmarc.ini to 1 (defaults is 0 [5], and also in the ini file [6]). That function will need the Mail::DMARC::Report::Store module and the Mail::DMARC::Report::URI module.
Therefore, I separated dependencies in the binary package depending on their use. Modules used in validation remain as binary dependencies and the rest, used in reporting, are moved to suggested dependencies, still availables. I attached it here as a patch.
Both test suites, spamassassin and libmail-dmarc-perl t/*.t folders,
passes. Also, I made a DEP-8 test (that I can fordward to you if this
split seems reasonable/interesting) to you.
As a collateral effect, the split reduces the number of packages that need to be installed when used by spamassassin, saving space.
I don't know if you find this approach interesting, but anyway.... I thought it was worth sharing it with you. What do you think?
Thanks in advance,
Miriam España Acebal
Software Engineer II - Ubuntu PublicCloud/Server
Canonical Ltd.
[1] https://bugs.launchpad.net/ubuntu/+source/libmail-dmarc-perl/+bug/2023971
[2] https://git.launchpad.net/ubuntu/+source/spamassassin/tree/lib/Mail/SpamAssassin/Plugin/DMARC.pm
[3] https://git.launchpad.net/ubuntu/+source/spamassassin/tree/lib/Mail/SpamAssassin/Plugin/DMARC.pm#n242
[4] https://git.launchpad.net/ubuntu/+source/spamassassin/tree/lib/Mail/SpamAssassin/Plugin/DMARC.pm#n322
[5] https://git.launchpad.net/ubuntu/+source/spamassassin/tree/lib/Mail/SpamAssassin/Plugin/DMARC.pm#n111
[6] https://git.launchpad.net/ubuntu/+source/libmail-dmarc-perl/tree/share/mail-dmarc.ini#n21