Closed df-a closed 2 years ago
If all you want is random characters with a special suffix, the easiest way would be using the option --message-id '${rand(24)}@PEACHTREES'
, or something like that.
As for your function, I probably should document somewhere that it doesn't really like generators that return IDs of different lengths.
This is because once the article has been written, changing the length of the message ID would require rewriting the article, whereas if it's of the same length, it'll write the ID "in-place". The workaround Nyuu uses is to force the ID to always be the same length, which is what you're seeing.
You can either change the generator to always generate fixed length IDs, or use the --keep-message-id
option to prevent it changing IDs.
What are the actual post variables that I have access to on the JS end (such as {fnamebase} etc, how should these be referenced from JS)?
It's mentioned in config.js:
// if any of the following are functions, they'll be called with args(filenum, filenumtotal, filename, size, part, parts)
Thank you for the information animetosho. I had the way from config.json already implemented, but it always gave strings of equal (fixed) length. I wanted to change it up and introduce random strings.
I tried with the --keep-message-id option, bit it would still be introducing dashes in the string. They do vary in length, but have dashes at random places and can also vary as to the placement of the required string (which may or may not be completely mangled). In my testing I have realized that these dashes make it so it doesn't fully propagate across the usenet; instead, some providers drop these.
I'll keep playing with this see what I can come up with.
Thanks again!
I've tried your function, but haven't been able to reproduce your issue with --keep-message-id
. Are you checking by looking at the outputted NZB?
If you know of servers which don't like dashes in the Message ID, I can change the default to use a different character. Do you know which servers have such issues?
Maybe I applied it incorrectly.
I would have to add the func to config.js and also add the --keep-message-id
flag to true
in conf.json, right? I did that and it kept doing the same as if I had not added the --keep-message-id
flag at all, i.e. mangle the function output and introduce the string spliced all over the place and also dashes at random. Still random, just not exactly a possible output of the function as I'd have liked.
Do you know which servers have such issues?
Eweka for one drops everything. I think Usenet.farm as well, it will have a lot of failures despite picking up some of it. The funny thing is I see some nzbs that DO have a dash in the message ID and eweka still picks them up correctly, so this may be a bug from the originating server. I will be getting some spread out blocks on many more servers to keep testing, as we may have stumbled upon a bug that has to do with the propagation of the usenet itself, rather than nyuu.
Therefore, hang on with any changes for now, I'm still doing some testing with nyuu's current master build.
Make sure you don't have '--' in the name if you're using the JSON config file (I doubt you have it there, but just in case). What you say is correct otherwise.
You can also set keepMessageId: true
in config.js to change the default if you're not sure it's being set properly.
Thanks for the server examples. I've had no issues with posting to Usenet.farm with dashes in the message ID, so that's interesting to hear.
we may have stumbled upon a bug that has to do with the propagation of the usenet itself
Any propagation issue due to specific message IDs would technically be a bug in server code, as the NNTP spec requires servers to not interpret message IDs. Regardless, there's little users can do about it other than to work around them.
I'd have thought dashes wouldn't be a problem, but if there's a different character which incurs fewer issues/bugs overall, I have no issues with changing the default.
Thanks for the investigations - am interested to hear your future results.
Hi there @animetosho , I have kind of experimented quite a bit with this.
Whenever you introduce too much randomization, some servers will drop some/most/every packet(s). I assume it's some sort of spam protection. Notably Eweka does this. UsenetExpress backbones do not have the same "problem". I haven't been able to test farm.
But dashes are fine. This block works fine, for example
<segment bytes="756743" number="1">fuUrtlWxiWD8iXjL-Yc-mTID2RNUo8DKOrl</segment>
<segment bytes="756444" number="2">ZEuKkziDpUcvo1UfoT7rjGpBaG6xfUfS9T</segment>
<segment bytes="756752" number="3">sxumnXpT1sXBBu3BkD4QbgD958uSM4IJiR</segment>
<segment bytes="756535" number="4">b09wXs7ormd5lq2ckNPxT7Vi7sdKm8AGXe8</segment>
<segment bytes="756535" number="5">vOZq-twSOjKz4RNSsnQUjxD2G9lFmmFDmbM</segment>
<segment bytes="756335" number="6">2QGIMSU2sAPNUUErqW3OYUF6iJizrWVw3G</segment>
<segment bytes="756584" number="7">6-x4w1k3xINCX3y-UI4Nc5QWb19cIG1uqm</segment>
<segment bytes="756439" number="8">ZLelJl3yFJR6dSwRVFlM2bzSPi3wVlCMEpj</segment>
<segment bytes="756464" number="9">fobN5SLkgcTgzSRZmRYybV744EGyVN-Ogc-</segment>
<segment bytes="756676" number="10">30d4wDgnX6ACMe-kP2lyQ2R5EYYvVccvX</segment>
<segment bytes="756523" number="11">fIyJnvdkaTkyqfuMto2jfIfxFL-CcVFnZ</segment>
Everything works nicely.
Alright, thanks for getting back with your results.
Hello there animetosho,
I have been trying to manipulate message IDs in nyuu. Mainly, I want randomization with some strings and bits of strings in it. I have made a function for config.js, which should have the following outputs(examples)
As you can see, random string plus some constants. Notably no dashes, periods, nor any other special characters.
When I do an upload with nyuu while invoking this function, these are the results I get (again, a small sample but to show the results):
A whole lots of dashes are introduced and I don't understand why. Less importantly but equally puzzling is how the string at the end gets garbled. The reason I want to do away with these dashes is that some news servers do see these as spam and drops them like it's hot.
I try with a simpler function, and now I get
Still adds random dashes to the output. I can't figure out why.
So, my questions are: