1

I am running an Ubuntu 20.04 based LEMP server on a Raspberry Pi. Installed on it is postfix/dovecot/amavis/spamassassin. When I look at my mail.err logs by running the following command:

cat /var/log/mail.err it returns the following errors:

spamass-milter[1606]: Could not retrieve sendmail macro "i"!.  Please add it to confMILTER_MACROS_ENVFROM for better spamassassin results
spamass-milter[1420]: Could not retrieve sendmail macro "i"!.  Please add it to confMILTER_MACROS_ENVFROM for better spamassassin results
spamass-milter[1595]: spamass-milter 0.4.0 starting
spamass-milter[1595]: Could not retrieve sendmail macro "i"!.  Please add it to confMILTER_MACROS_ENVFROM for better spamassassin results

What do these errors mean, and how I can fix them?

DanRan
  • 73
  • 1
  • 3
  • 22

1 Answers1

2

Your milter expects a property of Sendmail which is not true for Postfix.

As documented in the macro section of the postfix milter readme, the milter macro i provides the queue identifier, which is not immediately assigned (see smtpd_delay_open_until_valid_rcpt configuration) and hence not available to your spamass-milter program until later steps in the SMTP exchange.

Other than for verbose logging purposes there is no need whatsoever for a spam filtering milter to know the (arbitrarily assigned) QUEUE ID, so if it does not complicate your monitoring, you can safely disregard this warning.


As per Debian Bug #696856 Debian (and possibly derivatives) now ship a patch that removes the too-early access and accompanying warning in spamass-milter.

anx
  • 8,963
  • 5
  • 24
  • 48
  • How exactlydo I apply this patch @anx? – DanRan Jul 05 '22 at 13:57
  • @DanRan That patch *is* applied in the `version >= 0.4.0-2` binaries built by Debian (and many derived distributions). If you are not using Debian packages, the precise methods for applying it depend on how you build your packages, but I am fairly certain that *unified diff* format can be used in each and every packaging toolkit. – anx Jul 05 '22 at 14:49