Bypassing filters in specific conditions

2024-04-28 Thread Jarod G.
was wondering if i could make opensmtpd completely bypass filters (especially the rspamd filter). Here is my smtpd config : # This is the smtpd server system-wide configuration file. # See smtpd.conf(5) for more information. srs key REDACTED srs key backup REDACTED ## Certs pki gamindustri.fr

RE: How to terminate smtpd filters?

2024-04-02 Thread andrew
I should have included more information. OS is FreeBSD 13.2. smtpd is 7.3.0 which is the latest in the pkg collection. Originally, the only change I made to the filter, was add #!/usr/local/bin/python3.9 and made afilter.py executable. All other filters terminate correctly when smtpd exits

Re: How to terminate smtpd filters?

2024-04-02 Thread Tassilo Philipp
/ PR_SET_PDEATHSIG.) On Tue, Apr 02, 2024 at 06:53:39AM +, gil...@poolp.org wrote: April 2, 2024 4:47 AM, and...@tekrealm.net wrote: What signals a termination for smtpd filters? I'm using the code at https://github.com/Beutlin/howto-opensmtpd-filters-and-reports, Which works great, except

Re: How to terminate smtpd filters?

2024-04-02 Thread gilles
April 2, 2024 4:47 AM, and...@tekrealm.net wrote: > What signals a termination for smtpd filters? > > I'm using the code at > https://github.com/Beutlin/howto-opensmtpd-filters-and-reports, > Which works great, except for when smtpd gets shutdown. The script continues > to run

How to terminate smtpd filters?

2024-04-01 Thread andrew
What signals a termination for smtpd filters? I'm using the code at https://github.com/Beutlin/howto-opensmtpd-filters-and-reports, Which works great, except for when smtpd gets shutdown. The script continues to run and consumes up to 100% cpu time, while keeping the smtpd parent? process

Re: Example of smtpd-filters

2023-10-21 Thread Omar Polo
like to stress the point that a key difference of OpenSMTPD' filters is that they DO NOT EXIT. A filter is just a program (or a script) that is executed by smtpd at start and never exits. If a filter quits, it's a non-recoverable failure and smtpd dies too. The filter and smtpd talk via a simple

Re: Example of smtpd-filters

2023-10-20 Thread Tassilo Philipp
You basically write a script that processes incoming lines on stdin, and writes back to stdout. The protocol is described in smtpd-filters(7). This basic idea in lua would be something like: for line in io.lines() do if line == 'in' then io.write('out') end end Now handle

Re: Example of smtpd-filters

2023-10-20 Thread Sagar Acharya
bar, accept. >> >> Such a sample script would help very much to support users write their own >> custom filters. Thanking you >> Sagar Acharya >> https://humaaraartha.in/selfdost/selfdost.html >>

Re: Example of smtpd-filters

2023-10-20 Thread Tassilo Philipp
there is myfilter.lua within /etc/smtpd/ Can one please help with a sample whose pseudocode goes like fetch(mail)if mailbody contains foo, reject, else if mailbody contains bar, accept. Such a sample script would help very much to support users write their own custom filters. Thanking you Sagar Acharya https

Example of smtpd-filters

2023-10-20 Thread Sagar Acharya
script would help very much to support users write their own custom filters. Thanking you Sagar Acharya https://humaaraartha.in/selfdost/selfdost.html

Re: Can OpenSMTPD filters rewrite MAIL FROM based on a message header?

2023-05-18 Thread gilles
A which contains the headers is emitted by the client AFTER that MAIL FROM and RCPT TO are both accepted, so it's already too late to rewrite them. > From reading the smtpd-filters man page, and the palant.info article [1] it > seems that the filter > would first receive the MAIL FR

Can OpenSMTPD filters rewrite MAIL FROM based on a message header?

2023-05-18 Thread Pēteris Caune
Hello, Is it possible to configure OpenSMTPD in some way so that it would grab a specific header from an email message, and use it in the MAIL FROM field? >From reading the smtpd-filters man page, and the palant.info article [1] it >seems that the filter would first receive the MAIL FROM

smtp-out reporting / outbound filters

