I am using the tutorial at https://www.howtoforge.com/postfix_spf and I have a Debian Jessie server running in AWS EC2 using ISPConfig 3.0.5.4. everything works including DNS, reverse DNS, mail and Amazon lifted limit on mail and set up reverse DNS. I am wanting to get SPF working. When installing "install Mail::SPF" I have errors at the end, not sure what they mean: Code: root@server:/home/admin# perl -MCPAN -e shell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v2.05) Enter 'h' for help. cpan[1]> install Mail::SPF Reading '/root/.cpan/Metadata' Database was generated on Thu, 09 Jun 2016 11:53:42 GMT Running install for module 'Mail::SPF' Checksum for /root/.cpan/sources/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz ok Scanning cache /root/.cpan/build for sizes ............................................................................DONE 'YAML' not installed, will not store persistent state Configuring J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz with Build.PL Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Mail-SPF' version 'v2.9.0' JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz /usr/bin/perl Build.PL --installdirs site -- OK Running Build for J/JM/JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz Building Mail-SPF JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz ./Build -- OK Running Build test t/00.00-class-misc.t .......... ok t/00.01-class-util.t .......... ok t/00.02-class-request.t ....... ok t/00.03-class-result.t ........ ok t/00.04-class-server.t ........ 1/23 Unknown error on DNS 'A' lookup of 'example.com' (EDNSError) at /root/.cpan/build/Mail-SPF-v2.9.0-gYjSfS/blib/lib/Mail/SPF/Server.pm line 573. # Looks like you planned 23 tests but ran 19. # Looks like your test exited with 255 just after 19. t/00.04-class-server.t ........ Dubious, test returned 255 (wstat 65280, 0xff00) Failed 4/23 subtests t/00.05-class-macrostring.t ... ok t/00.99-class-misc.t .......... ok t/10.00-rfc4408.t ............. skipped: Mail::SPF::Test required for testing Mail::SPF's RFC compliance t/10.01-rfc4406.t ............. skipped: Mail::SPF::Test required for testing Mail::SPF's RFC compliance t/90-author-pod-validation.t .. skipped: Test::Pod 1.00 required for testing POD validity Test Summary Report ------------------- t/00.04-class-server.t (Wstat: 65280 Tests: 19 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 23 tests but ran 19. Files=10, Tests=128, 0 wallclock secs ( 0.06 usr 0.00 sys + 0.65 cusr 0.06 csys = 0.77 CPU) Result: FAIL Failed 1/10 test programs. 0/128 subtests failed. JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz ./Build test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz Failed during this command: JMEHNLE/mail-spf/Mail-SPF-v2.9.0.tar.gz : make_test NO cpan[2]>
That tutorial looks pretty dated, try simply: Code: apt-get install postfix-policyd-spf-perl to install the same policy daemon with its dependencies. IIRC, you still have to add an entry to master.cf (but the package installer might do that for you, too). One piece that seems to be missing from tutorial for an ISPConfig server is that the changes you make to smtpd_recipient_restrictions shouldn't just be made directly in main.cf, or they will be overwritten the next time you update ispconfig and reconfigure services. Instead, you should copy debian_postfix.conf.master from the ispconfig install sources (in your case, that would be https://git.ispconfig.org/ispconfig/ispconfig3/raw/3.0.5.4/install/tpl/debian_postfix.conf.master) and save it as /usr/local/ispconfig/server/conf-custom/install/debian_postfix.conf.master, and also make your changes there. Better yet, update to a current ispconfig version first, then copy that debian_postfix.conf.master template and make your changes.