Page MenuHomeDevCentral

vma send "Could not send settings email" — 5.7.0 Must issue a STARTTLS command first
Closed, ResolvedPublic

Description

When we ask to send a mail with the settings, it shows the following error: "Could not send settings email".

The message is accurate: the mail isn't sent.

Tests with mail() function directly from PHP cli work. So, yes, PHP from www-data can send mails to external domains.

On previous software version + Debian Wheezy, all worked like a charm.

This only affects vma.nasqueron.org: all other tests to send mails work correctly.

Event Timeline

This error means MailboxController::_sendSettingsEmail method return false.

application/controllers/MailboxController.php
if( !$error )
{
    if( $this->_sendSettingsEmail( false, '', false, $email ) )
        $this->addMessage( _( 'Settings email successfully sent' ), OSS_Message::SUCCESS );
    else
        $this->addMessage( _( 'Could not send settings email' ), OSS_Message::ERROR );

    print "ok";
    die();
}

This means an exception is thrown here in _sendSettingsEmail:

application/controllers/MailboxController.php
try {
    $mailer->send();
} catch( Exception $e ) {
    return false;
}
dereckson renamed this task from vma send "Could not send settings email" to vma send "Could not send settings email" — 5.7.0 Must issue a STARTTLS command first.Jan 14 2017, 07:14

So, vmailadmin tries through Zend framework to use our STMP server.

But our SMTP server require STARTTLS.

So it returns 5.7.0 Must issue a STARTTLS command first.

After T1103 has been enforced, mail has correctly been sent:

Jan 14 07:55:06 mail.nasqueron.org postfix/smtpd[14742]: 5EBFDC0396CB: client=localhost[127.0.0.1]
Jan 14 07:55:06 mail.nasqueron.org postfix/cleanup[14750]: 5EBFDC0396CB: message-id=<20170114075506.5EBFDC0396CB@mail.nasqueron.org>
Jan 14 07:55:06 mail.nasqueron.org postfix/qmgr[14718]: 5EBFDC0396CB: from=<vimbadmin-no-reply@mail.nasqueron.org>, size=2773, nrcpt=1 (queue active)
Jan 14 07:55:06 mail.nasqueron.org postfix/smtpd[14742]: disconnect from localhost[127.0.0.1]
Jan 14 07:55:06 mail.nasqueron.org postfix/smtp[14752]: 5EBFDC0396CB: to=<…>, relay=aspmx.l.google.com[66.102.1.27]:25, delay=0.51, delays=0.08/0.03/0.05/0.35, dsn=2.0.0, status=sent (250 2.0.0 OK 1484380506 y31si13996727wrc.202 - gsmtp)
Jan 14 07:55:06 mail.nasqueron.org postfix/qmgr[14718]: 5EBFDC0396CB: removed