Alan,<div><br></div><div>Do accept the apology for pushing in getReturnPath API we failed to cover exhaustive</div><div>case while having the SMTP as localdomain, we indeed targeted only sub-domain level.</div><div><br></div>

<div>This was an attempt to fix the <a href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7325">mail ending up with SPAM folder</a> due to invalid SPF.</div><div><br></div><div>Please review the suggested fix and share your feedback:</div>

<div><div><a href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7325#comment:3">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7325#comment:3</a></div><div><br></div><div>Regards.</div><div>Prasad</div><div><br><div class="gmail_quote">

On Sat, Jun 16, 2012 at 1:19 AM, Joe Bordes <span dir="ltr">&lt;<a href="mailto:joe@tsolucio.com" target="_blank">joe@tsolucio.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I couldn&#39;t agree more. In fact we have changed getReturnPath() function<br>
directly to return a correct email for each client.<br>
<br>
I wanted to add one comment to your debugging procedure on the cron. You<br>
can execute the script directly, no need to wait for the cron, this way<br>
not only do you have control of when to launch it but you can get errors<br>
or debug messages on the command line interface screen.<br>
<br>
Joe<br>
TSolucio<br>
<br>
<br>
El 15/06/12 17:03, Alan Lord escribió:<br>
<div><div class="h5">&gt; I&#39;ve spent most of the day looking at a problem with a customer not<br>
&gt; getting Scheduled Reports from vtiger 5.4.0.<br>
&gt;<br>
&gt; The new function introduced in 5.4.0 getReturnPath() (bottom of<br>
&gt; CommonUtils) is a *REALLY* bad idea. (I thought I&#39;d already fixed it<br>
&gt; once in modules/Emails/mail.php - see<br>
&gt; <a href="https://forums.vtiger.com/viewtopic.php?f=139&amp;t=53251" target="_blank">https://forums.vtiger.com/viewtopic.php?f=139&amp;t=53251</a>)<br>
&gt;<br>
&gt; Our customers frequently use their ISP to relay their emails. Setting<br>
&gt; the Return Path of the outbound emails from vtiger to<br>
&gt; &quot;<a href="mailto:noreply@my-isp.com">noreply@my-isp.com</a>&quot; triggers some spam prevention and stops emails<br>
&gt; getting sent by the relay.<br>
&gt;<br>
&gt; This getReturnPath() function is being called in three separate email<br>
&gt; sending code paths (cron/send_mail.php, modules/Emails/mail.php,<br>
&gt; vtlib/Vtiger/Mailer.php) and is a pig to fix properly. Please make this<br>
&gt; a priority for 6.0.0. I do not want to have to hack code all over vtiger<br>
&gt; just so we can send emails!<br>
&gt;<br>
&gt; Today has been very frustrating. It is very hard to debug external,<br>
&gt; authenticated SMTP connections on remote servers. Please can you try not<br>
&gt; to break this functionality so badly next time...<br>
&gt;<br>
&gt; With specific regards to the Scheduled Reports functionality I have two<br>
&gt; further observations:<br>
&gt;<br>
&gt; 1. On sending, there is no &quot;from address&quot; added to the email if the<br>
&gt; Outgoing Server&#39;s from address not configured. (This will also cause<br>
&gt; some SMTP servers to not send the email). The offending code is in<br>
&gt; modules/Reports/ScheduledReoports.php. In vtiger_reports, every report<br>
&gt; has an &quot;owner&quot; id and in my opinion the &quot;from email&quot; should be taken<br>
&gt; from there initially and if it is empty, use the SMTP from field, if<br>
&gt; that fails, make something up that is useful like &quot;vtiger@hostname.domain&quot;.<br>
&gt;<br>
&gt; 2. Scheduled reports are a PITA to test: If you edit a scheduled report<br>
&gt; and change the time on a daily report. It doesn&#39;t update the<br>
&gt; next_trigger_time row so the report will not run again until whatever<br>
&gt; the last settings were... This means the easiest way to test is to have<br>
&gt; a SQL query lined up like:<br>
&gt;<br>
&gt; UPDATE `vtiger_scheduled_reports` SET `next_trigger_time` = &#39;2012-06-15<br>
&gt; 15:43:00&#39; WHERE `vtiger_scheduled_reports`.`reportid` = 24;<br>
&gt;<br>
&gt; And then set the scheduler and cron job to run every minute! It would be<br>
&gt; really helpful to add a tool of some kind to make it easier to test a<br>
&gt; scheduled anything (report, workflow etc...).<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Al<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; <a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
<br>
</div></div>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div></div>