Without distracting you with unrelated parts of the script or the reasons for deciding on the methods, I am attempting to use the Net::SMTP module to connect to a local Exchange server to send a simple message.

When I enable the Debug output of the Net::SMTP connection, everything looks good and is accepted as valid, but the connection ends with "554 5.1.0 Sender Denied" when I try to send the message.

When I telnet to port 25 on the same mail server and send the exact commands the script sent (copied and pasted from the script's Debug output), the message is accepted and sent without error.

You can view the stripped down script and "sanitized" output from the Debug script and my telnet session here. (link removed, as the problem was stupid and is now fixed -- see my reply)

As you can see, the script is pretty much as basic as it gets. Is there anything special I need to know about Net::SMTP transactions? It appears to be identical to a raw telnet to port 25, yet it fails while the telnet succeeds. I am completely stumped and would greatly appreciate any suggestions you can provide.


In reply to Net::SMTP send rejected, but telnet transaction works by xephonia

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.