Skip to content

🪲: Stalwart includes headers in body chunks - Milter #2346

@darim92

Description

@darim92

What happened?

We use a custom Milter to scan our messages.

After the SMFIC_EOH ('N') command, stalwart proceeds to SMFIC_BODY ('B') phase, where we expect to receive only the body chunks of the message. However, these body chunks also include all message headers. Is this normal? According to the protocol, only the message body should be transmitted during the SMFIC_BODY ('B') phase.

In our option negotiation, we explicitly indicate that we intend to modify the message body (replaceBody) and add headers.

How can we reproduce the problem?

I can reproduce the problem by doing the following steps:

  • Connect Milter (v6) to Stalwart (replaceBody,addHeaders, changeHeaders)
  • Gather all headers in header phase until end of headers
  • Gather all body chunks in body phase
  • Print/Log in end of Body phase the whole message. You will see a second headers section in the message.

Version

v0.13.x

What database are you using?

RocksDB

What blob storage are you using?

Filesystem

Where is your directory located?

None

What operating system are you using?

Linux

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions