qmail refusing to create virtual domains

Had a weird problem here. I’m kinda new to qmail, so was working at it through webmin. I created a virtual server for myself in order to move my home server to an online server (see my last post for reasons), but webmin 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 verens.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 verens.com
Warning: Could not access (/home/vpopmail/domains/verens.com)
Warning: Failed while attempting to delete domain from auth backend
Warning: Failed to delete directory tree: verens.com

And recreate it:

[root@webworks domains]# ../bin/vadddomain verens.com
Please enter password for postmaster:
enter password again:

All is as it should be.

Oh – also, I came across an errata in the o’reilly book on qmail. When I tried to submit it, though – I got an SQL error (tsk tsk). The error returned was this:

Unable to execute INSERT INTO submission VALUES(0, ‘qmail’, ‘128’, ‘Top information box’, ‘reader question or request for clarification’, ‘The error indicated in the information box – that of a local user being able to send to an address, but an external user not being able to, can also be caused by an MX record pointing to a domain name which is a CNAME of another host. This is pointed out here: http://cr.yp.to/im/cname.html’, ‘Kae Verens’, ‘kae@verens.com’)

The error looks like it was caused by someone changing the database table, but not updating all pages that access that. This could easily have been avoided by changing the syntax used to enter the data to something like this:

insert into submission set
  book='qmail',
  page='128',
  pagepart='Top information box',
  errortype='reader question or request for clarification',
  errordescription='The error indicated in the information box - that of a local user being able to send to an address, but an external user not being able to, can also be caused by an MX record pointing to a domain name which is a CNAME of another host. This is pointed out here: http://cr.yp.to/im/cname.html',
  name='Kae Verens',
  email='kae@verens.com'

Here’s the thing I tried to enter – page 128 of the oreilly qmail book:

The error indicated in the information box – that of a local user being able to send to an address, but an external user not being able to, can also be caused by an MX record pointing to a domain name which is a CNAME of another host. This is pointed out here: http://cr.yp.to/im/cname.html

Comments are closed.

%d bloggers like this: