Giter VIP home page Giter VIP logo

Comments (4)

poolpOrg avatar poolpOrg commented on July 17, 2024

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.

poolpOrg avatar poolpOrg commented on July 17, 2024

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.

nanoant avatar nanoant commented on July 17, 2024

@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.

poolpOrg avatar poolpOrg commented on July 17, 2024

from filter-rspamd.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.