EPrints Technical Mailing List Archive

Message: #07456


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

Re: [EP-tech] eprints integration with office365 SMTP


Hi Enio, Thanks for the reply. Yes port 25 is open

 netstat -napt | grep 127.0.0.1:25 doesn't find the pattern, but
netstat -napt | grep 0.0.0.0:25 returns the following output:

tcp        0      0 0.0.0.0:25              0.0.0.0:*
LISTEN      106776/smtpd

Also, I'm able to telnet to port 25:

telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 localhost ESMTP Postfix

Best regards, Francis
On Thu, Aug 30, 2018 at 10:49 PM Enio Carboni <enio.carboni@gmail.com> wrote:
>
> Hi Francis,
>
> the problem seem to be in "Failed to create SMTP connection to localhost" found in https://github.com/eprints/eprints/blob/2d42b2be54004bf3db6881a6d893d39c7a7f909f/perl_lib/EPrints/Email.pm#L169
>
> EPrint use "my $smtp = Net::SMTP->new( $smtphost );" on line 166
>
> and defaut to port 25 on "$smtphost" (localhost).
>
> Is your postfix active on this port?
>
> netstat -napt | grep 127.0.0.1:25
>
>  Enio
> Il 30/08/2018 17:22, Francis Jayakanth ha scritto:
>
> Hi, Thomas, thank very much for the kind reply.
>
> Yes, I have tried both  'smtp_server' => 'localhost' and 'smtp_server'
> => 'eprints.iisc.ac.in' options, but the outcome is the same.
>
> Here is the corresponding web server log file extract"
>
> Failed to create SMTP connection to localhost
> Failed to send mail.
> To: francis@iisc.ac.in <>
> Subject: Request for "Setting up Multilingual Information Repository:
> A case Study with EPrints.org Software"
>
> No helpful hint from the maillog file, too. Here is the extract from
> the /var/log/maillog file:
>
> Aug 30 13:13:35 eprints postfix/postfix-script[104689]: starting the
> Postfix mail system
> Aug 30 13:13:35 eprints postfix/master[104691]: daemon started --
> version 2.10.1, configuration /etc/postfix
> Aug 30 13:13:35 eprints postfix/pickup[104692]: EE3A2135D797: uid=0 from=<root>
> Aug 30 13:13:35 eprints postfix/cleanup[104694]: EE3A2135D797:
> message-id=<20180830074335.EE3A2135D797@localhost>
> Aug 30 13:13:36 eprints postfix/qmgr[104693]: EE3A2135D797:
> from=<eprints@iisc.ac.in>, size=510, nrcpt=1 (queue active)
> Aug 30 13:13:36 eprints postfix/local[104696]: EE3A2135D797:
> to=<root@localhost.localdomain>, orig_to=<root>, relay=local,
> delay=53311, delays=53311/0.02/0/0.01, dsn=2.0.0, status=sent
> (delivered to mailbox)
> Aug 30 13:13:36 eprints postfix/qmgr[104693]: EE3A2135D797: removed
> Aug 30 13:18:32 eprints postfix/postfix-script[105288]: stopping the
> Postfix mail system
> Aug 30 13:18:32 eprints postfix/master[104691]: terminating on signal 15
> Aug 30 13:21:22 eprints postfix/postfix-script[105663]: starting the
> Postfix mail system
> Aug 30 13:21:22 eprints postfix/master[105665]: daemon started --
> version 2.10.1, configuration /etc/postfix
> Aug 30 14:19:13 eprints postfix/postfix-script[110740]: stopping the
> Postfix mail system
> Aug 30 14:19:13 eprints postfix/master[105665]: terminating on signal 15
> Aug 30 14:19:13 eprints postfix/postfix-script[110822]: starting the
> Postfix mail system
> Aug 30 14:19:13 eprints postfix/master[110824]: daemon started --
> version 2.10.1, configuration /etc/postfix
> Aug 30 19:45:17 eprints postfix/smtpd[5469]: connect from localhost[127.0.0.1]
> Aug 30 19:45:17 eprints postfix/smtpd[5469]: 24F61201F8D1:
> client=localhost[127.0.0.1]
> Aug 30 19:45:17 eprints postfix/smtpd[5469]: disconnect from
> localhost[127.0.0.1]
> Aug 30 19:45:17 eprints postfix/pickup[2911]: 66ABA135D797: uid=1003
> from=<eprints@eprints.iisc.ac.in>
> Aug 30 19:45:17 eprints postfix/cleanup[5471]: 66ABA135D797:
> message-id=<alpine.LRH.2.21.1808301944160.5342@eprints.iisc.ac.in>
> Aug 30 19:45:17 eprints postfix/qmgr[110826]: 66ABA135D797:
> from=<eprints@iisc.ac.in>, size=655, nrcpt=1 (queue active)
> Aug 30 19:45:19 eprints postfix/smtp[5474]: 66ABA135D797:
> to=<fjayakanth@gmail.com>, relay=smtp.office365.com[40.100.141.2]:587,
> delay=2.5, delays=0.3/0.04/1.9/0.26, dsn=2.6.0, status=sent (250 2.6.0
> <alpine.LRH.2.21.1808301944160.5342@eprints.iisc.ac.in>
> [InternalId=35716948034469,
> Hostname=MA1PR0101MB1701.INDPRD01.PROD.OUTLOOK.COM] 3726 bytes in
> 0.227, 16.006 KB/sec Queued mail for delivery)
> Aug 30 19:45:19 eprints postfix/qmgr[110826]: 66ABA135D797: removed
>
> The maillog extract indicates that only mails sent using 'alpine' are
> being logged.
>
> Thanks and regards, Francis
>
> On Thu, Aug 30, 2018 at 6:24 PM <th.lauke@arcor.de> wrote:
>
> Hi Francis,
>
> 'smtp_server' => 'smtp.office365.com'
>
> have you tried
> 'smtp_server' => 'localhost'
> instead?
>
> Are there any helpful messages in /var/log/exim4/mainlog?
>
> Hth
> Thomas
>
> *** 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/
> *** EPrints developers Forum: http://forum.eprints.org/
>
>
> *** 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/
> *** EPrints developers Forum: http://forum.eprints.org/