I have got postfix installed on my machine and I am updating virtual_alias on the fly programmatically(using python)(on some action). Once I update the entry in the /etc/pos
import os os.popen("sudo -S /etc/init.d/postifx reload", 'w').write("yourpassword")
This of course is almost always not a good idea as the password is in plain text.