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

Okay,so I'm sending mail using MIME:Lite because it allows me to easily send multipart mail.

However, the problem is that even though I'm setting the Return-Path key to the same e-mail address as the From key, both of my servers (shared virtual hosted servers) end up sending mail with the return path set to the master account e-mail address at the hosting company instead of the value I'm setting using "Return-Path".

Or at least so it appears. (some of the mail appears with the "correct" Return-Path, but since this is mail sent to the same domain as the server I'm sending from, I suspect something else is going on here.)

The point being, if mail is sent with a "different" Return-Path than the "From" many e-mail programs, including Outlook Express flag the mail as "junk". I'm obviously trying to avoid this.

So the questions are (1) Is there a way to solve this using a different Perl module (2) Is my problem a even a function of the server or is it a function of interpretation by the receiving server of the mail I'm sending (3) Am I doing something wrong. Why is the "Return-Path" value being overridden even though I expressly set it?

I suspect that if I were on a dedicated server, I'd have greater control over sendmail (currently I have no control) and this might solve part of my problem.
--
Filmo the Klown

Replies are listed 'Best First'.
Re: Configuring Return-Path with MIME:Lite
by davorg (Chancellor) on Jun 01, 2001 at 12:30 UTC

    Return-Path is one of those mail headers that are added automatically by your MTA and you shouldn't be able to mess with it. It's supposed to contain an accurate record of where the email actually came from. So, no, you can't change it - and that's exactly how it should be.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

      Uhm... then why does the module allow you to attempt this if it isn't supposed to work...
      --
      Filmo the Klown

        I think that question might be better addressed to the module author :)

        --
        <http://www.dave.org.uk>

        "Perl makes the fun jobs fun
        and the boring jobs bearable" - me

Re: Configuring Return-Path with MIME:Lite
by shotgunefx (Parson) on Jun 01, 2001 at 10:56 UTC
    Have you tried not setting the return path? I have a couple of applications that use Mime::Lite and I just set the from and it works correctly. The mail we are sending is for domains we do not host.
    (email this product to a friend deal) and viewing and replying to the message behaves as you would expect.

    -Lee

    "To be civilized is to deny one's nature."
      Yes, I did try it without, and in fact the from and reply to work just fine.(with or without) It's more an issue of the "Return-Path". I'm not totally familiar with how the junk mail filters work, but I suspect that some systems compare the domain in the Return-Path with the domain in the From or Reply-To fields in making a determination as to whether or not something is "junk". Thus, from my hosted server, lets say "jupiter.net", mail from my domain my ends up configured as:
      Return-Path: baseuser@jupiter.net Reply-To: me@mydomain.com From: me@mydomain.com To: you@yourdomain.com

      That said, for some reason this doesn't appear to be the case with all receiving domains. For example, when I send mail from me@mydomain.com to me@seconddomain.com hosted by a different company on a different server, the Return-Path appears as I instruct MIME::Lite to display it. (and vice-versa). However, when I send it to me@pacbell.net or me@aol.com, I can veiw the code and see the the Return-Path is "reverted" back to "baseuser@jupiter.net".
      --
      Filmo the Klown