Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a header after rewrite unfolds other headers (under some unknown circumstances) #63

Open
kusalananda opened this issue Apr 18, 2019 · 1 comment

Comments

@kusalananda
Copy link

kusalananda commented Apr 18, 2019

Using an action that rewrites the message, and then adds a header, as in

action "bogofilter" {
    remove-header "X-Bogosity"
    rewrite "/usr/local/bin/bogofilter -e -p -u"
    add-header "X-Filtered-Date" value "%[rfc822date]"
}

seems to sometimes unfold the headers in the message that is later saved to a mailbox. By "unfolding" I mean removes newlines, making each header line span only a single line.

Removing the add-header action from the above composite action resolves this and leaves the headers untouched.

I'm not entirely under what circumstances the headers are unfolded (I haven't been able to write a set of actions+rules to actually provoke this behaviour), but in all cases when this does occur, it happens consistently and removing the addition of a new header to the message seems to resolve it.

I'm using fdm 1.9 as packaged with OpenBSD-current, but this was also seen with fdm compiled from the master branch.

@kusalananda
Copy link
Author

I managed to reproduce the issue:

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from localhost (eeyore.my.domain [local])     by eeyore.my.domain (OpenSMTPD) with ESMTPA id 5a92e69b
        for <[email protected]>;      Thu, 18 Apr 2019 09:47:58 +0200 (CEST)
From: Kusalananda <[email protected]>
Date: Thu, 18 Apr 2019 09:47:58 +0200 (CEST)
To: [email protected]
Subject: test
Message-ID: <[email protected]>
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4
X-Filtered-Date: Thu, 18 Apr 2019 09:48:03 +0200

test

This was produced by the same action as in the previous comment, but the remove-header was replaced by

remove-headers { "X-Bogosity" "X-Filtered-Date" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant