most likely you would need a custom setup... that toaster looks sweet but I'm not sure how easily it is to grow
we are also in the process of moving out filtering away from SA to rspamd with the help of Haraka
s/out/our/
__smf__ joined the channel
__smf__ has quit
__smf__ joined the channel
I use the rspamd plugin and my own plugin, after rspamd, makes use of transaction.data_bytes
shouldn't rspamd update the data_bytes variable with the new data it added in the headers ?
or even more generally, shouldn't the add_header function automatically adjust the data_bytes ?
say that my downstream mail server accepts X data_bytes, I add 5-10 headers which cause me to go over that limit, but when I check data_bytes to make sure I'm good, it shows I'm ok when in fact I'm not
_smf_
last1: see Base64 encoding overhead.
Unless of course the headers you are adding are huge.
data_bytes is the size of the input, not the output FWIW
Trying to keep data_bytes in step with the modified headers would be a waste of time, and it would be unnecessary overhead.
last1
that's what I figured
it's just that I am writing a copy of all inbound e-mails
and I am also writing the file name as S=<size>
which I was getting from data_bytes and it turned out to be incorrect
the only other way I can think of is to write the file to disk, get its size and then rename the file
_smf_
Why is the actual size so important to you?
last1
well, in Maildir it saves dovecot the trouble of finding it rewriting the filename
the files I write will be ready by dovecot directly
read
_smf_ shrugs.
_smf_
Deliver it to Dovecot over LMTP. Problem solved.
last1
I do that too. This is an archive copy
before it goes through filtering
I guess I'll just not write the S parameter and let dovecot figure it out
_smf_
If you save it *before* anything else runs at hook_data_post, then the size should be correct no?
last1
indeed
but I save after rspamd and after my own plugin which writes its own headers
_smf_
I suggest it's not worth it. Let dovecot work it out and rename it. It's hardly expensive to do a rename.
last1
cool, thanks
I was surprised in some cases how big the difference was
failed: Cached message size smaller than expected (458 < 1417