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

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?
  • Comment on Re^4: Email::Send succeeds with "unknown user"

Replies are listed 'Best First'.
Re^5: Email::Send succeeds with "unknown user"
by Khen1950fx (Canon) on Jan 13, 2008 at 17:37 UTC
    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.