Comments (7)
postfix sender_canonical_classes
option is your friend. Actually if you stick to the postsrsd recommended settings (see README) then this should not happen.
from postsrsd.
I have set sender_canonical_classes to "envelope_sender" as described in the README. It is my understanding that this setting should imply that only envelope header (i.e. MAIL FROM:, RCTP TO: etc.) will be replaced and header_sender (From:, To: in MIME body) will not be replaced. But still I see this issue. I am running postfix 2.11.0 on Ubuntu.
from postsrsd.
What do the logs say?
from postsrsd.
I have sender_canonical_classes properly configured. I can produce this problem in the following way:
with the configuration as the README suggests, send an email with no From: header in it, and set your envelope information to a domain handled as a virtual_alias_domains (i.e., not the primary domain of the mail server).
I find that the SRS-formatted envelope sender in this case ends up in the From:
I suppose this can't be prevented, and really you should be submitting outgoing mail with a From: header in place, but I've been unable to find the setting in Postfix which decides what to add into the From, but whatever it is, it's using the SRS rewritten information when postsrsd is activated, and DTRT (uses [email protected]) when postsrsd is deactivated.
If this is a bug, I think the primary needed action is to add an explanation of how to handle virtual_alias_domains and empty From: headers in the docs.
from postsrsd.
The missing header is added by the Postfix cleanup daemon (see the manual page), after it has consulted the canonical_* maps, that's why the rewritten address ends up in the From: header.
from postsrsd.
The correct solution is to always set the "From:"-header, but sometimes it's not possible to control that, and using SRS-remapping just makes things worse. One such example are mails sent from Ubuntu's unattended upgrades system. A possible workaround is to use Postfix's header checks:
/etc/postfix/main.cf:
smtp_header_checks = pcre:/etc/postfix/header_checks
/etc/postfix/header_checks:
/^From:[[:space:]]*SRS0[[:print:]]*=([[:print:]]+?)=([[:print:]]+?)@[[:print:]]*?[[:space:]]*$/ REPLACE From: ${2}@${1}
from postsrsd.
Closing this issue, since it seems to be stale. Feel free to reopen.
from postsrsd.
Related Issues (20)
- srs_reverse sometimes fails to rewrite SRS1 multihop addresses HOT 4
- Message in spam for outlook.com HOT 1
- SRS_DOMAIN / wrong default value HOT 2
- 550 Invalid sender address (in reply to MAIL FROM command) HOT 1
- Loophole of rewriting destination address? HOT 5
- Is default hash length 4 safe enough? HOT 1
- 553 5.1.7 local part too long in HOT 6
- unknown canonical_classes value "header_recipien" in "envelope_recipient, header_recipien" HOT 2
- Systemd unit fails to start if postfix is not installed HOT 5
- Systemd service startup failure in PostSRSd 1.8 / `SRS_EXTRA_OPTIONS` empty argument HOT 3
- Rewrite sender addresses based on recipient domain HOT 6
- 100% CPU usage without further logs or ports opened HOT 7
- multiple domains must be separated by comma
- Old behaviour CMP0026 is deprecated and will be removed soon
- [Bug] Wrong systemd daemon generation HOT 1
- Testsuite too likely to create false positives
- Newly introduced systemd detection does not work HOT 1
- init script does not properly stop postsrsd on Debian Buster HOT 3
- Option to use unix sockets instead of TCP HOT 3
- SPF should ignore Reply-To HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postsrsd.