<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-15">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Francis,</p>
<p> <span id="result_box" class="" lang="en"><span class="">all this
means that you can not send email (relay denied) to the domain
"iisc.ac.in" using 127.0.0.1 and port 25 with clear protocol
(without ssl) and without authentication.</span><br>
<span class="">You should check the postfix configuration with
your system administrator and evaluate at least what you have
in the "smtpd_relay_restrictions" and "mynetworks" variables.</span><br>
<span class="">To quickly see the postfix configuration use the
"postconf" command</span><br>
</span></p>
<p><span id="result_box" class="" lang="en">The "mail" program
directly uses the "sendmail" program which is part of "postfix"
so I'm not sure how it behaves.<br>
<span class=""><br>
</span></span></p>
<p><span id="result_box" class="" lang="en"><span class="">Good luck<br>
Enio<br>
</span></span></p>
<br>
<div class="moz-cite-prefix">Il 31/08/2018 19:17, Francis Jayakanth
ha scritto:<br>
</div>
<blockquote type="cite"
cite="mid:EMEW3|0a9cf59d0159ccdfc93bc55abd945f76u7UIHj14eprints-tech-bounces|ecs.soton.ac.uk|CAAVv=LTq0kFD5nHUSXMcdBsrzoEL6Wuh=kPgb0MA7fkeLwQ8Xw@mail.gmail.com">
<pre wrap="">Hi Enio, Thanks for your reply.
The output of execution of the script, smtp_send_test_email.pl, is:
-bash-4.2$ perl smtp_test_send_email.pl
Net::SMTP>>> Net::SMTP(2.31)
Net::SMTP>>> Net::Cmd(2.29)
Net::SMTP>>> Exporter(5.68)
Net::SMTP>>> IO::Socket::INET(1.33)
Net::SMTP>>> IO::Socket(1.34)
Net::SMTP>>> IO::Handle(1.33)
Net::SMTP=GLOB(0xc3dab0)<<< 220 localhost ESMTP Postfix
Net::SMTP=GLOB(0xc3dab0)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0xc3dab0)<<< 250-localhost
Net::SMTP=GLOB(0xc3dab0)<<< 250-PIPELINING
Net::SMTP=GLOB(0xc3dab0)<<< 250-SIZE 10240000
Net::SMTP=GLOB(0xc3dab0)<<< 250-VRFY
Net::SMTP=GLOB(0xc3dab0)<<< 250-ETRN
Net::SMTP=GLOB(0xc3dab0)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0xc3dab0)<<< 250-8BITMIME
Net::SMTP=GLOB(0xc3dab0)<<< 250 DSN
localhost ESMTP Postfix
Net::SMTP=GLOB(0xc3dab0)>>> MAIL FROM:<a class="moz-txt-link-rfc2396E" href="mailto:eprints@iisc.ac.in"><eprints@iisc.ac.in></a>
Net::SMTP=GLOB(0xc3dab0)<<< 250 2.1.0 Ok
Net::SMTP=GLOB(0xc3dab0)>>> RCPT TO:<a class="moz-txt-link-rfc2396E" href="mailto:francis@iisc.ac.in"><francis@iisc.ac.in></a>
Net::SMTP=GLOB(0xc3dab0)<<< 454 4.7.1 <a class="moz-txt-link-rfc2396E" href="mailto:francis@iisc.ac.in"><francis@iisc.ac.in></a>: Relay access denied
SMTP refused RCPT TO: <a class="moz-txt-link-rfc2396E" href="mailto:francis@iisc.ac.in"><francis@iisc.ac.in></a>: 454 4.7.1
<a class="moz-txt-link-rfc2396E" href="mailto:francis@iisc.ac.in"><francis@iisc.ac.in></a>: Relay access denied
Net::SMTP=GLOB(0xc3dab0)>>> QUIT
Net::SMTP=GLOB(0xc3dab0)<<< 221 2.0.0 Bye
I tried assigning <a class="moz-txt-link-abbreviated" href="mailto:eprints@eprints.iisc.ac.in">eprints@eprints.iisc.ac.in</a> and <a class="moz-txt-link-abbreviated" href="mailto:eprints@iisc.ac.in">eprints@iisc.ac.in</a> to
the $from variable. For both the values, Relay access is denied.
So, what does 'Relay access denied' indicate? As I have been
mentioning, using 'mail' command, I'm able to send out mails from
eprints.iisc.ac.in.
Thanks and regards, Francis
On Fri, Aug 31, 2018 at 10:07 PM Enio Carboni <a class="moz-txt-link-rfc2396E" href="mailto:enio.carboni@gmail.com"><enio.carboni@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
Ok, so the connection to postfix is ok then try to send the email with
the new gist
<a class="moz-txt-link-freetext" href="https://gist.github.com/eniocarboni/ea3747c6aa5be32a35f9accd96f23296">https://gist.github.com/eniocarboni/ea3747c6aa5be32a35f9accd96f23296</a>
Change the variable $from and $to and run the test.
If the mail arrives then the problem is in the configuration of your
"eprint".
Enio
Il 31/08/2018 15:39, Francis Jayakanth ha scritto:
</pre>
<blockquote type="cite">
<pre wrap="">Thanks for the reply.
Output from test.pl is given below. Unfortunately, it doesn't make
much sense to me!
Net::SMTP>>> Net::SMTP(2.31)
Net::SMTP>>> Net::Cmd(2.29)
Net::SMTP>>> Exporter(5.68)
Net::SMTP>>> IO::Socket::INET(1.33)
Net::SMTP>>> IO::Socket(1.34)
Net::SMTP>>> IO::Handle(1.33)
Net::SMTP=GLOB(0xe97800)<<< 220 localhost ESMTP Postfix
Net::SMTP=GLOB(0xe97800)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0xe97800)<<< 250-localhost
Net::SMTP=GLOB(0xe97800)<<< 250-PIPELINING
Net::SMTP=GLOB(0xe97800)<<< 250-SIZE 10240000
Net::SMTP=GLOB(0xe97800)<<< 250-VRFY
Net::SMTP=GLOB(0xe97800)<<< 250-ETRN
Net::SMTP=GLOB(0xe97800)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0xe97800)<<< 250-8BITMIME
Net::SMTP=GLOB(0xe97800)<<< 250 DSN
localhost ESMTP Postfix
Net::SMTP=GLOB(0xe97800)>>> QUIT
Net::SMTP=GLOB(0xe97800)<<< 221 2.0.0 Bye
Best regards, Francis
On Fri, Aug 31, 2018 at 5:44 PM Enio Carboni <a class="moz-txt-link-rfc2396E" href="mailto:enio.carboni@gmail.com"><enio.carboni@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Well! Could now you run the test script you find in
<a class="moz-txt-link-freetext" href="https://gist.github.com/eniocarboni/33c12cbee12e54e544117b60e514a5ac">https://gist.github.com/eniocarboni/33c12cbee12e54e544117b60e514a5ac</a>
Enio
Il 31/08/2018 13:47, Francis Jayakanth ha scritto:
</pre>
<blockquote type="cite">
<pre wrap="">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 <a class="moz-txt-link-rfc2396E" href="mailto:enio.carboni@gmail.com"><enio.carboni@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Francis,
the problem seem to be in "Failed to create SMTP connection to localhost" found in <a class="moz-txt-link-freetext" href="https://github.com/eprints/eprints/blob/2d42b2be54004bf3db6881a6d893d39c7a7f909f/perl_lib/EPrints/Email.pm#L169">https://github.com/eprints/eprints/blob/2d42b2be54004bf3db6881a6d893d39c7a7f909f/perl_lib/EPrints/Email.pm#L169</a>
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: <a class="moz-txt-link-abbreviated" href="mailto:francis@iisc.ac.in">francis@iisc.ac.in</a> <>
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=<a class="moz-txt-link-rfc2396E" href="mailto:eprints@iisc.ac.in"><eprints@iisc.ac.in></a>, size=510, nrcpt=1 (queue active)
Aug 30 13:13:36 eprints postfix/local[104696]: EE3A2135D797:
to=<a class="moz-txt-link-rfc2396E" href="mailto:root@localhost.localdomain"><root@localhost.localdomain></a>, 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=<a class="moz-txt-link-rfc2396E" href="mailto:eprints@eprints.iisc.ac.in"><eprints@eprints.iisc.ac.in></a>
Aug 30 19:45:17 eprints postfix/cleanup[5471]: 66ABA135D797:
message-id=<a class="moz-txt-link-rfc2396E" href="mailto:alpine.LRH.2.21.1808301944160.5342@eprints.iisc.ac.in"><alpine.LRH.2.21.1808301944160.5342@eprints.iisc.ac.in></a>
Aug 30 19:45:17 eprints postfix/qmgr[110826]: 66ABA135D797:
from=<a class="moz-txt-link-rfc2396E" href="mailto:eprints@iisc.ac.in"><eprints@iisc.ac.in></a>, size=655, nrcpt=1 (queue active)
Aug 30 19:45:19 eprints postfix/smtp[5474]: 66ABA135D797:
to=<a class="moz-txt-link-rfc2396E" href="mailto:fjayakanth@gmail.com"><fjayakanth@gmail.com></a>, 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
<a class="moz-txt-link-rfc2396E" href="mailto:alpine.LRH.2.21.1808301944160.5342@eprints.iisc.ac.in"><alpine.LRH.2.21.1808301944160.5342@eprints.iisc.ac.in></a>
[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 <a class="moz-txt-link-rfc2396E" href="mailto:th.lauke@arcor.de"><th.lauke@arcor.de></a> 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: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<pre wrap="">
*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<pre wrap="">
*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<br>
</body>
</html>