2022-12-20 Thread Tobias Fiebig
Heho, i am currently looking at adding MTA-STS/DANE support to my mailer; However, these are not supported in opensmtpd. Given my limited coding abilities, i figured it might make more sense to try implementing that as a filter, given that [1] mentions outbound filters. however, man smtpd-filters

Questions regarding filters

2022-03-03 Thread Dave Anderson
I'm new to OpenSMTPd (on OpenBSD 7.0-release) and when I started looking into filters I came up with some questions that the smtpd.conf manpage doesn't seem to answer. - for 'filter ... proc ...' and 'filter ... proc-exec ...' where in the processing of the message is the filter invoked

Re: what happened to smtpd-filters.7 ?

2021-03-19 Thread Harald Dunkel
Hi Martin, thank you very much for your response. I stumbled over this lost man page looking for additional information about the filters mentioned on https://man.openbsd.org/smtpd.conf. Apparently there are a few more unused source files in the git repository. They are very hard to detect

Re: what happened to smtpd-filters.7 ?

2021-03-19 Thread Martijn van Duren
filters are implemented in lka_filter.c. According to cvs log filter.c is removed in 2017 and was probably part of the first filter attempt. smtpd-filters.7 has never been hooked up to the build. Probably because it needs a little more scrutiny. But most in there can be used. martijn@ On Fri

what happened to smtpd-filters.7 ?

2021-03-19 Thread Harald Dunkel
Hi folks, looking at github there is a file "smtpd-filters.7" and "filter.c" in smtpd, but apparently they are not used at build or install time. configure.ac doesn't mention them, either, so I wonder whats the story here? Have they been forgotten? Obsolete code? Regards Harri

Re: how to watch opensmtpd filters at work?

2021-01-07 Thread Harald Dunkel
On 1/7/21 3:03 PM, Martijn van Duren wrote: Could you show your config, steps to reproduce and expected behaviour? Because I'm not entirely sure what you try to achieve. I was trying to see which rules in smtpd.conf match. "smtpctl trace all" didn't work. Problem was, I hadn't enabled debug

Re: how to watch opensmtpd filters at work?

2021-01-07 Thread edgar
On Jan 7, 2021 5:45 AM, Harald Dunkel wrote:Hi folks, for debugging I would like to know which "match" line does actually match the incoming EMails. Is there some option for opensmtpd to watch it? "-v" seems to be insufficient. Every insightful comment would be highly appreciated.

Re: how to watch opensmtpd filters at work?

2021-01-07 Thread Martijn van Duren
Could you show your config, steps to reproduce and expected behaviour? Because I'm not entirely sure what you try to achieve. On Thu, 2021-01-07 at 13:24 +0100, Harald Dunkel wrote: > On 1/7/21 1:03 PM, Martijn van Duren wrote: > > Your question isn't really specific, but my best guess is that

Re: how to watch opensmtpd filters at work?

2021-01-07 Thread Harald Dunkel
On 1/7/21 1:03 PM, Martijn van Duren wrote: Your question isn't really specific, but my best guess is that -Tfilters will do the trick. I tried "smtpctl trace all", but there was no visual effect. Regards Harri

Re: how to watch opensmtpd filters at work?

2021-01-07 Thread Martijn van Duren
Your question isn't really specific, but my best guess is that -Tfilters will do the trick. martijn@ On Thu, 2021-01-07 at 12:45 +0100, Harald Dunkel wrote: > Hi folks, > > for debugging I would like to know which "match" line does > actually match the incoming EMails. Is there some option for

how to watch opensmtpd filters at work?

2021-01-07 Thread Harald Dunkel
Hi folks, for debugging I would like to know which "match" line does actually match the incoming EMails. Is there some option for opensmtpd to watch it? "-v" seems to be insufficient. Every insightful comment would be highly appreciated. Regards Harri

Re: smtpd-filters.7 patch

2020-01-26 Thread Edgar Pettijohn
reporting is informative only. I felt that the line stating it was a one-way stream covered it. Mainly it just made me stumble on the line and have to reread it a couple of times. Edgar diff --git a/smtpd/smtpd-filters.7 b/smtpd/smtpd-filters.7 index 1e1a27ef..bf563174 100644 --- a/smtpd/smtpd

Re: smtpd-filters.7 patch

2020-01-25 Thread Edgar Pettijohn
On 01/25/20 14:08, gil...@poolp.org wrote: The diff reads ok but I wonder why you removed this sentence: -No decision is ever taken by the report stream. I think it made it a bit more clear that reporting is informative only. I felt that the line stating it was a one-way stream covered

Re: smtpd-filters.7 patch

2020-01-25 Thread gilles
The diff reads ok but I wonder why you removed this sentence: -No decision is ever taken by the report stream. I think it made it a bit more clear that reporting is informative only.

smtpd-filters.7 patch

2020-01-25 Thread Edgar Pettijohn
diff --git a/smtpd/smtpd-filters.7 b/smtpd/smtpd-filters.7 index 1e1a27ef..3cdb10e1 100644 --- a/smtpd/smtpd-filters.7 +++ b/smtpd/smtpd-filters.7 @@ -89,22 +89,21 @@ to inform in real-time about events that are occurring in the daemon. The report events do not expect an answer from .Nm

Re: Questions About Filters

2020-01-03 Thread Antonino Sidoti
) we check (match) if reverse dns is invalid (!rdns) and if so then disconnect the session. For invalid, this would mean no reverse dns, or an incorrectly configured reverse dns. I did read the man page about ’smtpd.conf’, more so about filters and wanted be sure I comprehend it. Thanks Nin

Re: Questions About Filters

2020-01-03 Thread gilles
January 4, 2020 12:25 AM, "Antonino Sidoti" wrote: > Hello, > Hello, > I have some basic questions about filters? > > What do we need to negate the rdns for the following command? > > filter f01 phase connect match !rdns disconnect "550 missi

Questions About Filters

2020-01-03 Thread Antonino Sidoti
Hello, I have some basic questions about filters? What do we need to negate the rdns for the following command? filter f01 phase connect match !rdns disconnect "550 missing rDNS” Can someone please explain the difference between reject and disconnect when used in a filter?

Re: Question about OpenSMTPD and Debian package and filters/spam filtering

2019-11-28 Thread Demetri A. Mkobaranov
On 8/21/19 12:50 PM, Michiel van Es wrote: I am running a small VPS with 1 GB memory with Debian 10 amd64 with OpenSMTPD (6.0.3) Hello, can you really use Buster's official opensmptd package? I tried it about 3 weeks ago and it was broken out of the box for me (can't really remember what

Re: Filters and rctp-to rewrite.

2019-09-10 Thread Giovanni Bechis
On 9/9/19 7:16 PM, Reio Remma wrote: > On 09.09.2019 20:03, Giovanni Bechis wrote: >>> I'm currently using amavisd-new with the quarantine feature, but I'm >>> itching to switch to Rspamd (greylisting here I come!). >>> >> amavisd-new 2.12 has rspamd support, have you tried it ? > > Curious! I

Re: Filters and rctp-to rewrite.

2019-09-09 Thread gilles
On Mon, Sep 09, 2019 at 07:48:16PM +0300, Reio Remma wrote: > On 09.09.2019 18:13, Martijn van Duren wrote: > On 9/9/19 3:37 PM, Reio Remma wrote: >> Hello! >> >> Slowly digging into filters. >> >> Now I'm curious if it's possible to modify the recipient aft

Re: Filters and rctp-to rewrite.

2019-09-09 Thread Reio Remma
On 09.09.2019 20:03, Giovanni Bechis wrote: I'm currently using amavisd-new with the quarantine feature, but I'm itching to switch to Rspamd (greylisting here I come!). amavisd-new 2.12 has rspamd support, have you tried it ? Curious! I see the project has again switched hands, if you mean

Re: Filters and rctp-to rewrite.

2019-09-09 Thread Giovanni Bechis
On 9/9/19 6:48 PM, Reio Remma wrote: > On 09.09.2019 18:13, Martijn van Duren wrote: >> On 9/9/19 3:37 PM, Reio Remma wrote: >>> Hello! >>> >>> Slowly digging into filters. >>> >>> Now I'm curious if it's possible to modify the recipient after

