in reply to How to pass authentication through Mail::Sendmail

Not really a Perl thing, but....

The problem isn't authentication. Your sendmail server is configured not to act as an open relay, as evidenced by the 550 Relaying prohibited error code it's returning (that's a Good Thing, by the way). You're getting the error because your "from" address doesn't match the name of the host the server is running on. If you change the from address to be the host's correct name (localhost will do in a pinch), you should be OK.

Disclaimer: it's been a number of years since I hacked on sendmail. ;-)

Replies are listed 'Best First'.
Re: Re: How to pass authentication through Mail::Sendmail
by juo (Curate) on Sep 24, 2001 at 19:39 UTC

    The problem is related to authentication. If I would send an email to a person inside the network it will work OK because authentication is not required their but the moment I want to relay outside the network authentication is required and the user and password is checked to send email. If you look at email programs : outlook, eudora, they all provide an option to allow authentication when sending email and this is in most cases the user and password which is also used to check email.
    Note : If I use an SMTP server which is configured not to require authentication which nowadays you don't find anymore because nobody want allow anymore non-authorized people to use their SMTP server to send email because most people used non-secured SMTP servers for spamming purposes

      Greetings.

      It may be related to authentication, but...
      Authentication has not been part of (E)SMTP for a long time - an AUTH extension has been kicking around for a couple of years and sendmail has support for it starting from 8.10 (based on SASL). Other than that, some authentication has been provided through a hack called pop_before_smtp (similar to what you refer to).

      The short story is:

      1. You have to find out which method your site is using - $Mail::Sendmail::log may be helping you here;
      2. I doubt very much that Mail::Sendmail has support for either ESMTP AUTH or POP_BEFORE_SMTP, and that means you may have to roll your own (might be hard);
      3. Perhaps you can charm the postmaster to carve a hole in the relay rules, wide enough for your script to peep through - but don't count too much on it.
      Cheers,
      alf