server: add SymList property to be able to set the macro list#35
Merged
emersion merged 2 commits intoemersion:masterfrom Apr 4, 2026
Merged
server: add SymList property to be able to set the macro list#35emersion merged 2 commits intoemersion:masterfrom
emersion merged 2 commits intoemersion:masterfrom
Conversation
This has only be tested with Postfix, but the implementation is directly based on sendmail's libmilter: https://sources.debian.org/src/sendmail/8.18.2-1/libmilter/engine.c#L477-L542
n-peugnet
added a commit
to club-1/homard
that referenced
this pull request
Apr 3, 2026
As explained in Postfix's documentation [1]: > When new mail arrives via the sendmail(1) command line, the Postfix > cleanup(8) server pretends that the mail arrives with ESMTP from > "localhost" with IP address "127.0.0.1". [1]: https://www.postfix.org/MILTER_README.html#non-smtp-milters Checking that the value of the {client_addr} macro equals to 127.0.0.1 allows to detect mails sent from trsuted networks, as well as the ones sent via pickup (sendmail, mailx, mutt, etc.). These mails are also considered as authenticated. This could become an option if needed. As the {client_addr} macro is not sent by default: $ /usr/sbin/postconf -d | grep milter_.*_macros milter_connect_macros = j {daemon_name} {daemon_addr} v _ milter_data_macros = i milter_end_of_data_macros = i milter_end_of_header_macros = i milter_helo_macros = {tls_version} {cipher} {cipher_bits} {cert_subject} {cert_issuer} milter_mail_macros = i {auth_type} {auth_authen} {auth_author} {mail_addr} {mail_host} {mail_mailer} milter_rcpt_macros = i {rcpt_addr} {rcpt_host} {rcpt_mailer} milter_unknown_command_macros = ...the best solution is to use the set_symlist feature of milter v6. Fixes: #2 Depends-On: emersion/go-milter#35
emersion
reviewed
Apr 4, 2026
n-peugnet
commented
Apr 4, 2026
This make the API more explicit and independant on the protocol details.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This has only be tested with Postfix, but the implementation is directly based on sendmail's libmilter:
https://sources.debian.org/src/sendmail/8.18.2-1/libmilter/engine.c#L477-L542