[BlueOnyx:27294] Re: Error sending mail with PHP script.

Michael Stauber mstauber at blueonyx.it
Fri Oct 25 13:21:48 -05 2024


Hi Colin,

> 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";
> 
> The script returns "Email sent successfully." ... but it wasn't!

The recipient address is hardwired to carl at domain.co.uk and there are 
two relevant entries in the maillog:

 > 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>

The MTA failed to lookup domain.co.uk and therefore the email bounced.

The other issue is this:

 > warning: hash:/etc/mailman/virtual-mailman is unavailable. open
 > database /etc/mailman/virtual-mailman.db: No such file or directory

On a 5210R you should have these two files:

[root at 5210r ~]# ls -k1 /etc/mailman/virtual-mailma*
/etc/mailman/virtual-mailman
/etc/mailman/virtual-mailman.db

One or both seem to be missing on your server. Check what you have there.

/etc/mailman/virtual-mailman should be a plain textfile and the 
/etc/mailman/virtual-mailman.db is the database version of it.

If you don't have a /etc/mailman/virtual-mailman on your 5210R, do this:

touch /etc/mailman/virtual-mailman
chown root:mailman /etc/mailman/virtual-mailman
chmod 664 /etc/mailman/virtual-mailman
newaliases
makemap hash /etc/mailman/virtual-mailman < /etc/mailman/virtual-mailman

That should get this part sorted, although it would be worthwhile to 
find out if you already have /etc/mailman/virtual-mailman and see if it 
somehow has been corrupted. If it is corrupted, the "makemap hash ..." 
command above will tell you which line in the existing file it has 
issues with.

-- 
With best regards

Michael Stauber


More information about the Blueonyx mailing list