fastmail / authentication_milter

Email Authentication by SPF/DKIM/DMARC etc.
Other
121 stars 21 forks source link

Net::SMTPS and NET::HTTP modules not installed using CPANM #34

Open freddieleeman opened 4 years ago

freddieleeman commented 4 years ago

After installing, I had to manually add both Net::SMTPS and NET:HTTP modules to get things working. I've checked the installation log of the 'cpanm Mail::Milter::Authentication' command but there was no mention of either of these modules.

I used this Dockerfile to test and reproduce the problem.

Running 'dmarc_view_reports' resulted in the following errors:

Can't locate Net/SMTPS.pm in @INC (you may need to install the Net::SMTPS module) (@INC contains: lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share /perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/local/share/perl/5.28.1/Mail/DMARC/Report/Send/SMTP.pm line 10.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.28.1/Mail/DMARC/Report/Send/SMTP.pm line 10.
Compilation failed in require at /usr/local/share/perl/5.28.1/Mail/DMARC/Report/Send.pm line 8.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.28.1/Mail/DMARC/Report/Send.pm line 8.
Compilation failed in require at /usr/local/share/perl/5.28.1/Mail/DMARC/Report.pm line 14.
Compilation failed in require at /usr/local/bin/dmarc_view_reports line 26.
BEGIN failed--compilation aborted at /usr/local/bin/dmarc_view_reports line 26.
Can't locate Net/HTTP.pm in @INC (you may need to install the Net::HTTP module) (@INC contains: lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/p erl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/local/share/perl/5.28.1/Mail/DMARC/Report/Send/HTTP.pm line 11.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.28.1/Mail/DMARC/Report/Send/HTTP.pm line 11.
Compilation failed in require at /usr/local/share/perl/5.28.1/Mail/DMARC/Report/Send.pm line 9.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.28.1/Mail/DMARC/Report/Send.pm line 9.
Compilation failed in require at /usr/local/share/perl/5.28.1/Mail/DMARC/Report.pm line 14.
Compilation failed in require at /usr/local/bin/dmarc_view_reports line 26.
BEGIN failed--compilation aborted at /usr/local/bin/dmarc_view_reports line 26.

The same errors can be seen in the authentication_milter log itself:

Global shut down due to fatal error: Could not load handler DMARC : Can't locate Net/SMTPS.pm in @INC (you may need to install the Net::SMTPS module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/local/share/perl/5.28.1/Mail/DMARC/Report/Send/SMTP.pm line 10.
marcbradshaw commented 4 years ago

The issue is in Mail::DMARC, i'll take a look.

freddieleeman commented 3 years ago

This issue is still not resolved. Running cpanm Mail::Milter::Authentication does not install the Net::SMTPS package. Should this be a dependency of the Mail::DMARC package?

marcbradshaw commented 3 years ago

This should have been fixed in Mail-DMARC-1.20200214, please confirm you have the latest version.

freddieleeman commented 3 years ago
# cpanm Mail::DMARC
Mail::DMARC is up to date. (1.20200214)

Here is the entire install log: https://pastebin.com/duxWDqJy

freddieleeman commented 3 years ago
# cpanm Mail::DMARC
Mail::DMARC is up to date. (1.20210220)
# cpanm --showdeps Mail::DMARC | grep Net::
Net::IDN::Encode
Net::DNS::Resolver
Net::IP
Net::SSLeay

Net::SMTPS is not configured as a dependency and not added when installing Mail::Milter::Authentication

freddieleeman commented 3 years ago

I've been testing if Net::SMTPS got installed, but not if it was still needed. I just noticed that the use Net::SMTPS; line was removed from lib/Mail/DMARC/Report/Send/SMTP.pm with #168. If this package is indeed not required (anymore) this issue can be closed.