Mailing List
Home
Linux - General Red Hat Linux discussion list
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Installation - Getting started with Red Hat Linux
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 8.0 - Discussion of Red Hat Linux 8.0 (Psyche)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Red Hat Linux 7.1 - Discussion of Red Hat Linux 7.1 (Seawolf)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Help Me with shell script please

Help Me with shell script please

2004-01-16       - By Ben Yau

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

>
> > > 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. :)

In your last email you wrote:
"If you need more refined control over the From (say, for spamming... gak!),
you
could use Mail::Internet. "

So in my email response I wrote:
How does the above give you more refined control of the "From " line? "


Now you 're saying "it doesn 't, that 's what I said. "

I guess my response to you would have to be
"no, that 's not what you said. You said 'if you need more refined control
over the From (say, for spamming... gak!), you could use Mail::Internet. "

Perhaps the reason I 'm asking you for clarification is because when someone
usually mentions a module of some sort, the example they post usually
includes something that utilizes that module and supports their claim .

That 's also why the first line of my email said
"I 'm curious "

Because to my untrained eye (untrained in mail::internet) your perl script
did not represent any "refined control " and I was wondering where that was
coming from. I 'll explain that in more detail in the next section because
that 's where it 's more relevant


> > 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.

Jason, read my email again more carefully. I said it was a "wrapper around
the mail command ". The "around the mail command " is the important part of
my email, not the "wrapper part ". Look at your perl script again.


perl -e 'open(LIST, "address.txt "); while ( <LIST >) { open(MAIL, "|mail -s
\ "subject goes here\ " $_ "); print MAIL "message goes here "; close(MAIL); }
close(LIST); '

You mention a perl module Mail::Internet, and yet you don 't specify anything
from it as far as I can tell. No unfamiliar perl
commands/functions/subroutines here. Where does Mail::Internet come in?
Where would the "refined control " come in? To me it looks like you 're just
using the "mail " command. Are you? You see Jason I 'm very curious becuase
as far a I can see

1) your example above looks like a regular perl script, which to me doesn 't
have much of an advantage over running it from the command line, and to my
untrained eye definitely wouldn 't give you refined control over headers.
In fact, it is less desirable because you 're just addig a wrapper to 'mail '.
Why not just run 'mail ' directly from bash instead of running it from perl
which will run it from bash?

and

2) since I give everyone the benefit of the doubt, and since I 'm not
familiar with Mail::Internet, I was assuming I was missing something, which
is why I was asking for clarification and which is also why I said in the
email you responded to:
(and i quote)
"Your perl command seems ot(sic) just be a wrapper around the mail command.
I 'm
sure there 's more to it than that. "
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


>
> > 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.
>

Yes, I figured that. I was asking you in what ways ? I mean we could all
manipulate the headers using sendmail (at least the Date, From, To, Cc, Bcc,
Subject, and any fake header we want to make up on our own).



> > That would be very helpful.
>
> Uh-oh, spammer alert going off.
>

Is that how you treat everyone who wants a clarification from you?

Don 't get me wrong please Jason. You 're definitely bright, and I can see
where you are coming from. I side with you on that. It 's just that if you
also want to encourage people to learn more about computers, linux, and
other topics, especially topics that you yourself bring up in a mailing list
forum, don 't you agree that we should also be a bit more polite?


> > 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.

Yes.

> > Looks like when I have time I should check out the Mail::Internet
> > documentation eh?
>
> If you 're comfortable with Perl, yes.

I 'll go ahead and do that.

If you wouldn 't mind posting a summary of some things that Mail::Internet
can do or perhaps even better an example project of how you were able to
utilize Mail::Internet to its fullest (no need to go into detail ... ), I 'm
sure it will inspire a lot of the curious readers out there like myself to
not just check Mail::Internet out but possibly even poke around cpan 's site
for other modules they have which might be able to ease our sysadmin lives a
lot more.

anyway, have a good weekend

Ben Yau





--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list