RE: Help Me with shell script please

From: Jason Dixon (jason_at_dixongroup.net)
Date: 01/17/04

  • Next message: Ben Yau: "RE: pop won't authenticate my password"
    To: Red Hat Mailing List <redhat-list@redhat.com>
    Date: Fri, 16 Jan 2004 19:39:59 -0500
    
    

    On Fri, 2004-01-16 at 19:29, Ben Yau wrote:

    > > perl -e 'open(LIST, "address.txt"); while (<LIST>) { open(MAIL,
    > > "|mail -s \"subject goes here\" $_"); print MAIL "message goes
    > > here"; close(MAIL); } close(LIST);'
    >
    > How does the above give you more refined control of the "From" line?

    It doesn't, that's what I said. Use Mail::Internet if you want to forge
    the From header. If this is your desire, you're probably a spammer and
    my level of support drops off right here. :)

    > I have
    > not used Mail::Internet module before so I'm not familiar with how it works.
    > Your perl command seems ot just be a wrapper around the mail command. I'm
    > sure there's more to it than that.

    I'm not sure I'd call it a wrapper any more than I'd call ANY perl
    script that accesses the shell a wrapper. It opens a filehandle to the
    mail process and prints accordingly.

    > Does the Mail::Internet mod itself know
    > how to grab your real name from /etc/passwd ?

    No, Mail::Internet is more fine-grained. You provide the mail headers
    you wish to sculpt your message with.

    > That would be very helpful.

    Uh-oh, spammer alert going off.

    > In the past I have just used sendmail in my script to have better control of
    > the headers. Does the perl module have similar control ?

    Obviously, yes.

    > Looks like when I have time I should check out the Mail::Internet
    > documentation eh?

    If you're comfortable with Perl, yes.

    -- 
    Jason Dixon, RHCE
    DixonGroup Consulting
    http://www.dixongroup.net
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Ben Yau: "RE: pop won't authenticate my password"

    Relevant Pages

    • RE: Help Me with shell script please
      ... Because to my untrained eye your perl script ... > script that accesses the shell a wrapper. ... The "around the mail command" is the important part of ... and any fake header we want to make up on our own). ...
      (RedHat)
    • Re: [OT] I give up with the reply-to business already
      ... probably including Mail-*-To headers), ... [cut that Omega should have made] ... You guys often treat Perl Knowledge as if you ... all text from the line with only "dash dash space" (called the sigsep or ...
      (perl.beginners)
    • Re: Spamassassin + exim
      ... > You can tell by looking at the headers and seeing if BAYES_xx shows up. ... and I'm yet to see a single BAYES_* test in the ... I'm running unofficial backports of SA 2.55 found on apt-get.org: ... upgrading Perl. ...
      (Debian-User)
    • Re: Suche Digicam-Rawfile-Converter =?iso-8859-1?Q?f=FCr?= Perl
      ... Solche Dinge macht man normalerweise nicht direkt in Perl, ... stellt (z.B. auch PerlMagick ist ja nur ein Wrapper für die in C ... Wenn du selbst kein XS-Modul schreiben willst, ... Next by Date: ...
      (de.comp.lang.perl.misc)
    • Re: Looking for quick way of editing a text file
      ... On 21Nov2005 00:19, Dave Mitchell wrote: ... |> Bsed is a wrapper for sed. ... |> but edits files in place. ... for many things Perl is ...
      (Fedora)