OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Forgot pass mail:smtpmailer did not receive expected 250 (3)

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Forgot pass mail:smtpmailer did not receive expected 250 (3)

Postby formix » Wed Nov 20, 2013 10:20 am

Hello,

I'm configuring an OJS 2.4.2.0 on a Windows server with IIS.

I'm having trouble with Reset Password email.

The mail for registering the website, submitting articles and are beeing corecly sent.
The config.inc.php contains:
Code: Select all
smtp = On
smtp_server=my_server
smtp_port = 25
smtp_auth = LOGIN
smtp_username = my_user
smtp_password = my_pass
allow_envelope_sender = On
default_envelope_sender =my_address@my_host.com


In php error log file I got OJS SMTPMailer: did not receive expected 250 (3)
I modified the SMTPMailer.inc.php file so to show me the sender and the body of the email. The sender is the email that I can use with my SMTP server, and the body is corect.

Can anyone advise me where is the problem?

Thank you!

Dan
formix
 
Posts: 2
Joined: Wed Nov 20, 2013 9:58 am

Re: Forgot pass mail:smtpmailer did not receive expected 250

Postby asmecher » Wed Nov 20, 2013 10:23 am

Hi Dan,

If you can send any emails at all, then your SMTP configuration is correct. If some are being sent but others are being rejected, then it must be due to characteristics of the email that the SMTP server is configured not to accept -- e.g. mail relaying or something similar. If you have access to the SMTP server's sending logs, the details should be there.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8851
Joined: Wed Aug 10, 2005 12:56 pm

Re: Forgot pass mail:smtpmailer did not receive expected 250

Postby formix » Wed Nov 20, 2013 10:38 am

Hi Alec,

Thank you for the suggestion and for the quick reply!

I'll try to get to the admin to see those logs!

Best regards,

Dan
formix
 
Posts: 2
Joined: Wed Nov 20, 2013 9:58 am

Re: Forgot pass mail:smtpmailer did not receive expected 250

Postby hblancoca » Tue Jul 22, 2014 9:48 am

I track the same error, when send information via telnet all worked fine, but when use requestResetPassword i can view that the steps (authentication, mail from, data ) works well, but the problem its when send '.' to finish the message.
The class do not recive server response in that step. How can I probe another way to send '.'? any idea?

Humberto
hblancoca
 
Posts: 4
Joined: Sat Mar 29, 2014 11:29 am

Re: Forgot pass mail:smtpmailer did not receive expected 250

Postby asmecher » Tue Jul 22, 2014 1:36 pm

Hi Humberto,

I'd suggest using the error_log PHP function to record what response you are getting -- particulary in the lib/pkp/classes/mail/SMTPMailer.inc.php class in the receiveData function. In the error case this is returning false; try logging what you actually got back from the server instead of the expected result.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8851
Joined: Wed Aug 10, 2005 12:56 pm

Re: Forgot pass mail:smtpmailer did not receive expected 250

Postby hblancoca » Fri Oct 03, 2014 3:38 pm

Hi all,
I solved my issue, the problem was that ojs in many cases impersonate the email sending like another user, many institutions do not permit the relay or do not permite impersonate messages because uses mechanism that try to review spf records and tag the emails like spam (http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8085)(https://pkp.sfu.ca/support/forum/viewto ... =8&t=11796).

I modified /ojs/lib/pkp/classes/mail/SMTPMailer.inc.php file replacing all $sender as $this->username ( remember that $this->username = Config::getVar('email', 'smtp_username'); in the config.inc.php)
so:

-if (!$this->send('MAIL', 'FROM:<' . $sender . '>'))
+ if (!$this->send('MAIL', 'FROM:<' . $this->username . '>'))

foreach ($rcpt as $addr) {
+ if (!$this->send('RCPT', 'TO:<' . $addr['email'] .'>'))
+ return $this->disconnect('Could not send recipients');
if (!$this->receive(array('250', '251')))
return $this->disconnect('Did not receive expected 250 or 251');
}
some lines....
+ if (!$this->send('Reply-To: '.$sender))
+ return $this->disconnect('Could not send headers');

if (!$this->send(''))
return $this->disconnect('Could not send CR');

Now, when a user of journal send an email the sender its ojs username defined in config.inc.php. but when reply this message is sent to email of user that send the email
hblancoca
 
Posts: 4
Joined: Sat Mar 29, 2014 11:29 am


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests