Update regarding DNS and Views mystery - solved
So a while a go I had a DNS issue that stumped me. A master nameserver transferring an updated zone to a slave successfully, but queries to the slave server not reflecting the change!
Finally I worked it out. We were implementing views, and we didn't need to be, as our use case was not a case of using different zone files for the same zone and responding accordingly with differing results depending on the requestor client and which acl it matched.
"The email is not valid!" or "The alias is not valid!" in postfixadmin
Before I forget... because it freaked the shit out of me and made me think I broke the postfixadmin database.
When you create a domain in Postfixadmin, that's all fine and dandy. But when you create Mailboxes or Alias in this domain, postfixadmin performs a nameserver lookup only at THIS point in time to check the domain is valid. The helpful response is:
"The EMAIL is not valid!" (for mailbox), or "The ALIAS is not valid!".
In fact, what it means is that the domain is not valid, so this is quite misleading. So don't panic!
I thought I broke things, but all that had happened was that for this particular subdomain, while I had created an MX record for it in the zone, I hadn't reloaded DNS yet, and so a nameserver lookup was failing.
You could wait for DNS propagation (still don't understand why it wasn't almost instant, mail server was also the primary NS), or a quick getaround is to change
$CONF['emailcheck_resolve_domain']='YES';
to
$CONF['emailcheck_resolve_domain']='NO';
In the config.inc.php of postfixadmin, and it'll skip the nameserver lookup.
Phew.