OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



SMTP issues

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.

SMTP issues

Postby raheel » Tue Mar 06, 2007 12:07 pm

Hi,
Due to firewall issues (people outside the network weren't getting emails) I want to migrate to SMTP. But it doesn't send any emails now.
It's possible that it may be an SSL issue but I tried using ssl://my.smtp.server.name for smtp_server setting but still no luck.

Here is the relevant part of my config file:
Code: Select all

[email]

; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = ssl://remote-smtpserver.school.edu
smtp_port = 25

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = PLAIN
smtp_username = my_username
smtp_password = my_password

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
; allow_envelope_sender = Off

; Enable attachments in the various "Send Email" pages.
; (Disabling here will not disable attachments on features that
; require them, e.g. attachment-based reviews)
enable_attachments = On


Any clues?
Thanks
raheel
 
Posts: 14
Joined: Sun Feb 18, 2007 8:32 pm

Postby asmecher » Tue Mar 06, 2007 2:21 pm

Hi Raheel,

See http://pkp.sfu.ca/support/forum/viewtopic.php?t=1635 for something to try that might help in the debugging process.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8831
Joined: Wed Aug 10, 2005 12:56 pm

Some errors in syslog

Postby raheel » Wed Mar 07, 2007 11:39 am

So this is what I found by making a lot of changes and looking at the log file:

1. If I only say "smtp=On" and leave the rest of the smtp configuration commented, then internal emails arrive but for the external email address (@gmail.com) the admin (rahmad@cs.siu.edu) receives this mail:

Code: Select all
he mail system

         <ahmadraheel@gmail.com>: host saluki-mailhub.siu.edu[131.230.254.205] said: 550
             5.7.1 <ahmadraheel@gmail.com>... Relaying denied. IP name lookup failed
             [131.230.133.187] (in reply to RCPT TO command)
         Reporting-MTA: dns; sofia.ocean.cs.siu.edu
         X-Postfix-Queue-ID: B23086F807D
         X-Postfix-Sender: rfc822; rahmad@cs.siu.edu
         Arrival-Date: Wed,  7 Mar 2007 12:06:41 -0600 (CST)


AND the syslog has this:

Code: Select all
Mar  7 12:15:19 sofia postfix/smtpd[27568]: connect from localhost[127.0.0.1]
         Mar  7 12:15:19 sofia postfix/smtpd[27568]: 30A5C6F807D: client=localhost[127.0.0.1]
         Mar  7 12:15:19 sofia postfix/cleanup[27571]: 30A5C6F807D: message-id=<20070307181519.30A5C6F807D@sofia.ocean.cs.siu.edu>
         Mar  7 12:15:19 sofia postfix/qmgr[26104]: 30A5C6F807D: from=<rahmad@cs.siu.edu>, size=762, nrcpt=3 (queue active)
         Mar  7 12:15:19 sofia postfix/smtpd[27568]: disconnect from localhost[127.0.0.1]
         Mar  7 12:15:19 sofia postfix/smtp[27572]: certificate verification failed for saluki-mailhub.siu.edu: num=19:self signed certificate in certificate chain
         Mar  7 12:15:19 sofia postfix/smtp[27572]: 30A5C6F807D: to=<ahmadraheel@gmail.com>, relay=saluki-mailhub.siu.edu[131.230.254.206]:25, delay=0.8, delays=0.1/0.01/0.32/0.37, dsn=5.7.1, status=bounced (host saluki-mailhub.siu.edu[131.230.254.206] said: 550 5.7.1 <ahmadraheel@gmail.com>... Relaying denied. IP name lookup failed [131.230.133.187] (in reply to RCPT TO command))
         Mar  7 12:15:20 sofia postfix/smtp[27572]: 30A5C6F807D: to=<rahmad@cs.siu.edu>, relay=saluki-mailhub.siu.edu[131.230.254.206]:25, delay=1.1, delays=0.1/0.01/0.32/0.62, dsn=2.0.0, status=sent (250 2.0.0 l27IFca0008249 Message accepted for delivery)
         Mar  7 12:15:20 sofia postfix/smtp[27572]: 30A5C6F807D: to=<raheel@siu.edu>, relay=saluki-mailhub.siu.edu[131.230.254.206]:25, delay=1.1, delays=0.1/0.01/0.32/0.62, dsn=2.0.0, status=sent (250 2.0.0 l27IFca0008249 Message accepted for delivery)
         Mar  7 12:15:20 sofia postfix/cleanup[27571]: 3CCC06F809E: message-id=<20070307181520.3CCC06F809E@sofia.ocean.cs.siu.edu>
         Mar  7 12:15:20 sofia postfix/qmgr[26104]: 3CCC06F809E: from=<>, size=2843, nrcpt=1 (queue active)
         Mar  7 12:15:20 sofia postfix/bounce[27573]: 30A5C6F807D: sender non-delivery notification: 3CCC06F809E
         Mar  7 12:15:20 sofia postfix/qmgr[26104]: 30A5C6F807D: removed
         Mar  7 12:15:20 sofia postfix/smtp[27572]: certificate verification failed for saluki-mailhub.siu.edu: num=19:self signed certificate in certificate chain
         Mar  7 12:15:21 sofia postfix/smtp[27572]: 3CCC06F809E: to=<rahmad@cs.siu.edu>, relay=saluki-mailhub.siu.edu[131.230.254.206]:25, delay=0.79, delays=0.01/0/0.29/0.49, dsn=2.0.0, status=sent (250 2.0.0 l27IFdnG008260 Message accepted for delivery)
         Mar  7 12:15:21 sofia postfix/qmgr[26104]: 3CCC06F809E: removed



131.230.133.187 is my server, sofia.

2. For any other setting for smtp like setting the server, using any/no authentication: no one gets any email, and NO syslog entrries either.


It's all very mysterious for me..
Thanks!
raheel
 
Posts: 14
Joined: Sun Feb 18, 2007 8:32 pm

Postby asmecher » Wed Mar 07, 2007 3:01 pm

Hi Raheel,

When you're not using SMTP and you're getting "relaying denied" messages, it's a mail server configuration issue -- your local mail server is not accepting messages for external servers.

As for when SMTP is enabled, have you checked your Apache error log?

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8831
Joined: Wed Aug 10, 2005 12:56 pm

The errors

Postby raheel » Wed Mar 07, 2007 3:42 pm

The relay errors (in 1) are when I am using the local SMTP (on sofia). What is strange is that it's our school SMTP server (saluki-mailhub) that is denying relays in this case, sayiing that "IP name lookup failed [131.230.133.187 (sofia)]".

When I try to use the remote SMTP by specifying saluki-mailhub in config file, I don't get any errors (syslog, apache) nor any mails are sent out...
raheel
 
Posts: 14
Joined: Sun Feb 18, 2007 8:32 pm

Postby asmecher » Wed Mar 07, 2007 3:51 pm

Hi raheel,

Your local machine is probably trying to relay via the school SMTP server without the necessary authentication, which is why you're getting the "IP name lookup failed" error message. Try specifying your school SMTP server in the config.inc.php file without using SSL for the moment; once that's working we can move on to encryption.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8831
Joined: Wed Aug 10, 2005 12:56 pm

Using school's SMTP

Postby raheel » Wed Mar 07, 2007 3:56 pm

Thanks for your quick replies.

When I specify the school's SMTP server, no matter what kind of config I use for it, it never works. No errors either. Tried using "ssl://" with the server as well. Tried all kinds of authentication also.
raheel
 
Posts: 14
Joined: Sun Feb 18, 2007 8:32 pm

Postby asmecher » Wed Mar 07, 2007 7:01 pm

Hi Raheel,

Are you sure you're using the updated SMTPMailer.inc.php linked above? This generates error messages when something in the sending process fails.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8831
Joined: Wed Aug 10, 2005 12:56 pm

Using older version

Postby raheel » Wed Mar 07, 2007 8:12 pm

I am using 1.3 and the latest versio is 1.4. Should I just replace and try?
raheel
 
Posts: 14
Joined: Sun Feb 18, 2007 8:32 pm

Postby raheel » Wed Mar 07, 2007 8:16 pm

Alright I did. And now syslog shows the error

Code: Select all
Mar  7 21:09:33 sofia apache2: OJS SMTPMailer: Could not authenticate


That's without using ssl://.

With ssl://, I am getting an error page that says:

Code: Select all
Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in /var/www/classes/mail/SMTPMailer.inc.php on line 163

Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /var/www/classes/mail/SMTPMailer.inc.php on line 163

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://saluki-mailhub.siu.edu:25 (Unknown error) in /var/www/classes/mail/SMTPMailer.inc.php on line 163

Warning: Cannot modify header information - headers already sent by (output started at /var/www/classes/mail/SMTPMailer.inc.php:163) in /var/www/classes/core/Request.inc.php on line 33


So it doesn't like my SSL usage.
raheel
 
Posts: 14
Joined: Sun Feb 18, 2007 8:32 pm

Postby asmecher » Wed Mar 07, 2007 8:29 pm

Hi Raheel,

OK, now you have error logging in both OJS and, presumably, your mail server -- you're going to have to experiment with configuring the two to match. Find out what your mail server expects for sure (it looks like SSL on port 25 is not it) and see if that works within OJS. I suspect you'll want to use one of the supported mechanisms listed in config.inc.php, without SSL.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8831
Joined: Wed Aug 10, 2005 12:56 pm

Postby raheel » Wed Mar 07, 2007 8:59 pm

I just confirmed: I do need to use SSL on port 25. Do I have to make the connection using "ssl://"? Do those OpenSSL errors mean anything to you?

Without using SSL I get authentication errors.

Thanks again.
raheel
 
Posts: 14
Joined: Sun Feb 18, 2007 8:32 pm

Postby asmecher » Thu Mar 08, 2007 4:47 am

Hi Raheel,

Googling the "failed to enable crypto" message hints at an OpenSSL misconfiguration with PHP; see http://www.vbulletin.com/forum/showthread.php?t=181146, for example, which suggests copying a .DLL file into your system32 directory if you're using Windows.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8831
Joined: Wed Aug 10, 2005 12:56 pm

Works!

Postby raheel » Sun Mar 11, 2007 10:08 pm

FInally got my problem solved - It was actually a matter of my machine not showing up when doing reverse lookup. So the SMTP server was giving relay errors. Now with the DNS problem fixed, everything works fine!

Thank you so much for your help and patience.

Raheel
raheel
 
Posts: 14
Joined: Sun Feb 18, 2007 8:32 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 10 guests