Re: Filters and rctp-to rewrite.

2019-09-09 Thread Reio Remma
On 09.09.2019 18:13, Martijn van Duren wrote: On 9/9/19 3:37 PM, Reio Remma wrote: Hello! Slowly digging into filters. Now I'm curious if it's possible to modify the recipient after say spam check in data-line? I get the impression that rewriting rcpt-to at that stage is impossible, but my

Re: Filters and rctp-to rewrite.

2019-09-09 Thread gilles
September 9, 2019 3:37 PM, "Reio Remma" wrote: > Hello! > Hello, > Slowly digging into filters. > > Now I'm curious if it's possible to modify the recipient after say spam check > in data-line? I get > the impression that rewriting rcpt-to at that stage is i

Filters and rctp-to rewrite.

2019-09-09 Thread Reio Remma
Hello! Slowly digging into filters. Now I'm curious if it's possible to modify the recipient after say spam check in data-line? I get the impression that rewriting rcpt-to at that stage is impossible, but my goal would be to redirect/quarantine high scoring spam to a special e-mail address

Re: Question about OpenSMTPD and Debian package and filters/spam filtering

2019-08-21 Thread Michiel van Es
ate email and am looking what my best options are >> to limit spam. >> I know there are some filters from Joerg >> (https://www.mail-archive.com/misc@opensmtpd.org/msg04402.html) but am not >> sure if these will work with my version of OpenSMTPD (I get a syntax error >

Re: Question about OpenSMTPD and Debian package and filters/spam filtering

2019-08-21 Thread Gilles Chehade
On Wed, Aug 21, 2019 at 12:50:10PM +0200, Michiel van Es wrote: > Hi! > Hi, > I am running a small VPS with 1 GB memory with Debian 10 amd64 with OpenSMTPD > (6.0.3) for private email and am looking what my best options are to limit > spam. > I know there are some

Question about OpenSMTPD and Debian package and filters/spam filtering

2019-08-21 Thread Michiel van Es
Hi! I am running a small VPS with 1 GB memory with Debian 10 amd64 with OpenSMTPD (6.0.3) for private email and am looking what my best options are to limit spam. I know there are some filters from Joerg (https://www.mail-archive.com/misc@opensmtpd.org/msg04402.html) but am not sure

Re: Filters guidance request

2019-04-30 Thread Gilles Chehade
le release is out I will start documenting and making some of the changes I wanted so that it's "stable" in 6.6. If you're a developer, you can use filters in 6.5, you just need to be advanced enough to read code. On Sat, Apr 27, 2019 at 01:03:57AM +0200, Martijn van Duren wrote: >

Re: OpenSMTPD filters

2018-11-03 Thread Pete
Yay, Christmas is pretty early this year. ;) > Hi, > I have started committing filters support to OpenBSD today in order > to get them nice and ready for the next major release. > The only part missing at this point is DATA filtering which I'll > probably finish by the

OpenSMTPD filters

2018-11-03 Thread Gilles Chehade
Hi,I have started committing filters support to OpenBSD today in order to get them nice and ready for the next major release.The only part missing at this point is DATA filtering which I'll probably finish by the end of November.Filters are in development meaning that keywords will change

Re: Death of filters?

2017-09-21 Thread Jason A. Donenfeld
On Thu, Sep 21, 2017 at 5:09 PM, Gilles Chehade wrote: > we have something else which we will disclose shortly Cool, looking forward! -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

Re: Death of filters?

2017-09-21 Thread Gilles Chehade
On Thu, Sep 21, 2017 at 01:41:51PM +0200, Jason A. Donenfeld wrote: > Hey, > > I noticed you've removed support for filters in the latest CVS. Does > this mean that avenue of development is totally dead? Or do you have > something else that will be released with the next version?

Death of filters?

2017-09-21 Thread Jason A. Donenfeld
Hey, I noticed you've removed support for filters in the latest CVS. Does this mean that avenue of development is totally dead? Or do you have something else that will be released with the next version? Jason -- You received this mail because you are subscribed to misc@opensmtpd.org

Re: Simple Filters

2017-08-09 Thread Gilles Chehade
On Wed, Aug 09, 2017 at 07:42:50PM +1000, Damian McGuckin wrote: > > Where are simple filters at? I noticed they are still experimental? Has > anything progressed recently? > > Just looking for something that will allow blocking on Sender, Recipient, > and Subject (with patter

Simple Filters

2017-08-09 Thread Damian McGuckin
Where are simple filters at? I noticed they are still experimental? Has anything progressed recently? Just looking for something that will allow blocking on Sender, Recipient, and Subject (with pattern matching for all of these). As a potential alternative, how much extra load is placed

Re: What happened to filters?

2016-11-17 Thread Gilles Chehade
On Thu, Nov 17, 2016 at 12:16:04PM +1100, Damian McGuckin wrote: > > I was looking to run with 'OpenSMTPD' but I really need the ability to use > RBLs. > > Anyway, if I turn off and 'smtpd' daemon by setting > > smtpd_flags=NO > > in > > /etc/rc.conf.local > > and install the

Re: What happened to filters?

2016-09-02 Thread Thuban
> > > > I'm actually very surprised to see that simple filters like regexp, or > > the very useful spamassassin are gone. > > > > This experimental API has been enabled for developers to help us find if > there are shortcomings, design errors and bugs in the filter laye

Re: What happened to filters?

2016-09-02 Thread Gilles Chehade
On Fri, Sep 02, 2016 at 01:57:18PM +0200, Thuban wrote: > Hello, > I just upgraded openbsd 5.9 to 6.0. As announced on the upgrade page, > some parts of opensmtpd-extras disappeared. Okay. > > I'm actually very surprised to see that simple filters like regexp, or > the very u

Re: What happened to filters?

2016-09-02 Thread Christian Kellermann
* Thuban <thu...@yeuxdelibad.net> [160902 13:57]: > Hello, > I just upgraded openbsd 5.9 to 6.0. As announced on the upgrade page, > some parts of opensmtpd-extras disappeared. Okay. > > I'm actually very surprised to see that simple filters like regexp, or > the very usef

What happened to filters?

2016-09-02 Thread Thuban
Hello, I just upgraded openbsd 5.9 to 6.0. As announced on the upgrade page, some parts of opensmtpd-extras disappeared. Okay. I'm actually very surprised to see that simple filters like regexp, or the very useful spamassassin are gone. Anyway, is there any plan to include them in opensmtpd

about filters

2016-06-22 Thread Gilles Chehade
Ehlo, With last release we made the experimental filters API available so that developers could start writing filters, spot shortcomings in the API and let people test them to try to spot bugs we missed. As we expected, several issues were spotted and we work on fixing them. This is all great

Re: [Filters] share data between callbacks

2016-03-23 Thread fritjof
On Wed, Mar 23, 2016 at 09:49:24AM +0100, Gilles Chehade wrote: > On Wed, Mar 23, 2016 at 12:21:03AM +0100, Joerg Jung wrote: > > On Tue, Mar 22, 2016 at 10:57:00PM +0100, frit...@alokat.org wrote: > > > Hi, > > > > > > is it possible to share data between callback functions in a python-based >

Re: [Filters] share data between callbacks

2016-03-22 Thread Joerg Jung
On Tue, Mar 22, 2016 at 10:57:00PM +0100, frit...@alokat.org wrote: > Hi, > > is it possible to share data between callback functions in a python-based > filter? > I'm looking for something like this one (from the clamav filter): > - filter_api_set_udata > - filter_api_get_udata I think you

Re: Filters

2016-01-02 Thread Damian McGuckin
On Sat, 2 Jan 2016, Sunil Nimmagadda wrote: Filters require you to be -current. On OpenBSD the simplest way to test... Thanks. That's extremely very useful. That was never mentioned anywhere. I'll wait until 5.9 comes out. We never run '-current' to protect sites. Regards - Damian Pacific

Re: Filters

2016-01-02 Thread Joerg Jung
On Sat, Jan 02, 2016 at 04:44:09PM +1100, Damian McGuckin wrote: > > I would like to read something before 'playing' is done. Old, but still mostly valid: https://poolp.org/0xa871/The-state-of-filters Also, all you need can be found in man pages and the most recent opensmtpd-extras

Re: Filters

2016-01-01 Thread Giovanni Bechis
S BLs with OpenSMTPD. Until I >can >do that, I do not want to deploy it. > >I can see the API code in the source try but not the instructions on >how >to use it. > >I found the document 'opensmtpd-LinuxCon2015.conf' by Giovanni Bechis >and >it seem

Filters

2015-12-31 Thread Damian McGuckin
but not the instructions on how to use it. I found the document 'opensmtpd-LinuxCon2015.conf' by Giovanni Bechis and it seems to imply that filters are operational. In fact, it says "there are filters available for dnsbl, regex matching, Spam Assassin, and Clamav integr

opensmptd-extra filters

2015-12-09 Thread Martin de Wendt
Hello. Ist there any good beginner howto the filter in the add-on package should work? Thx. Martin smime.p7s Description: S/MIME Cryptographic Signature

Re: logging filters

2015-07-10 Thread Raf Czlonka
On Fri, Jul 10, 2015 at 08:01:52AM BST, Pete wrote: But i can't get any logging from it in syslog. Is that by design, or am i missing something obvious? Yes, you are :^) man 5 syslog.conf Hint: facility, level and prog. Well, probably not something _that_ obvious. ;) Even with

Re: logging filters

2015-07-10 Thread Pete
But i can't get any logging from it in syslog. Is that by design, or am i missing something obvious? Yes, you are :^) man 5 syslog.conf Hint: facility, level and prog. Well, probably not something _that_ obvious. ;) Even with below config nothing turns up. But when looking at the code,

Re: logging filters

2015-07-10 Thread Pete
smtpd -d gives me this: [...] info: filter-clamav: result stream: Eicar-Test-Signature FOUND warn: clamav_filter: on_eom: REJECT virus id=44fa746c81ec2474 [...] But i can't get any logging from it in syslog. Is that by design, or am i missing something obvious? For

logging filters

2015-07-09 Thread zzd
Hi, I have filter-clamav (and others) plugged into 5.7.1 (OpenBSD 5.7) and it's working fine so far. Thanks for that, it's awesome. smtpd -d gives me this: [...] info: filter-clamav: result stream: Eicar-Test-Signature FOUND warn: clamav_filter: on_eom: REJECT virus

the state of filters

2014-12-12 Thread Gilles Chehade
ohai, I know some of you are _VERY_ interested in filters, so I wrote a blurb on my blog to discuss the state of filters in OpenSMTPD. https://poolp.org/0xa871/The-state-of-filters Feel free to react here ;-) -- Gilles Chehade https://www.poolp.org

Re: wanna help with filters ?

2014-04-15 Thread Gilles Chehade
On Mon, Apr 14, 2014 at 04:20:27PM +0200, Gilles Chehade wrote: Ohai, In June, we will be having a private hackathon with Charles and Eric, to work on the filter API and infrastructure. This will happen at my place, it's kind of unofficial and it's unrelated to OpenBSD's hackathons. [...]

Re: wanna help with filters ?

2014-04-14 Thread Barbier, Jason
and it's unrelated to OpenBSD's hackathons. Why do you care ? If you want filters support in OpenSMTPD, well ... this is a great opportunity for you to actually help us ! During this hackathon, we intend to make the API usable by the public so we kind of need the public to make sure we're

Re: wanna help with filters ?

2014-04-14 Thread Mathieu -
You can count me in. Been quite busy these days, hence I couldn't help, it will be a good way to step in again. Btw, do you have ideas of filters or will we have to come up with some? -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc

Re: wanna help with filters ?

2014-04-14 Thread Gilles Chehade
On Mon, Apr 14, 2014 at 06:18:59PM +0200, Mathieu - wrote: You can count me in. Been quite busy these days, hence I couldn't help, it will be a good way to step in again. Btw, do you have ideas of filters or will we have to come up with some? you will have to come up with some ;-) some

Re: wanna help with filters ?

2014-04-14 Thread Bryan Vyhmeister
Count me in. Bryan -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org