MSMilter and spf

Maarten mailinglists at
Sat Oct 23 20:16:41 UTC 2021

Thanks for your reply Shawn. It seems to be working now, I think I 
missed something. I restored my old configuration
to verify it and then I ran into some other issues which didn't have 
anything to do with mailscanner or postfix which I
fixed. After my old configuration was restored and working again, I 
tested it and my spf and dkim were working there.
So I went  through the milter configuration  again and It seems to be 
working now, both my dkim and spf.  Even though
I have a backup mailserver I was sweating a little because I didn't know 
where it went wrong since I followed the
mailscanner guide. I think I may have overlooked something while doing 
it and reacted by changing something elsewhich
caused some other issues. I'll leave it running for a day or so and see 
what happens. From all my testing I have done so
far it's all good.

See the last test mail I sent from a gmail account:

Return-Path: <example at>
X-Original-To: gmail at
Delivered-To: mailinglists at
Received: from magik (localhost [])
     by (Postfix) with ESMTP id DD3AFE0ABB
     for <gmail at>; Sat, 23 Oct 2021 22:11:27 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.11.0 DD3AFE0ABB
     dkim=pass (2048-bit key; unprotected) header.a=rsa-sha256 header.s=20210112 header.b=e7od2eYB
X-Spam-Status: No
X-FMB-MailScanner-From: example at
X-FMB-MailScanner: Found to be clean
X-FMB-MailScanner-ID: D8845E0AB8.AA5CD
X-FMB-MailScanner-Information: Please contact hostmaster at for 
more information
Received: from ( 
     (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
     (no client certificate requested)
     by magik (MailScanner Milter) with SMTP id D8845E0AB8
     for <gmail at>; Sat, 23 Oct 2021 22:11:22 +0200 (CEST)
Received-SPF: Pass (mailfrom) identity=mailfrom; 
envelope-from=example at; receiver=<UNKNOWN>
DKIM-Filter: OpenDKIM Filter v2.11.0 D8845E0AB8
Received: by with SMTP id w15so306888edc.9
         for <gmail at>; Sat, 23 Oct 2021 13:11:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20210112;

Thanks for your reply! Have a great day!

On 10/23/21 19:49, Shawn Iverson via MailScanner wrote:
> Typically, this is implemented in postfix with something like 
> postfix-policyd. Do you still have this or something similar?
> On 10/23/21 1:18 PM, Maarten via MailScanner wrote:
>> It's been a a few years since msmilter was first implemented in 
>> mailscanner. I had been using the
>> traditional since I started using mailscanner. I had some time on my 
>> hands and I thought I would
>> try the msmilter configuration also because I haven't seen any recent 
>> issues in the list come along
>> so I thought that is a good sign. It was easy to setup because the 
>> documentation is well done and
>> my mail is received as expected. So first of all I would like to say 
>> thank you to those who implemented
>> the milter option. However I am running in one small thing which 
>> isn't working correctly and that
>> has been since I went from traditional to milter configuration.
>> Before the switch to the milter configuration postfix would add a 
>> line like this to the headers:
>> Received-SPF: Pass (mailfrom) identity=mailfrom; 
>> client-ip=;; 
>> envelope-from=noreply at; receiver=<UNKNOWN>
>> Since I made the switch to milter that is not happening anymore, any 
>> idea why that is happening?
>> Maarten

More information about the MailScanner mailing list