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
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?
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}
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?
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.
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?
I think yes, because it has no impact for the function itself.
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?
Yes, this will be ok.
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
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
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.