<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=us-ascii"><meta name=Generator content="Microsoft Word 12 (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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-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;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@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-CA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Greetings,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>A hosting customer just alerted me to a problem with the vacation email responder on my BX5107 server. The problem is that the responses are being sent to an invalid address for the original email sender.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>In a nutshell, the problem seems to be that the vacation.pl script is picking out an address from the Return-Path: header line instead of using the From: header line that contains the actual sender address. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Incoming email to most domains on my server is filtered through the PostLayer hosted email filtering service, which I’ve been using for a few years with good results. PostLayer’s system encodes some information into the Return-Path line that looks like an email address, but isn’t. Here’s an example:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='text-indent:36.0pt'><span lang=EN-US>Return-Path: <SRS0+2f38cd931909c91e=AK=telus.net=joeblow@mx25.net><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The From: header on that email includes the real email address:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='text-indent:36.0pt'><span lang=EN-US>From: Joe Blow <joeblow@telus.net><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The vacation.pl script sees the “whatever @ mx25.net” chunk in the Return-Path line, and erroneously sends the vacation message to that invalid address.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I looked at /usr/local/sbin/vacation.pl and thought I could just comment out the lines that deal with Return-Path, like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US> #if (/^From:\s*(.+)/) { $from = $1; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> if (/^From\s+(\S+)/) { $from = $1; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> elsif (/^Reply-To:\s*(.+)/) { $replyto = $1; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> elsif (/^Sender:\s*(.+)/) { $sender = $1; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>## elsif (/^Return-path:\s*(.+)/) { $returnpath = $1; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> elsif (/^Precedence:\s*(.+)/) { $precedence = $1; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> elsif (/^\tfor\s+(\S+)/) { $for = $1; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> #elsif (/^$crlf/) { goto breakloop } <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> elsif (/^$crlf/) { last; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>and<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US># Pass variables to crafted (auto-)reply<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>if ($replyto) { $sendto = $replyto; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>elsif ($from) { $sendto = $from; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>elsif ($sender) { $sendto = $sender; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>##elsif ($returnpath) { $sendto = $returnpath; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>else { exit; }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>but that didn’t seem to fix it. The autoresponses still went to the invalid @ mx25.net pseudo-address taken from the Return-Path: line.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Does anyone have any ideas on how to solve this?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>dAvid tHacker<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><a href="mailto:David@ThackerNet.com">David@ThackerNet.com</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>