in reply to Re^2: Email::Send succeeds with "unknown user"
in thread Email::Send succeeds with "unknown user"

You can (in fact, it looks like you must) specify which SMTP server to connect to.

From the docs (somewhat broken English, but the meaning is clear):

The first invocation of send requires an SMTP server arguments.
  • Comment on Re^3: Email::Send succeeds with "unknown user"

Replies are listed 'Best First'.
Re^4: Email::Send succeeds with "unknown user"
by Cagao (Monk) on Jan 12, 2008 at 23:00 UTC
    no doubt it uses localhost by default, or Email::Send makes that choice, i haven't set it explicitly.

    When I sid i wanted to reduce the load, our code currently opens a pipe to sendmail.

    Doesn't the SMTP method atleast communicate with the sendmail daemon? rather than starting a new process?
      This script checks for registered mailers that you have available:

      #!/usr/bin/perl use strict; use warnings; use Email::Send; my $sender = Email::Send->new( { mailer => 'SMTP' } ); $sender->mailer_args( [ Host => 'localhost' ] ); my @available = $sender->all_mailers; print "@available\n";

      As for the reason why it succeeds with "unknown user", three things come to mind. First, you'll need to open Postfix's main.cf configuration file, for example, /etc/postfix/main.cf. Look for "soft_bounce"---thats where mail that would ordinarily bounce remains queued. Set that to soft_bounce = no. Second, look for "ignore_mx_lookup_error"---that ignores DNS MX lookups that produce no response. Set that to ignore_mx_lookup_error = no. Third, there's another entry that might be there. Look for "smtp_defer_if_no_mx_address_found"---Set that to smtp_defer_if_no_mx_address_found = yes.