Qmail refusing to create virtual domains
Had a weird problem here. It complained that I could not assign a password to my user, as the domain could not be created (!?).
This was weird – I wasn’t doing anything strange… so I tried it from the console, logged in through SSH:
[root@webworks domains]# ../bin/vadddomain domain.com Please enter password for postmaster: enter password again: Failure while attempting to remove_line() the locals file Error. Failed to add domain to assign file Error: Could not update file
The solution is vaguely indicated there. All you need to do is this:
[root@webworks domains]# touch /var/qmail/control/locals
Then, remove the failed domain, ignoring the errors:
[root@webworks domains]# ../bin/vdeldomain domain.com Warning: Could not access (/home/vpopmail/domains/domain.com) Warning: Failed while attempting to delete domain from auth backend Warning: Failed to delete directory tree: domain.com
And recreate it:
[root@webworks domains]# ../bin/vadddomain domain.com Please enter password for postmaster: enter password again:
All Done