EPrints Technical Mailing List Archive

Message: #09257

< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Eprints SMPT configuration Error with Office 365

Hi Revathi,

The error message you are getting suggesting Postfix is not running on the port required.  By default Postfix runs on TCP port 25 (SMTP) but your EPrints looks to be trying to find it on port 587.  I think this is because you are trying to using TLS encryption for the local connection between EPrints and Postfix on your server.  I am not sure what would cause EPrints to use Net::SMTP::TLS by default.  I have tried installing this Perl module using CPAN and I still use regular (non-encrypted) SMTP locally on TCP Port 25.  I would not reconfigure Postfix for run on port 587 using TLS.  As that would likely take a lot of effort and add unnecessary complexity with no real benefit. 

Have you changed the settings in cfg.d/email.pl?  Specifically have you changed the configuration setting for $c->{send_email} either in this file or some other file in a cfg.d/ directory?  Based in you running EPrints 3.4.4 (according to your /cgi/counter page on eprints.exchange.isb.edu), line 178 of perl_lib/EPrints/Email.pm does not look to be a line that include a call to Net::SMTP::TLS::new.  Have you modified perl_lib/EPrints/Email.pm?  Did you any other error messages around the same time as your highlighted message in any of your Apache logs files?


David Newman

On 26/03/2023 2:09 pm, Mosys Consultancy Services Pvt Ltd via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Dear All,
Could anyone please help me to resolve the issue of Office365 SMTP Configuration issue with eprints.exchange.isb.edu. Let me clear what I have done so far.
2. It is working well with mail command without any isssue
3. Email.pm and SystemSettings.pm have been configured accordingly
4, Followed this thread https://www.eprints.org/eptech/msg07173.html and tested with test_sendmail.pl and working perfectly.
I am facing the following error

Connect failed :IO::Socket::INET: connect: Connection refused
 at /usr/local/share/perl/5.30.0/Net/SMTP/TLS.pm line 113.
	Net::SMTP::TLS::new("Net::SMTP::TLS", "localhost", "Hello", "localhost", "Port", 587, "User", "******email", ...) called at /opt/eprints3/perl_lib/EPrints/Email.pm line 178
	EPrints::Email::send_mail_via_smtp("sig", XML::LibXML::DocumentFragment=SCALAR(0x55c2ec290348), "to_email", "lrc_hyd\@isb.edu", "cc_list", ARRAY(0x55c2ec28fc70), "replyto_email", "****@gmail.com", ...) called at /opt/eprints3/perl_lib/EPrints/Repository.pm line 1927 
eval {...} called at /opt/eprints3/perl_lib/EPrints/Repository.pm line 1927"
Could anyone please help me out?


*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/