Right…I must have forgotten to install sendmail, because mail wasn't working for WordPress. First, to verify that sendmail wasn't working I ran this PHP script (thanks to phpeasystep.com)
// send e-mail to ...
// Your subject
$header="from: your name <your email>";
// Your message
$message.="This is testrn";
$message.="Test again ";
// send email
$sentmail = mail($to,$subject,$message,$header);
// if your email succesfully sent
echo "Email Has Been Sent .";
echo "Cannot Send Email ";
That confirmed it. And the fix was easy:
Doing this exposed a flaw in my hosts file and ZYXware.com had the answer
sudo gedit /etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.1.1 zyxware01.localdomain zyxware01
If you have a static IP you can replace 127.0.1.1 with your static IP.
So, now mail works from php and, more importantly, WordPress.
Sheesh…Ubuntu is picky. Here's (almost) exactly what I have for the top half of my hosts file
::1 myhostname localhost6.localdomain6 localhost6
The spaces are actually tabs, I don't know if it matters.
I also don't know what is needed and what is not, but I mimicked this layout on a new server and it worked; the MTA blah-blah service no longer takes forever and sendmail works nice and quickly.