Zitoune has asked for the wisdom of the Perl Monks concerning the following question:

I have a Exchange Server at work.
When i send e-mail inside the company everything works fine,but as soon as i try to send outside the company i can't
Is there something we need to configure in the Exchange Server ??
When i do the debug from the SMTP package, it's telling me that SMTP can't relay to the adress specify.

Replies are listed 'Best First'.
Re: SMTP and Exchange
by thatguy (Parson) on Feb 05, 2003 at 16:19 UTC
    While this isn't much of a perl question (google your non perl stuff), I'd suggest checking out this page which will explain how the relaying in Exchange is supposed to work.

    It sounds to me like it may be that your box that is trying to send out is not listed in the list of hosts to relay for or your server requires authentication to relay.

    -phill

Re: SMTP and Exchange
by Jenda (Abbot) on Feb 05, 2003 at 22:05 UTC

    You will have to authenticate to the server.

    use Mail::Sender; my $sender = new Mail::Sender {smtp => 'the.mail.server.com'}; die "Error: $Mail::Sender::Error\n" unless ref $sender; print join(', ', $sender->QueryAuthProtocols()),"\n";
    will tell you what protocols are supported by the mail server. And
    use Mail::Sender; my $sender = new Mail::Sender { smtp => 'the.mail.server.com', auth => 'NTLM', authid => 'username', authpwd => 'password', };
    will log you in. I'm sure some other modules do support a few authentication protocols as well. Mail::Sender currently supports PLAIN, LOGIN, CRAM-MD5 and NTLM.

    HTH, Jenda