Martijn van Duren <openbsd+t...@list.imperialat.at> wrote: > Does this filter actually work for you? Not by my testing, nor my > understanding of filters. Filter-dkimsign works during the > filter-dataline phase, so you'd have to circumvent that one, which is > not supported.
Finally got around to test it. Found the problem too late in the night to fetch the sources, build and see if it solved the issue for me. You're correct, the mail is getting signed everytime anyways. Got the impression that `commit` was the right phase after running `smtpd -dvvv -T filters` when I first tried with setting `bypass` in `mail-from` phase: 15eac9cd3aadddc1 filters session-begin 15eac9cd3aadddc1 filters protocol phase=connect, resume=n, action=proceed 15eac9cd3aadddc1 filters protocol phase=ehlo, resume=n, action=proceed 15eac9cd3aadddc1 filters protocol phase=mail-from, resume=n, action=bypass, filter=ext_relay, query=lucas@domain.invalid 15eac9cd3aadddc1 filters protocol phase=rcpt-to, resume=n, action=proceed 15eac9cd3aadddc1 filters protocol phase=data, resume=n, action=proceed smtp: 0x8941daca000: fd 16 from queue smtp: 0x8941daca000: message fd 16 15eac9cd3aadddc1 filters data-begin fd=11 smtp: 0x8941daca000: fd 17 from lka smtp: 0x8941daca000: filter fd 17 smtp: 0x8941daca000: message begin 15eac9cd3aadddc1 filters protocol phase=commit, resume=n, action=deferred, filter=dkimsign 15eac9cd3aadddc1 filters protocol phase=connect, resume=y, action=proceed `dkimsign` is only showing up in `commit` phase. After patching, it looks like this: 4ebd6c3015e64c8c smtp connected address=local host=mx.sexy.is 4ebd6c3015e64c8c filters session-begin 4ebd6c3015e64c8c filters protocol phase=connect, resume=n, action=proceed 4ebd6c3015e64c8c filters protocol phase=ehlo, resume=n, action=proceed 4ebd6c3015e64c8c filters protocol phase=mail-from, resume=n, action=proceed 4ebd6c3015e64c8c filters protocol phase=rcpt-to, resume=n, action=proceed 4ebd6c3015e64c8c filters protocol phase=data, resume=n, action=proceed smtp: 0x908842d5000: fd 16 from queue smtp: 0x908842d5000: message fd 16 4ebd6c3015e64c8c filters data-begin fd=11 smtp: 0x908842d5000: fd 17 from lka smtp: 0x908842d5000: filter fd 17 smtp: 0x908842d5000: message begin 4ebd6c3015e64c8c filters protocol phase=commit, resume=n, action=bypass, filter=ext_relay_dkimsign_override, query= but `filter-dkimsign` is being executed anyways. Later on I'll give hijacking `data` phase a shot, but I wonder if it'll, as `filter-dkimsign` registers for both `data-line` and `commit`. What will if I just hijack `data` and not `commit`? Will `filter-dkimsign` produce a empty email? ----- >8 ----- That being said, I still think that either the grammar is wrong, or the manpage should mention that `bypass` isn't available at `commit`. -Lucas