<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Verdana",sans-serif;
        color:#1F497D;}
span.nf
        {mso-style-name:nf;}
span.p
        {mso-style-name:p;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I’m afraid I can’t reproduce this issue – either with account verification mails, or username reminder mails. Both use the correct
value from config for the “from” address. on my server.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">The relevant config item is $cqpweb_email_from_address.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">The code path involves 2 functions:
</span><span class="nf"><span style="font-size:10.5pt;font-family:"Courier New";color:blue;border:none windowtext 1.0pt;padding:0cm">send_user_verification_email</span></span><span class="p"><span style="font-size:10.5pt;font-family:"Courier New";color:#555555;border:none windowtext 1.0pt;padding:0cm">()</span></span><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">
(useracct-lib.php line 401) and </span><span class="nf"><span style="font-size:10.5pt;font-family:"Courier New";color:blue;border:none windowtext 1.0pt;padding:0cm">send_cqpweb_email</span></span><span class="p"><span style="font-size:10.5pt;font-family:"Courier New";color:#555555;border:none windowtext 1.0pt;padding:0cm">()</span></span><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">
(general-lib.php line 908). SO far as I can see or recall, the relevant code hasn’t changed since I branched off 3.2.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Sorry to be of such minimal help…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">best<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Andrew.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> cwb-bounces@sslmit.unibo.it <cwb-bounces@sslmit.unibo.it>
<b>On Behalf Of </b>Scott Sadowsky<br>
<b>Sent:</b> 23 October 2019 18:22<br>
<b>To:</b> Open source development of the Corpus WorkBench <CWB@liste.sslmit.unibo.it><br>
<b>Subject:</b> [External Sender] Re: [CWB] CQPweb mail "From" address now wrong, makes mail bounce<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><strong><span style="color:#A4343A">This email originated from outside of the University. Do not click links or open attachments unless you recognise the sender and know the content is safe.</span></strong><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">An addendum to my previous message: I <i>can</i> successfully send e-mails from the same server with this command:
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">echo -e "Hi! This is a test!" | mail -s "Test mail" -a "From: <a href="mailto:administrator@my.address.com">administrator@my.address.com</a>" "<a href="mailto:destination-address@gmail.com">destination-address@gmail.com</a>"</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Scott<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Hi all, I've been successfully sending out confirmation mails from CQPweb for quite<br>
a while, but now they're bouncing. The problem is the sender address, as<br>
seen in /var/log/mail.log: Oct 22 17:21:52 localhost postfix/smtp[24436]: <o:p></o:p></p>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">REDACTED: to=<<a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7C5f9565e6965042872d8908d757dda646%7C9c9bcd11977a4e9ca9a0bc734090164a%7C1%7C0%7C637074481819454504&sdata=7m%2FbNmf1KM7oFwKhZ2EQVpPsC9lEeZTBnriPWeMfuR0%3D&reserved=0">destination-address
at gmail.com</a>>, relay=<a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgmail-smtp-in.l.google.com&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7C5f9565e6965042872d8908d757dda646%7C9c9bcd11977a4e9ca9a0bc734090164a%7C1%7C0%7C637074481819454504&sdata=M63lWFh2VRpr9xdIQxTYjCeCxFrNDDapfTE5NQBDhgY%3D&reserved=0">gmail-smtp-in.l.google.com</a>[REDACTED]:25, delay=0.31,
delays=0.01/0.01/0.28/0.01, dsn=5.1.2, status=bounced (host <a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgmail-smtp-in.l.google.com&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7C5f9565e6965042872d8908d757dda646%7C9c9bcd11977a4e9ca9a0bc734090164a%7C1%7C0%7C637074481819454504&sdata=M63lWFh2VRpr9xdIQxTYjCeCxFrNDDapfTE5NQBDhgY%3D&reserved=0">gmail-smtp-in.l.google.com</a>[REDACTED]
said: 553-5.1.2 *The sender address <<a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7C5f9565e6965042872d8908d757dda646%7C9c9bcd11977a4e9ca9a0bc734090164a%7C1%7C0%7C637074481819464462&sdata=6%2BijSShtoccafFVSi3E2S2CFi8AuTBLdrUM%2FwIS4Th4%3D&reserved=0">www-data
at localhost</a>> is not a valid RFC-5321 553 5.1.2 address*. <o:p></o:p></p>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">For whatever reason, CQPweb (build 1365) is now *not* using the address set<br>
in lib/config.inc.php. The relevant lines (I include both possibilities<br>
that I can see) are: <o:p></o:p></p>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">$cqpweb_email_from_address = "<a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7C5f9565e6965042872d8908d757dda646%7C9c9bcd11977a4e9ca9a0bc734090164a%7C1%7C0%7C637074481819464462&sdata=6%2BijSShtoccafFVSi3E2S2CFi8AuTBLdrUM%2FwIS4Th4%3D&reserved=0">administrator
at my.address.com</a>";<br>
$server_admin_email_address = "<a href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7C5f9565e6965042872d8908d757dda646%7C9c9bcd11977a4e9ca9a0bc734090164a%7C1%7C0%7C637074481819474417&sdata=HclwU1MaW%2BTFg9hLBIiXyxf1qIa1TraySNt7frysqX8%3D&reserved=0">administrator
at my.address.com</a>"; <o:p></o:p></p>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Rather, it's cobbling together a sender address from the server user it's<br>
running under (www-data) and the local hostname of my server (localhost). How can this be dealt with? Best!<br>
Scott<o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</body>
</html>