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

I am getting an error from my ISPs SMTP server when trying to send emails via MIME::Lite.

The error reads "relaying mail to is not allowed"

Rather than annoy my ISP (well more than usual) can I use another mail module ?

I know about mail::sendmail, mail::bulkmail, net::smtp, mail::send, mail::mailer but dont know which one to use!

I have a mailing list and want to send customised emails to about 500 people in one shot. I'm using Perl on a Win98 if that matters.


Replies are listed 'Best First'.
Re: MIME::Lite error
by neophyte (Curate) on Aug 30, 2001 at 14:04 UTC
    If you're using your ISPs SMTP with a From: adress not from that ISP, your ISP is quite right not sending the mails out.
    Check your setup in the script.
    I trust you do not send spam.


      No the ISP isn't right, because anybody can enter any From: address of their choosing in their MUA. Therefore it's trivial for a spammer to spoof his way out. The only real way is to look if the IP address of the sender is in the ISP's netblocks, this way the ISP can authenticate the user. That's what most ISPs I've used do.
        I have mail-accounts that have nothing to do with my dial-in, so my IP is not in the netblock of the SMTP-provider.


Re: MIME::Lite error
by little (Curate) on Aug 30, 2001 at 13:50 UTC
    It's a problem!
    You are not allowed to use your providers SMTP server for delivery of emails. So better call your providers support.
    But as a hint, most mailservers deny relaying if neither the sender nor the recipient are known. So you might check for your address, under wich you send you email.

    Have a nice day
    All decision is left to your taste
Re: MIME::Lite error
by jlongino (Parson) on Aug 30, 2001 at 20:22 UTC
    This probably has to do with how your outgoing SMTP server is defined and what ISP you are using at the time. You should use the outgoing SMTP server name of the ISP you are currently logged in as.

    E.g., my email address is

    When trying to send mail via on campus I must use as the outgoing SMTP server, but at home where my ISP is, I must specify the appropriate outgoing SMTP server name.

    Update: This is assuming that both servers are using TCP wrappers that prevent relaying, as do most servers nowadays.

    @a=split??,'just lose the ego and get involved!';
    for(split??,'afqtw{|~'){print $a[ord($_)-97]}
Re: MIME::Lite error
by rrwo (Friar) on Aug 31, 2001 at 09:02 UTC

    What mail server are you using? Your ISP's? Or somebody else's? The mail message is treated as relayed mail, so Yahoo is rejecting it.

    A mail server has to be configured to allow relaying from the machine that is running your Perl script, and the recipient's mail server has to be configured to accept mail from that mail server.

    Another possibility is that your ISPs mail server is not configured and allows relaying from spammers, so it's on a list of mail servers that Yahoo blocks. See ORBZ for more information on this.

    This has nothing to do with the From: or Sender: headers.