Bug 1368645 - Error message about an missing "i" macro
Summary: Error message about an missing "i" macro
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: spamass-milter
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Paul Howarth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-20 10:52 UTC by Frank Büttner
Modified: 2016-09-09 16:50 UTC (History)
1 user (show)

Fixed In Version: spamass-milter-0.4.0-7.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-09 16:50:38 UTC
Type: Bug


Attachments (Terms of Use)

Description Frank Büttner 2016-08-20 10:52:48 UTC
Description of problem:
When I start postfix and it try to connect to the milter the follow error is shown:

Could not retrieve sendmail macro "i"!.  Please add it to confMILTER_MACROS_ENVFROM for better spamassassin results


Version-Release number of selected component (if applicable):
spamass-milter-0.4.0-4.el7.x86_64

How reproducible:
Every time


Actual results:
The error message

Expected results:
No error message

Additional info:
postfix config:
milter_connect_macros = i j {daemon_name} v {if_name} _
milter_end_of_data_macros = i
milter_data_macros = i
milter_end_of_header_macros = i

Comment 1 Paul Howarth 2016-08-20 15:26:33 UTC
You need to have "i" in the milter_mail_macros configuration, as mentioned in the README.Postfix file in the spamass-milter-postfix package. I was under the impression that this was the default; maybe not?

Comment 2 Frank Büttner 2016-08-20 16:48:03 UTC
The package don't contains this file(README.Postfix). :(

rpm -ql spamass-milter
/etc/sysconfig/spamass-milter
/run/spamass-milter
/run/spamass-milter/spamass-milter.sock
/usr/lib/systemd/system/spamass-milter-root.service
/usr/lib/systemd/system/spamass-milter.service
/usr/lib/tmpfiles.d/spamass-milter.conf
/usr/sbin/spamass-milter
/usr/share/doc/spamass-milter-0.4.0
/usr/share/doc/spamass-milter-0.4.0/AUTHORS
/usr/share/doc/spamass-milter-0.4.0/ChangeLog
/usr/share/doc/spamass-milter-0.4.0/NEWS
/usr/share/doc/spamass-milter-0.4.0/README
/usr/share/man/man1/spamass-milter.1.gz
/var/lib/spamass-milter

And at milter_mail_macros the "i" is set.
milter_mail_macros = i {auth_type} {auth_authen} {auth_author} {mail_addr} {mail_host} {mail_mailer}

Comment 3 Paul Howarth 2016-08-20 17:21:01 UTC
I referred to the spamass-milter-postfix package, which should contain that file. Do you have that package installed? It's needed for Postfix users in order to get the right socket ownership.

I don't know what's going on with that error message, as you seem to have the setting you need. Does the milter otherwise work OK?

Comment 4 Frank Büttner 2016-08-20 17:27:46 UTC
spamass-milter-postfix is installed.
The only difference that I can see is:
postconf |grep milter_rcpt_macros :
milter_rcpt_macros = i {rcpt_addr} {rcpt_host} {rcpt_mailer}

Read me file:
milter_rcpt_macros    must include the b, r, v, and Z macros


Yes, the milter seems to work.

Comment 5 Paul Howarth 2016-08-20 19:23:27 UTC
I think it's a problem with the milter working with postfix. There's a similar issue in Debian:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696856

Also:
http://postfix.1071664.n5.nabble.com/Spamass-milter-and-Postfix-2-10-td56252.html

Looking at the code, it would be quite invasive to fix this, as the milter generates a dummy Received: header at the time of the first recipient being specified in the SMTP exchange, and this header contains the value of the "i" macro (queue ID). Postfix doesn't have a value for the "i" macro until it has accepted at least one recipient.

As the warning is essentially harmless, probably the best option would be just document this as a known issue in the README.Postfix file?

Comment 6 Frank Büttner 2016-08-20 19:56:12 UTC
I think yes, because it has no impact for the function itself.

Comment 7 Paul Howarth 2016-08-22 08:55:06 UTC
Here's what I plan to add to README.Postfix, just before the last two lines about reading http://www.postfix.org/MILTER_README.html for more details:

Note that Postfix users will see the following warning logged at the time of
the first connection to the milter:

  Could not retrieve sendmail macro "i"!.  Please add it to
  confMILTER_MACROS_ENVFROM for better spamassassin results

This is a consequence of different design decisions between Postfix and
Sendmail (which spamass-milter is written for), where Postfix does not assign
a Queue ID to an incoming message until later in an SMTP transaction compared
with Sendmail. The milter wants to use the information before Postfix can
provide it, hence the message. It is harmless and can be ignored.


Does that look OK to you?

Comment 8 Frank Büttner 2016-08-22 14:40:22 UTC
Yes, this will be ok.

Comment 9 Fedora Update System 2016-08-22 15:33:23 UTC
spamass-milter-0.4.0-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-f3c3a8d049

Comment 10 Fedora Update System 2016-08-23 19:51:58 UTC
spamass-milter-0.4.0-7.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-f3c3a8d049

Comment 11 Fedora Update System 2016-09-09 16:50:36 UTC
spamass-milter-0.4.0-7.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.