Green’s Dictionary of Slang

mack n.1

In exclamations

by the mack! (also by the mackin(s)! by the mackings! by the maskins!) [? SE by the Mass! or by Mary!]

[mid-16C–mid-17C] a general oath (cf. holy mackerel! excl.).