Comments (2)
I am not aware of any good way to do that. You can exclude domains if you know they don't use SPF manually. However, given that the rewrite is envelope-only and thus invisible to the end user, I would not bother.
from postsrsd.
I think that should be relatively easy to implement:
You get the envelope e-mail address of sender by postfix (because it is the one you want to rewrite). Just extract domain name from it (you do that anyways to check the list of excluded domains). Do a DNS lookup of the TXT record of the domain extracted. If the TXT as returned by libc/DNS server contains the string "spf", the envelope sender's address is SPF enabled. In that case you need to do SRS. Otherwise it is useless.
This is an additional DNS lookup on every request, but if the mailserver has done the "policy-spf" checks already, the TXT record is in the DNS cache already...
This issue has nothing to do with the fact that the daemon rewrites any address, forwarded or not. This issue is just to disable the rewriting if the sender domain does not require it, because forwarding can be done safely without SRS. If the sender's domain has SPF enabled, you need SRS, so it is better to do it (although not forwarded later, but that's the well-known postfix cleanup limitation).
from postsrsd.
Related Issues (20)
- 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
- `make -j` fails with `undefined reference to symbol '__pthread_unregister_cancel@@GLIBC_2.3.3'` HOT 3
- cmake hangs HOT 8
- build: improve default systemd unitdir HOT 1
- drop_privileges does not drop enough
- Installation error. HOT 2
- Not created milter socket file. HOT 2
- Endless loop HOT 2
- Socketmap Permission denied / Postfix chroot problem? HOT 13
- 2.x supports CLI args but dropped `-h` HOT 1
- Using Github Actions to distribute releases HOT 5
- Looking for new Debian maintainer
- Segfault when using redis through a unix socket
- /usr/sbin/postsrsd: unrecognized option: f HOT 4
- Quieter Logging
- invalid socketmap query, closing connection HOT 3
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.