[Zope] Re: Anyone using Zope Mail Host with MS Exchange ? (chas)

Sam Gendler sgendler@impossible.com
Wed, 12 Jan 2000 11:49:56 -0800


--------------28BA139AA7EAB60CEA24B173
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I typed a long response to the original email, but my browser crashed
before I could push the send button.  Here it goes again.

I recently had real problems sending mail to aol.com addresses when
using the dtml-sendmail tag.  I could send to postfix, sendmail, and
software.com MTAs no problem, but aol always dropped it on the floor.
When I turned on logging in my MTA (mail server), it showed the aol
mailserver sending a 250 OK response to the mail sent by the mailhost,
which means that AOL's server has now taken responsibility for the
message.  However, the messages were never arriving.  I finally
concluded that the message must have some funky defect in the headers
that was causing the server to consider the message to be spam, and not
deliver it.

I wouldn't be surprised if your mails were doing the same thing.

I finally resolved the problem as follows:

I stopped using a mailhost, and just use the smtphost modifier in the
sendmail tag.
I had to use both the mailfrom and mailto modifiers in the sendmail tag.

I had a To and From line in my headers.  Additionally, since I was
getting the To and From values from dtml variables, I had to make sure
that a new line was inserted after the header

To: <dtml-if var_name><dtml-var var_name><dtml-else>default</dtml-if>
From: <dtml-if var_name><dtml-var var_name><dtml-else>default</dtml-if>
Subject: Blah

Message Body goes Here
</dtml-sendmail>

Generated this:

To: Name1 From: Name2 Subject: Blah

Message Body goes Here

I had to use the following:

To: <dtml-if var_name><dtml-var var_name>
<dtml-else>default
</dtml-if>
From: <dtml-if var_name><dtml-var var_name>
<dtml-else>default
</dtml-if>
Subject: Blah

Mesage body goes here
</dtml-sendmail>

in order to generate a message body that looks like:

To: Name1
From: Name2
Subject: Blah

Messsage body goes here

It is very important that you include a blank line after the last
header, or else many mailers my reject or defer your message.


David Salgado wrote:

> Hi Chas
>
> >I have a client reporting that mail sent from Zope
> >using a MS Exchange box as their Zope Mail Host
> >never arrives.
>
> Just tried using our Exchange server as the SMTP
> server for a MailHost (which works just fine with the
> other two 'real' SMTP servers I have access to, and
> sure enough, the mail never arrived.
>
> Looks like a real MS feature -- anyone else?
>
> BTW, the Exchange server works OK as an SMTP
> host from Outlook Express, which is the only
> 'standards-based' mail client I've got on this machine.
>
> Cheers
>
>              David
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

--------------28BA139AA7EAB60CEA24B173
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I typed a long response to the original email, but my browser crashed before
I could push the send button.&nbsp; Here it goes again.
<p>I recently had real problems sending mail to aol.com addresses when
using the dtml-sendmail tag.&nbsp; I could send to postfix, sendmail, and
software.com MTAs no problem, but aol always dropped it on the floor.&nbsp;
When I turned on logging in my MTA (mail server), it showed the aol mailserver
sending a 250 OK response to the mail sent by the mailhost, which means
that AOL's server has now taken responsibility for the message.&nbsp; However,
the messages were never arriving.&nbsp; I finally concluded that the message
must have some funky defect in the headers that was causing the server
to consider the message to be spam, and not deliver it.
<p>I wouldn't be surprised if your mails were doing the same thing.
<p>I finally resolved the problem as follows:
<p>I stopped using a mailhost, and just use the smtphost modifier in the
sendmail tag.
<br>I had to use both the mailfrom and mailto modifiers in the sendmail
tag.
<br>I had a To and From line in my headers.&nbsp; Additionally, since I
was getting the To and From values from dtml variables, I had to make sure
that a new line was inserted after the header
<p><font color="#000099">To: &lt;dtml-if var_name>&lt;dtml-var var_name>&lt;dtml-else>default&lt;/dtml-if></font>
<br><font color="#000099">From: &lt;dtml-if var_name>&lt;dtml-var var_name>&lt;dtml-else>default&lt;/dtml-if></font>
<br><font color="#000099">Subject: Blah</font><font color="#000099"></font>
<p><font color="#000099">Message Body goes Here</font>
<br><font color="#000099">&lt;/dtml-sendmail></font>
<p>Generated this:
<p><font color="#006600">To: Name1 From: Name2 Subject: Blah</font><font color="#006600"></font>
<p><font color="#006600">Message Body goes Here</font>
<p>I had to use the following:
<p><font color="#000099">To: &lt;dtml-if var_name>&lt;dtml-var var_name></font>
<br><font color="#000099">&lt;dtml-else>default</font>
<br><font color="#000099">&lt;/dtml-if></font>
<br><font color="#000099">From: &lt;dtml-if var_name>&lt;dtml-var var_name></font>
<br><font color="#000099">&lt;dtml-else>default</font>
<br><font color="#000099">&lt;/dtml-if></font>
<br><font color="#000099">Subject: Blah</font><font color="#000099"></font>
<p><font color="#000099">Mesage body goes here</font>
<br><font color="#000099">&lt;/dtml-sendmail></font>
<p>in order to generate a message body that looks like:
<p><font color="#006600">To: Name1</font>
<br><font color="#006600">From: Name2</font>
<br><font color="#006600">Subject: Blah</font><font color="#006600"></font>
<p><font color="#006600">Messsage body goes here</font>
<p><font color="#CC0000">It is very important that you include a blank
line after the last header, or else many mailers my reject or defer your
message.</font>
<br><font color="#CC0000"></font>&nbsp;
<p>David Salgado wrote:
<blockquote TYPE=CITE>Hi Chas
<p>>I have a client reporting that mail sent from Zope
<br>>using a MS Exchange box as their Zope Mail Host
<br>>never arrives.
<p>Just tried using our Exchange server as the SMTP
<br>server for a MailHost (which works just fine with the
<br>other two 'real' SMTP servers I have access to, and
<br>sure enough, the mail never arrived.
<p>Looks like a real MS feature -- anyone else?
<p>BTW, the Exchange server works OK as an SMTP
<br>host from Outlook Express, which is the only
<br>'standards-based' mail client I've got on this machine.
<p>Cheers
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
David
<p>_______________________________________________
<br>Zope maillist&nbsp; -&nbsp; Zope@zope.org
<br><a href="http://lists.zope.org/mailman/listinfo/zope">http://lists.zope.org/mailman/listinfo/zope</a>
<br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp; **
<br>(Related lists -
<br>&nbsp;<a href="http://lists.zope.org/mailman/listinfo/zope-announce">http://lists.zope.org/mailman/listinfo/zope-announce</a>
<br>&nbsp;<a href="http://lists.zope.org/mailman/listinfo/zope-dev">http://lists.zope.org/mailman/listinfo/zope-dev</a>
)</blockquote>
</html>

--------------28BA139AA7EAB60CEA24B173--