[BlueOnyx:27293] Error sending mail with PHP script.

Colin Jack colin at mainline.co.uk
Fri Oct 25 08:35:40 -05 2024


Good afternoon.

My brain doesn't seem to be working today so if someone can help it would be appreciated!

We have migrated a customer vsite from 5209R to 5210R using easymigrate and all good.
5210R is up to date.

The site uses php to send mail from their website and this has always worked fine - until now.

Simple script:

// Define the recipient's email address
$to = "carl at domain.co.uk";

// Define the subject of the email
$subject = "Test Email from PHP";

// Define the message body
$message = "Hello, this is a test email sent from a PHP script.";

// Define additional headers
$headers = "From: intranet at domain.co.uk"."\r\n";
$headers .= "Reply-To: intranet at domain.co.uk"."\r\n";
$headers .= "X-Mailer: PHP/".phpversion();

// Send the email
if(mail($to,$subject,$message,$headers)){
    echo "Email sent successfully.";
}else{
    echo "Failed to send email.";
}

The script returns "Email sent successfully." ... but it wasn't!

This from maillog:

Oct 25 14:18:14 broadwater postfix/smtpd[5387]: error: open database /etc/mailman/aliases.db: No such file or directory
Oct 25 14:18:14 broadwater postfix/smtpd[5387]: error: open database /etc/mailman/virtual-mailman.db: No such file or directory
Oct 25 14:18:14 broadwater postfix/smtpd[5387]: connect from localhost.localdomain[127.0.0.1]
Oct 25 14:18:14 broadwater sendmail[5386]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Oct 25 14:18:14 broadwater postfix/smtpd[5387]: Anonymous TLS connection established from localhost.localdomain[127.0.0.1]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
Oct 25 14:18:14 broadwater postfix/smtpd[5387]: warning: hash:/etc/mailman/virtual-mailman is unavailable. open database /etc/mailman/virtual-mailman.db: No such file or directory
Oct 25 14:18:14 broadwater postfix/smtpd[5387]: warning: hash:/etc/mailman/virtual-mailman lookup error for "carl at domain.co.uk"
Oct 25 14:18:14 broadwater postfix/smtpd[5387]: NOQUEUE: reject: RCPT from localhost.localdomain[127.0.0.1]: 451 4.3.0 <carl at domain.co.uk>: Temporary lookup failure; from=<root at broadwater.server.co.uk> to=<carl at domain.co.uk> proto=ESMTP helo=<broadwater.server.co.uk>
Oct 25 14:18:14 broadwater sendmail[5386]: 49PDIEPR005386: to=carl at domain.co.uk, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30244, relay=[127.0.0.1] [127.0.0.1], dsn=4.3.0, stat=Deferred: 451 4.3.0 <carl at domain.co.uk>: Temporary lookup failure
Oct 25 14:18:14 broadwater postfix/smtpd[5387]: disconnect from localhost.localdomain[127.0.0.1] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=6/8

Email is disabled on the vsite
I can use dig on the server to get correct MX 

I would appreciate any ideas that I have not considered. __

Thanks

Colin




More information about the Blueonyx mailing list