<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi Ravi,</p>
<p>As there is so many different ways that mail sending could be
configured, my general advice is to leave this to an application
that knows what its doing and configure Postfix to do this for you
rather than doing a lot of hacking around with the EPrints code.
Here is a guide for doing this with Amazon SES:</p>
<p><a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.aws.amazon.com%2Fses%2Flatest%2FDeveloperGuide%2Fpostfix.html&data=01%7C01%7C%7C5b7050aaab2c4f720e6308d839040496%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=CxKFiwqVmsXre7osqbF9esEKQxnAjl2EX7yxi1CSjXA%3D&reserved=0" originalSrc="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html" shash="yah/DdcxUUwv+XvL9rfQfgazzzuQoucrIykaTEYHdv4/qqYpmgm7vnYBHYUUgdttPu3Xr4QkWrASBCkuYSDCkIsxWXud4RlrI9GKCoQPBRp97YVa3956PKqkGu/qH9RqNpI/21NPXQQAFpMl7Vjj5z3KRiEDtQ8nMiSZdY3RkOE=">https://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html</a></p>
<p>There might be the need to make a small change to
SystemSettings.pm but I hope even this should not be necessary as
your server (i.e. 127.0.0.1) will still be sending email it will
just be using Amazon SES as a relay host.</p>
<p>Regards</p>
<p>David Newman<br>
</p>
<div class="moz-cite-prefix">On 05/08/2020 06:17, Ravi M via
Eprints-tech wrote:<br>
</div>
<blockquote type="cite" cite="mid:EMEW3|a9f4628ba2ba35e776881d4e6f26039bw746Is14eprints-tech-bounces|ecs.soton.ac.uk|CANw0mjKqJ_V=pY8y_kLwOMfNtcA-5DXAwmRMVX3BtJYMXpC4Cw@mail.gmail.com">
<div dir="ltr">
<div>In the <a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eprints.org%2Feptech%2Fmaillist.html&data=01%7C01%7C%7C5b7050aaab2c4f720e6308d839040496%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=YQxFS%2F0XcTscMx%2B8t8e%2BXv1tY0T2pTrMAT%2B8s32MP%2BA%3D&reserved=0" originalSrc="https://www.eprints.org/eptech/maillist.html" shash="zRl8lVE9Qi9zntBCMkv5d0sLSaSUPQvAswjiuhi0aOWSbfv/kUbkaSihqMGpCd40LO3RiZIAD+cMsA6+DenABp9uSrDWWSlwCgJ5m+WCR01of7CqL18raN5n9PHiNrgsEdqC1J66JQHpG/+Ih3FKB4oS2iFBL/U8cXAMXe25dJU=" originalsrc="https://www.eprints.org/eptech/maillist.html" shash="Bd4MV4toiw/kpvmktOZ/8DvX2FEHnVqLIKx29nPNJ+UNLhl440yEq6RHSoTRHUheZzFXOCoS+svxNDlGICXX/OhZqDYOyKPEiEwpHCDuZ+U8ZUE9zVlZpzBsV8LT0CIz68g5V2bGKTb+30RHSuDezwc36geuq/5EfGLB7v5f2e8=" target="_blank" moz-do-not-send="true">EPrints mailing list
archive</a> there are many queries about how to configure
SMTP settings but I couldn't find a clear answer that worked
for me. After some trial and error I've managed to get SMTP
working for my EPrints site, and I'm sharing the settings here
in case it's useful for anyone.</div>
<div><br>
</div>
<div>I run EPrints 3.4.2 on an Ubuntu server, and I use Amazon
Simple Email Service (SES) for my SMTP. (I am not affiliated
to Amazon in any way - I mention this service to indicate that
I don't know if the settings I've used will work with another
SMTP provider.)<br>
</div>
<div><br>
</div>
<div>Step 1: <br>
</div>
<div>I defined the value of <br>
</div>
<div>smtp_server <br>
</div>
<div>in the file<br>
</div>
<div>/perl_lib/EPrints/SystemSettings.pm <br>
</div>
<div><br>
</div>
<div>Step 2: <br>
</div>
<div>In the file<br>
/usr/share/eprints/perl_lib/EPrints/Email.pm<br>
I replaced the line<br>
my $smtp = Net::SMTP->new( $smtphost );<br>
with the below: <br>
<br>
my $smtp = Net::SMTP->new( $smtphost,<br>
Hello => 'eprints_site_domain',<br>
Debug => 1,<br>
);<br>
</div>
<div><br>
</div>
<div>And I added these two lines:<br>
</div>
<div>$smtp->starttls();<br>
$smtp->auth('username','password');<br>
</div>
<div><br>
</div>
<div>Of course you should change eprints_site_domain, username,
password to match your configuration. On Amazon SES my
eprints_site_domain is verified, and my SMTP settings are
connected to the same email address that is set as EPrints'
adminemail. I suppose this helps in getting email from the
site delivered without being marked as spam.<br>
</div>
<div><br>
</div>
<div>I think the $smtp->starttls(); part is especially
important. There is some advice out there on using the
Net::SMTP::TLS module instead of Net::SMTP, and at first
glance it might seem that the former is more recent or
advanced. But Net::SMTP could in fact be more reliable as it
is a <a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fperldoc.perl.org%2Findex-modules-N.html&data=01%7C01%7C%7C5b7050aaab2c4f720e6308d839040496%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=BzUzQ32UjpmBJdBngh8kgW2dLvSxduO0dM4z9hw6GOE%3D&reserved=0" originalSrc="https://perldoc.perl.org/index-modules-N.html" shash="aB2KmRwovmURr5AvbV4hROM9M6NpqZlz+HQN1B9FRdEpJRSzWA4SvdQIqeR/qI/E0IRV6Mj2aYkOdFggV2Ybt14Ae2yo6XvmwQPqcPiIuQ1QkqpyKp+73cnrMU6IfcTWHQYKwZuuJuUO1/q+1p0B7nuNVFfY/Wl5hgnDCoSXeZ0=" originalsrc="https://perldoc.perl.org/index-modules-N.html" shash="pxuUg8joYVXjUnYoxTDK9ayo5/BGGcmRtH6h02yBGwJzBbJdQgUtkn5JA5xmiLZ5UJNMAfgvH/HOvIf/BrnHFDnPUZ6RGALUVbtEpHhFtDnzNVleo9Qsb0rUCAyDHfVfAd+1BkA9C9EUgHFNF/qEo01m6nAAOirCTNC8zaqtSs0=" target="_blank" moz-do-not-send="true">core Perl module</a>.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Ravi Murugesan</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-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="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7C%7C5b7050aaab2c4f720e6308d839040496%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=bb8bE6%2F4VDwubzGbi8hfL%2BMWgvdKC%2Fq%2BPuip0mkpfYA%3D&reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="CewRx+JYTwCAD1QU2jblvxNULMhxqA0sJiIMkrUuW2FEguLGGXVftSwo/hzdbWKYhKuk+Cd1acOGpv16fMW6mCobJtPGBMe2/vtcbs5KQgFIO3p4QyBUwpGz/N5R3RS9MWEnVUhyHsypY2z3sPL22wcM2tpt44fDAUP7PDbUuw4=">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7C%7C5b7050aaab2c4f720e6308d839040496%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=7g8ecAPn2VkLbsKpVOsYd%2B%2B615GPYfd45iuSwwuxPoo%3D&reserved=0" originalSrc="http://wiki.eprints.org/" shash="hE0Ny2lHXeAcPIzu9H3jmFOkdKo2vyS2h4PrWxxnzPmcI790FfJxbMsTekZXd74oeb1M1mDFFSykwZg5BCmVwUDx5JsZEu+yO5sHIddE24fj5tes6myTX9NpbYY9odJ2qyKFCbHZi1PJSD7MbCxyfq4KIzWaQhTfcCGUmT+6o0Y=">http://wiki.eprints.org/</a></pre>
</blockquote>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
        <tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&data=01%7C01%7C%7C5b7050aaab2c4f720e6308d839040496%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=IQIuTO9DhJ1s3Db58UvA1Jd1eOsf7uJ4jJJ9CB5gJKU%3D&reserved=0" originalSrc="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" shash="gYNyoCuIjTIs3i0BBTAdyP/yi8RUum042tKmmamxZW2McnRcwUPpSIi+R466t/1W+OXiUrwXv/eveacZZq93+1jwXRh8WChMgnQ4yH2YuYc24IrKYfW6STXIXOpaXMcVX/rXIG80Zj1SlJ98jKb7Kf8iEQb3hEtNQS0NjgJdm5o=" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&data=01%7C01%7C%7C5b7050aaab2c4f720e6308d839040496%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=IQIuTO9DhJ1s3Db58UvA1Jd1eOsf7uJ4jJJ9CB5gJKU%3D&reserved=0" originalSrc="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" shash="gYNyoCuIjTIs3i0BBTAdyP/yi8RUum042tKmmamxZW2McnRcwUPpSIi+R466t/1W+OXiUrwXv/eveacZZq93+1jwXRh8WChMgnQ4yH2YuYc24IrKYfW6STXIXOpaXMcVX/rXIG80Zj1SlJ98jKb7Kf8iEQb3hEtNQS0NjgJdm5o=" target="_blank" style="color: #4453ea;">www.avg.com</a>
                </td>
        </tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>