  Using the time-evolving block decimation, we study the spin transport through
spin-1/2 and spin-1 XXZ chains subjected to an external magnetic field and
contacted to noninteracting fermionic leads. For generic system-lead couplings,
the spin conductance exhibits several resonances as a function of the
magnetic-field strength. In the spin-1/2 but not the spin-1 case, the coupling
to the leads can be fine-tuned to reach a conducting fixed point, where the
peak structure is washed out and the spin conductance is large throughout the
gapless Luttinger-liquid phase. For the Haldane phase of the spin-1 chain, we
analyse how the spin transport is affected by spin-1/2 edge states, and argue
that two-impurity Kondo physics is realised.
