Skip to content

Conversation

@Mortza81
Copy link

Summary

This PR adds the X-Envelope-From header to incoming messages to preserve the SMTP
envelope sender (MAIL FROM) for SPF evaluation by SpamAssassin.

Background

SpamAssassin relies on message headers to determine the envelope sender for SPF checks.
If no suitable header is present (e.g. Return-Path or X-Envelope-From), SPF evaluation
may be skipped and debug messages such as cannot get Envelope-From are logged.

Motivation

Providing X-Envelope-From ensures the envelope sender is always available for SPF
evaluation, improving accuracy and consistency with SpamAssassin’s documented behavior.

References

Impact

  • No change to message delivery
  • Improves SPF reliability for incoming mail only

Co-authored-by: jarqvi <jarqvi.jarqvi@gmail.com>
@Mortza81
Copy link
Author

Related to #3482

michaeldoehler pushed a commit to relationsoftware/postal that referenced this pull request Jan 21, 2026
Adds X-Envelope-From header to incoming SMTP messages containing the
original envelope sender address.

Cherry-picked from postalserver/postal PR postalserver#3512

Co-authored-by: Mortza81 <Mortza81@users.noreply.github.com>
Co-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants