Hi everyone,
For some reason an email script (that uses phpmailer) which has worked perfectly fine for the past 8 months, suddenly decided to stop working the other day. This is an extract of the php script....
Code:require(ROOT . 'includes/class.phpmailer.php'); require(ROOT . 'includes/class.pop3.php'); $pop = new POP3(); $pop->Authorise('mail.domain.com', 110, 30, 'username', 'password', 1); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 2; $mail->IsHTML(true); $mail->Host = 'mail.domain.com'; $mail->From = test@example.com; $mail->FromName = 'Firstname Lastname'; $mail->Subject = $subject; $mail->Body = $body; $mail->AddAddress($to, $fullname); if (!$mail->Send()) { echo $mail->ErrorInfo; exit; }
We couldn't use the standard mail() function as it was a windows server (IIS), so we used the phpmailer script, which worked perfectly fine.
Then it suddenly gave these errors:
550-(webserver) [1.2.3.4] is currently not permitted to relay through
550-this server. Perhaps you have not logged into the pop/imap server in the
550-last 30 minutes or do not have SMTP Authentication turned on in your email 550 client.
SMTP -> ERROR: RCPT not accepted from server:
550-(webserver) [1.2.3.4] is currently not permitted to relay through
550-this server. Perhaps you have not logged into the pop/imap server in the
550-last 30 minutes or do not have SMTP Authentication turned on in your email
550 client.
In the end i had to modify the script so it didnt use that relay server and emailed it direct to the host mx records of the senders email domain name.
This worked, however, i couldn't give my client a responsable explanation as to why it suddenly stopped working in the first place.
After checking the Advanced Exim Configuration Editor, i noticed it uses the following file:
domainlist relay_domains = lsearch;/etc/localdomains
I then opened up that file and added the ip address of the server that script was hosted on, and low and behold the orignal script worked.
So my question is, how could this of happened in the first place? (Was there a cpanel upgrade that could of caused the relay to be mass blocked?)
Thanks for your answers & time!



LinkBack URL
About LinkBacks
Reply With Quote





