Comments (4)
Nice catch, your use-case doesn't seem covered at all.
The Rspamd Protocol provides User field for that purpose, but I can see in filter-rspamd code that this field is not supplied when SMTP client was authenticated in OpenSMTPD. Also it seems that OpenSMTPD does not provide this information to their filters (or maybe I am wrong?)
Actually, OpenSMTPD can provide that information to filters through the link-auth event if they request it but filter-rspamd
does not request it and does not pass the User header to rspamd. This shouldn't be too hard to fix, I'll try to get you a fix ready this week.
Many thanks for this effort. I also became a mean inferior patron of your project 🙄
Thanks :-)
from filter-rspamd.
Can you pull the latest filter-rspamd from github and give it another try ?
It now register for link-auth to listen to authentication events, associates the username to the session if the authentication was successful, and passes the User header to Rspamd if a username is associated to the session.
Without it:
2019-08-27 20:06:38 #40290(normal) <4bc5db>; task; rspamd_task_write_log: id: , qid: <63a80eae>, ip: 127.0.0.1, (default: T (add header): [13.40/15.00] [BROKEN_H
EADERS(10.00){},MISSING_MID(2.50){},MISSING_DATE(1.00){},MIME_GOOD(-0.10){text/plain;},ARC_NA(0.00){},FROM_HAS_DN(0.00){},MIME_TRACE(0.00){0:+;},RCPT_COUNT_ONE(0.00){1;
},RCVD_COUNT_ONE(0.00){1;},RCVD_TLS_ALL(0.00){},TO_DN_ALL(0.00){},TO_EQ_FROM(0.00){}]), len: 263, time: 17.67110824584961ms real, 9.270574ms virtual, dns req: 0, digest
: <05da526278916b967da93e20f648ff4c>
With it:
2019-08-27 20:08:33 #40290(normal) <84f3ed>; task; rspamd_task_write_log: id: , qid: , ip: 127.0.0.1, user: tester, (default: T (add header): [13.40/15.00] [BROKEN_HEADERS(10.00){},MISSING_MID(2.50){},MISSING_DATE(1.00){},MIME_GOOD(-0.10){text/plain;},ARC_NA(0.00){},FROM_HAS_DN(0.00){},MIME_TRACE(0.00){0:+;},RCPT_COUNT_ONE(0.00){1;},RCVD_COUNT_ONE(0.00){1;},RCVD_TLS_ALL(0.00){},RCVD_VIA_SMTP_AUTH(0.00){},TO_DN_ALL(0.00){},TO_EQ_FROM(0.00){}]), len: 278, time: 4.951000213623047ms real, 3.4951400000000006ms virtual, dns req: 0, digest:
Note the username after the IP address in the second line.
This should be enough to get your use-case covered, can you please confirm so that I can tag a new release and update the OpenBSD port ?
edit: @nanoant just notifying you to make sure this doesn't go unnoticed ;-)
from filter-rspamd.
@poolpOrg I have installed and tested it, and it works now great. Thank you!
One remark (maybe to put somewhere in the README, is that allow_username_mismatch = false;
has to be specified in /etc/rspamd/local.d/dkim_signing.conf
if using Unix usernames (without domain), nicely put at: rspamd/rspamd#1768
from filter-rspamd.
from filter-rspamd.
Related Issues (18)
- filter-rspamd crash HOT 8
- X-Spam-Symbols HOT 7
- Verbose X-Spam-Symbols. HOT 2
- Dead, blocked or misconfigured Rspamd url. HOT 4
- filter-rspamd broken HOT 14
- RFC: opensmtpd-filters-go library and filter port HOT 4
- Optionally connect to rspamd with unix socket HOT 17
- Greylist issue in combination with disabled greylisting in Rspamd. HOT 5
- filter-rspamd exits when tx-mail sends 4 params instead of 3 HOT 13
- rspamd settings has wrong example HOT 1
- rspamd: failed to decode JSON response (Rspamd v3.3) HOT 16
- Bad DKIM signatures over various whitespace problems
- is message rewrite supported? HOT 1
- No longer available as an OpenBSD package? HOT 1
- Permission issue when trying to access the socket? HOT 6
- rspamd + opensmtpd doesnt seem to block gtube tests HOT 2
- impossible for milter_headers to add a custom header HOT 2
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 filter-rspamd.