Just connect to MySQL server, insert/delete/update related SQL records.
iRedMail ships script under iRedMail-0.8.4/tools/ to help you create mail users, just talk a look.
P.S. It should be much cheaper to purchase iRedAdmin-Pro than writing your own admin panel.