Would you mind pasting me the code again with that rule in there? Don't wanna mess it up I'm not totally clear on where it should go or the syntax.
You know that you can drag and drop rules to change their order within a chain - so if you need to adjust it, that's how...
whenever you add a rule:
/ip firewall masquerade add chain=X {stuff}
This puts the new rule on the end of the chain named X.
Anyway - to add the return rule at the end of the classify chain, just type this into the terminal:
/ip firewall masquerade add chain=classify action=return
When you make a custom chain, the system won't use it by default - you tell one of the system chains when you want it to be used. They're quite useful because you can hook the same chain up in multiple places - for instance if you wanted to classify new outgoing connections from the Mikrotik by the same set of rules, then you could just put a jump rule in the output mangle chain that jumps into 'classify', and the same rules now apply to both "prerouting" and "output"
Return means to go back into whatever chain it was that jumped into this chain. I don't think you can put action=return on a system chain such as postrouting - it wouldn't make sense.
Chains make sense if you find yourself putting lots of rules in a row with lots of similar criteria on them.
For example, suppose you have a DMZ host on a DMZ interface, and the host is 192.168.10.12 and you want to allow http, https, and dns from the world, you want to allow a whitelisted host to have full access (suppose the whitelisted host is where you originate management from for services such as remote desktop, etc - you want this host to be able to do everything) - furthermore, you have a blacklist but only for this one host... this takes several rules to do:
/ip firewall filter
add chain=forward connection-state=established,related
add chain=forward out-interface=dmz dst-address=192.168.10.12 src-address-list=backlist action=drop
add chain=forward out-interface=dmz dst-address=192.168.10.12 protocol=tcp dst-port=80,443
add chain=forward out-interface=dmz dst-address=192.168.10.12 protocol=udp dst-port=53
add chain=forward out-interface=dmz dst-address=192.168.10.12 src-address-list=whitelist
add chain=forward out-interface=dmz dst-address=192.168.10.12 action=drop
add chain=forward out-interface=wlan1 action=accept
Note that this configuration causes the router to repeatedly check the interface and destination IP address - which wastes cpu cycles at the very least, and it also clutters up your view with lots of rules.
If a packet comes along that isn't going to 192.168.10.12, but is a new connection, then it has to pass all 5 of the remaining rules before any other rules can be checked and might apply to this packet.... if all of these checks are in a separate chain, then you can make things faster for packets like this if they only have a single rule to get past:
/ip firewall filter
add chain=forward connection-state=established,related
add chain=forward out-interface=dmz dst-address=192.168.10.12 action=jump jump-target=server-filter
add chain=forward out-interface=wlan1 action=accept
add chain=server-filter src-address-list=blacklist action=drop
add chain=server-filter protocol=tcp dst-port=80,443
add chain=server-filter protocol=udp dst-port=53
add chain=server-filter src-address-list=whitelist
add chain=server-filter action=drop
See how short the forward chain becomes for packets that aren't going to the server?
See how much simpler each rule is for packets that ARE going to the server?
In this particular case, the default rule of the server-filter rule is to drop everything that doesn't match, but you could actually just return the packet because you might have some default log targets or something back out in the forward chain.... but this is all a matter of how you design things.