Bounce Email

From: Nils M. Lunde (nilsml_at_options.no.nospam)
Date: 07/12/04

  • Next message: Nils M. Lunde: "Re: Bounce Email"
    Date: Mon, 12 Jul 2004 10:32:01 +0200
    
    

    Hi!

    I'm trying to do the following:

    -Extract an Email from a mailbox using grepmail
    -Bounce this Email to a different address

    I thought that this would be an easy thing to do, but I still haven't manage
    to do it the way I want to.

    The problem is MIME encoded messages.
    I've tried several approches, but I always get the same result: the Email
    Content-type is always text/plain after I've sent it.
    It seems like some of the header is stripped off.

    Here is my code:

    ##########################################
    ...
    use MIME::Parser;
    use MIME::Entity;
    use MIME::Head;

    my $sCmd = "grepmail -iu -Y \'(\^From:)\' $sMyAddress $sPathToMailbox;
    my @EmailLines = `$sCmd`;

    my $oParser = new MIME::Parser;
    my $oEmail = $oParser->parse_data(\@EmailLines);
    $oEmail->head->replace("To", $sBounceAddress);

    my $sRes = $oEmail->smtpsend;
    ...
    ##########################################

    Does anyone have a suggestion on how I can forward the mail without
    stripping the header?

    Thanx in advance!

    -Nils Magne Lunde


  • Next message: Nils M. Lunde: "Re: Bounce Email"

    Relevant Pages

    • Re: Bounce Email
      ... > -Extract an Email from a mailbox using grepmail ... > It seems like some of the header is stripped off. ... > stripping the header? ... > -Nils Magne Lunde ...
      (comp.lang.perl)
    • Re: Header in Exchange
      ... >I created special mailbox called "SPAM" for users to forward spam messages ... >I wanted to analyze them (header, keywords and IP) to tune up our antispam ... but whenever someone forwarding something from one internal mailbox ...
      (microsoft.public.exchange.admin)
    • Nevermind, I figured how to do it
      ... >I created special mailbox called "SPAM" for users to forward spam messages ... > I wanted to analyze them (header, keywords and IP) to tune up our antispam ... > I can see headers for messages coming from the internet to my Exchange ...
      (microsoft.public.exchange.admin)
    • Header in Exchange
      ... I created special mailbox called "SPAM" for users to forward spam messages ... I wanted to analyze them (header, keywords and IP) to tune up our antispam ... but whenever someone forwarding something from one internal mailbox ...
      (microsoft.public.exchange.admin)
    • delivered-to & envelope-to?
      ... basically I would like the initial envelope-to added as a header ... I have had a couple of messages redirected to a mailbox that must have ... All I have found on the envelope-to is a LOCAL_CONFIG option for the M4 ... Colin. ...
      (comp.mail.sendmail)