older then that, actually. I want to say 1860s.
The lure of robbing mail because of pay rolls yes. But while I'm not positive, I am pretty sure that the legal sanctions part of it only dates back to the beginning of the 20th century.
Prior to that the Railroads themselves handled it by hiring groups like the Pinkerton Detective Agency (We never sleep ) to hunt them down and kill them.
If you have a reference that says otherwise I'd be happy see it.