1

If I write via sendmail or SubmissionS client a mail to my virtual account (my domain is example.org), the mail I receive looks like this:

Return-Path: <user@example.org>
Delivered-To: user@example.org
Received: from example.org
    by hostname with LMTP
    id 5n+pDaCqAWAOcgAAUprYAg
    (envelope-from <user@example.org>)
    for <user@example.org>; Fri, 15 Jan 2021 15:45:52 +0100
To: user@example.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.org;
    s=r; t=1610721951;
    h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
     to:to:cc; bh=91RazCIc2UKGe+HBO/tFDtuL2v1Tzk19s+Q44fL6gEY=;
    b=pmlzcXQJAFHqKAjznCT4Hc77BjyX8QFXrQRTfzCH7UXXsBxNYCuSNrM6wSXAZ54+lAVDIO
    MYEGXwY3+4F1GgbJ/dQVQGYq262FKjcVwQhFHALvI704iGMEt5Uu/kqLHkk09EQKIyBlAf
    btrA42do+0lia6kkPNd2ezVqOR8O6WkH52eVKj8x/+lq3P5N4sCgoiOZcnIWUlyBMlhlFa
    vMWLjc+4DU4nLZxOYZyYS68RVJuDN4Vr5cz6+jNGYvidXkCvtyT99MgmMQ38oKwtbpT+0g
    sNzjOif4PbAWrJ+29IoJa/lV9nkYIKVtMa4CPJ6bqAVj4ITjwGLTwswBK//VdA==
From: user@example.org
Subject: test e-mail
Message-Id: <20210115144551.CCFBBA21CC@example.org>
Date: Fri, 15 Jan 2021 15:45:51 +0100 (CET)

Mail body

If I send it to an external recipient, the "Authentication-Results" is added.

Authentication-Results: mail2.outsi.de (dis=neutral; info=dmarc domain policy);
    dmarc=pass (dis=neutral p=reject; aspf=r; adkim=r; pSrc=dns) header.from=example.org;
    dkim=pass header.d=example.org header.s=r header.b=O/8zOi6w
Received: from mail.outsi.de ([10.10.10.11])
        by mail2.outsi.de
        with SMTP (SubEthaSMTP 3.1.7) id KJYEI2ZV
        for user@outsi.de;
        Fri, 15 Jan 2021 15:52:36 +0100 (CET)
Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=10.10.10.10; helo=example.org; envelope-from=user@example.org; receiver=<UNKNOWN> 
Received: from example.org (example.org [10.10.10.10])
    by mail1.outsi.de (Postfix) with ESMTPS id ACBEF1060308
    for <user@outsi.de>; Fri, 15 Jan 2021 14:52:36 +0000 (UTC)
To: user@outsi.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.org;
    s=r; t=1610721951;
    h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
     to:to:cc; bh=91RazCIc2UKGe+HBO/tFDtuL2v1Tzk19s+Q44fL6gEY=;
    b=pmlzcXQJAFHqKAjznCT4Hc77BjyX8QFXrQRTfzCH7UXXsBxNYCuSNrM6wSXAZ54+lAVDIO
    MYEGXwY3+4F1GgbJ/dQVQGYq262FKjcVwQhFHALvI704iGMEt5Uu/kqLHkk09EQKIyBlAf
    btrA42do+0lia6kkPNd2ezVqOR8O6WkH52eVKj8x/+lq3P5N4sCgoiOZcnIWUlyBMlhlFa
    vMWLjc+4DU4nLZxOYZyYS68RVJuDN4Vr5cz6+jNGYvidXkCvtyT99MgmMQ38oKwtbpT+0g
    sNzjOif4PbAWrJ+29IoJa/lV9nkYIKVtMa4CPJ6bqAVj4ITjwGLTwswBK//VdA==
From: user@example.org
Subject: test e-mail
Message-Id: <20210115144551.CCFBBA21CC@example.org>
Date: Fri, 15 Jan 2021 15:45:51 +0100 (CET)

Mail body

How can I make Postfix add this header even to outgoing mail destined to my local domain (example.org)? Milter is Rspamd.

In my "main.cf" I have

# [...]

non_smtpd_milters = $smtpd_milters
milter_default_action = accept

In my "master.cf" I have

smtp             inet  n       -       n       -       -       smtpd
 -o milter_macro_daemon_name=VERIFYING

submissions      inet  n       -       n       -       -       smtpd
 -o syslog_name=postfix/smtps
 -o smtpd_tls_wrappermode=yes
 -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
 -o milter_macro_daemon_name=ORIGINATING

# [...]
Polizi8
  • 15
  • 6
  • 1
    What is the goal, why would you add that header containing little to no information that is not already available to every other program that could conceivably care about it? – anx Jan 16 '21 at 14:14
  • @anx Just wondering if it is possible to also verify just signed messages directed to users of a certain domain (mine), and if yes how to do it. From my mail client I would see a green mark next to my locally sent (and received) email, like I already have next to DMARCpassing externally received mail. For now I just see "Signature exists but Authentication-Header doesn't". – Polizi8 Jan 16 '21 at 19:23
  • I would expect configuration management to become a bit of a mess but running the same milter twice (first time signing-only, the second time validation-only) should do the trick. – anx Feb 21 '21 at 11:10
  • @anx yes, but do you know how to call rspamd twice using postfix, exactly as you said? – Polizi8 Feb 21 '21 at 15:50

0 Answers0