i cut some not usefull routes from incoming and outgoing redistribute like this on my cisco router
i leave only needed routes in this example
.....
router ospf 999
router-id X.X.X.X
log-adjacency-changes
network X.X.X.X 0.0.0.7 area 0
distribute-list 30 out
distribute-list 30 in
.....
access-list 30 permit Y.Y.Y.0 0.0.0.63
access-list 30 permit Z.Z.Z.0 0.0.0.127
access-list 30 permit A.A.A.128 0.0.0.127
access-list 30 permit S.S.S.0 0.0.0.255
.....
how can i make this on mikrotik?