Re: Rspamd integration
Benoit TELLIER <[email protected]> Thu, 9 Jul 2026 09:18:30 +0000
| Newsgroups | gmane.comp.jakarta.james.devel |
|---|---|
| Message-ID | <[email protected]> |
---=Part.54.5e7e9b0ff324086e.19f462be730.2cb8517753964e0b=- Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Accept-Language: fr-FR, en-US, vi-VN, ru-RU, ar-TN, it-IT, de-DE, mn-MN Content-Language: en-US Great, thanks for the explanation about greylisting + rspamd ! --=C2=A0 = Best regards, Benoit TELLIER General manager of Linagora VIETNAM=2E Produ= ct owner for Twake-Mail product=2E Chairman of the Apache James project=2E = Mail: btellier@linagora=2Ecom Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal)= On Jul 9, 2026 10:12 AM, from Felix Auringer <felix=2Eauringer@giz=2Ebe= rlin>As far as I understand, the state for the greylisting is kept by Rspam= d=2E So when a slightly suspicious email is processed by Rspamd, it returns= the 'soft reject' action and stores information about that email in its ca= che=2E James could then temporarily reject the email=2E When the other MTA = tries again, Rspamd remembers the email and returns the action `no action` = so James would accept the email=2E I do not think that any persistence is n= eeded on James' side=2E I will probably do a short spike in the next days = to see how much work a Rspamd SMTP hook would be=2E Regarding James' rate = limiting: I thought the options `connectionLimit` and `connectionLimitPerIP= ` in the SMTP config were the only ratelimiting mechanisms in James=2E Afte= r your comment, I searched again and found james=2Estaged=2Eapache=2Eorg/ja= mes-project/3=2E10=2E0/servers/postgres/customization/index=2Ehtml#_rate_li= miting_for_mailet_processing=2E That's more advanced than I thought=2E Rspa= md's module (docs=2Erspamd=2Ecom/modules/ratelimit/) has still more configu= ration possibilities but at least we would probably not really use those an= yway=2E Best regards, Felix On 7/8/26 4:55 PM, Benoit TELLIER wrote: > A = RSpamD hook would make complete sense! > > Though the greylisting would ne= ed to be backed with a persistance solution (redis ?) so implementing it to= plug Rspamd greylisting to James' future greylisting is quite some work=2E= > > (contribution welcomed indeed) > >> The Rspamd tests always take les= s than 2s with my current configuration which would probably not hit any ti= meouts=2E If that would be too much, one could also use another rspamd inst= ance that only has the ratelimiting and greylisting modules and would be wa= y faster=2E > The design allows the mailet to override the default rspamd i= nstance=2E > > We should adopt the same principle in a future RSpamD kook= =2E > > Also we'd likely benefit from: > =C2=A0- SMTP hooks for james rate= limiting > =C2=A0- An analysis of what makes RSpamD rate limiting more adv= anced than James' one (I'm curious!) > > Cheers !--=C2=A0 > > Best regard= s, > > Benoit TELLIER > > General manager of Linagora VIETNAM=2E > Produc= t owner for Twake-Mail product=2E > Chairman of the Apache James project=2E= > > Mail: btellier@linagora=2Ecom > Tel: (0033) 6 77 26 04 58 (WhatsApp, = Signal) > > > On Jul 8, 2026 3:40 PM, from Felix Auringer <felix=2Eauring= er@giz=2Eberlin>Hey Benoit, > > You're completely right, the soft reject a= ction is worthless as a mailet=2E > There is already an experimental SpamAs= sassin SMTP hook=2E Do you think a Rspamd hook might also make sense? > In = addition to greylisting, Rspamd also has a more advanced rate limiting mech= anism than James=2E > The Rspamd tests always take less than 2s with my cur= rent configuration which would probably not hit any timeouts=2E If that wou= ld be too much, one could also use another rspamd instance that only has th= e ratelimiting and greylisting modules and would be way faster=2E > > Best= regards, > Felix > > On 7/7/26 12:51 PM, Benoit TELLIER wrote: >> >> Hell= o Felix >> >> =C2=A0 <listener>=C2=A0 =C2=A0 <class>org=2Eapache=2Ejames=2E= rspamd=2ERspamdListener</class>=C2=A0 =C2=A0 <async>true</async>=C2=A0 =C2= =A0 <configuration>=C2=A0 =C2=A0 =C2=A0 <reportAdded>false</reportAdded>=C2= =A0 =C2=A0 </configuration>=C2=A0 </listener> >> Allows to unplug this unde= sirable behaviour: i think it shall be made the default=2E >> >>> =C2=A0The= "greylist" and "soft reject" actions are not handled=2E >> >> Correct=2E >= > >> greylisting makes no sens in a post queue set up=2E We can only greyli= st if running in the smtp stack=2E >> >> soft-reject and quarantine actions= would be best handled as add-header IMO >> >> Do you want to contribute th= is?--=C2=A0 >> >> >> Best regards, >> >> Benoit TELLIER >> >> General manag= er of Linagora VIETNAM=2E >> Product owner for Twake-Mail product=2E >> Cha= irman of the Apache James project=2E >> >> Mail: btellier@linagora=2Ecom >>= Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal) >> >> >> >> On Jul 7, 2026 12= :10 PM, from Felix Auringer <felix=2Eauringer@giz=2Eberlin>Hey, >> >> I hav= e some questions regarding the rspamd integration in James=2E >> >> Current= ly, when I move a message from my Spam folder to the Inbox, it is marked as= ham twice: once because it was moved out of the spam folder in another fol= der that is not the trash folder and once because the message was appended = to the Inbox=2E >> Is this desired behavior? The MailboxEvents=2EAdded obje= ct has a method to check whether the email was delivered (or moved)=2E Addi= tionally checking this would make more sense to me=2E >> >> James distingui= shes the following six actions: "no action", "greylist", "add header", "rew= rite subject", "soft reject", "reject"=2E >> I tested that James successful= ly handles the actions "no action", "rewrite subject" and "reject"=2E >> Fo= r the latter two and "add header", James also sets two headers and marks th= em so that they can be moved to the spam folder if desired=2E >> The "greyl= ist" and "soft reject" actions are not handled=2E >> >> However, Rspamd emi= ts different actions: "discard", "reject", "rewrite subject", "add header",= "no action", "soft reject", "quarantine" (docs=2Erspamd=2Ecom/configuratio= n/metrics#introduction)=2E >> We would especially be interested in the "sof= t reject" action to implement greylisting=2E Additionally, rspamd returns a= list of headers it wants to remove / add=2E I think honoring those would a= lso be benefitial=2E >> Would you be open for contributions on these topics= ? >> >> Best regards, >> Felix >> --- >> Gesellschaft f=C3=BCr interkulture= lles >> Zusammenleben gGmbH (GIZ) >> Felix Auringer >> IT >> Reformationspl= atz 2 >> 13597 Berlin >> >> Tel: 030/513 0100 00; Fax: 030/513 0100 09 >> = giz=2Eberlin; felix=2Eauringer@giz=2Eberlin >> >> Amtsgericht Charlottenbur= g HRB 200872 B >> Gesch=C3=A4ftsf=C3=BChrerin: Dr=2E Britta Marschke >> >> = --------------------------------------------------------------------- >> To= unsubscribe, e-mail: server-dev-unsubscribe@james=2Eapache=2Eorg >> For ad= ditional commands, e-mail: server-dev-help@james=2Eapache=2Eorg >> >> >> > = > --- > Gesellschaft f=C3=BCr interkulturelles > Zusammenleben gGmbH (GIZ)= > Felix Auringer > IT > Reformationsplatz 2 > 13597 Berlin > > Tel: 030/5= 13 0100 00; Fax: 030/513 0100 09 > giz=2Eberlin; felix=2Eauringer@giz=2Ebe= rlin > > Amtsgericht Charlottenburg HRB 200872 B > Gesch=C3=A4ftsf=C3=BChr= erin: Dr=2E Britta Marschke > > ------------------------------------------= --------------------------- > To unsubscribe, e-mail: server-dev-unsubscrib= e@james=2Eapache=2Eorg > For additional commands, e-mail: server-dev-help@j= ames=2Eapache=2Eorg > > > --- Gesellschaft f=C3=BCr interkulturelles Zu= sammenleben gGmbH (GIZ) Felix Auringer IT Reformationsplatz 2 13597 Berlin = Tel: 030/513 0100 00; Fax: 030/513 0100 09 giz=2Eberlin; felix=2Eauringer= @giz=2Eberlin Amtsgericht Charlottenburg HRB 200872 B Gesch=C3=A4ftsf=C3= =BChrerin: Dr=2E Britta Marschke -----------------------------------------= ---------------------------- To unsubscribe, e-mail: server-dev-unsubscribe= @james=2Eapache=2Eorg For additional commands, e-mail: server-dev-help@jame= s=2Eapache=2Eorg ---=Part.54.5e7e9b0ff324086e.19f462be730.2cb8517753964e0b=---