[21812] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4016 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 23 14:10:39 2002

Date: Wed, 23 Oct 2002 11:10:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 23 Oct 2002     Volume: 10 Number: 4016

Today's topics:
    Re: Sending Mail, How many SMTP Servers used? <christoph.wagner@christies.co.at>
        some questions (AGoodGuyGoneBad)
    Re: warnings::register, no warnings, and inheritance <heather710101@yahoo.com>
    Re: warnings::register, no warnings, and inheritance (Anno Siegel)
    Re: What is a file XXX.pl.swp ?? <johngnub@worldnet.att.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 23 Oct 2002 19:50:21 +0200
From: "Christoph Wagner" <christoph.wagner@christies.co.at>
Subject: Re: Sending Mail, How many SMTP Servers used?
Message-Id: <3db6e11d$0$19630$91cee783@newsreader01.highway.telekom.at>

This is a multi-part message in MIME format.

------=_NextPart_000_0043_01C27ACD.6BC01530
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thank you for the detailed explanations, but

as I read in books and on some sites, there are 3 Mail Protocols:

UUCP and X.400
"
The UUCP mail is based on the "store and forward" algorithm, i.e. each =
computer sends the entire message to its "neighbor" via phone lines, and =
that neighbor then transfers it to its neighbor, and so on till the =
message is delivered to the recipient computer.
"

SMTP=20
"
The SMTP mail system uses the DNS to convert the domain part of an =
E-mail address to the network address of that computer, establishes a =
communication link with the SMTP server software on that machine and =
transfers the message directly to the recipient machine. Messages are =
transferred without being stored on intermediate hosts.
"

So my Conclusion only could be, that there is no way to get feedback =
that a mail really receives the recipient.

The highest chance to successfull send mail is to use a Sender SMTP =
Server to the Recipients POP Account.
Then Monitoring the LogFiles of the Server, and if an error occurs =
resend until it is done.

Thanks again,

b.r Christoph


"john bennett" <johngnub@worldnet.att.net> wrote in message =
news:NTkt9.18807$Mb3.651316@bgtnsc04-news.ops.worldnet.att.net...
> If the emails are getting "lost" or just in delay (maybe a long delay) =
on
> the way, Dont forget to look at the
> log files for the sender server, if it is a perl useing a module to =
send the
> email, check to see the
> Module has a Verbose or debug option to help track down the errror, No =
not a
> Perl thing,
> Just a Sysadmin thing.
>=20
> ? Do we know that the email was not sent ? Or only not recived ?
>=20
> 2 cents JB
>=20
> Benjamin Goldberg <goldbb2@earthlink.net> wrote in message
> news:3DB5D2EA.689610BD@earthlink.net...
> > Christoph Wagner wrote:
> > >
> > > Dear all,
> > >
> > > I need to explain why some Mails are not send, are missing.
> > > About 5 of 1000 Mails are not.
> > >
> > > Is following correct?
> > >
> > > SMTP Protocoll sends Mails directly from the Senders Mail Server =
to
> > > Recipients Mail Server,
> > > there is no other MailServer between.(2 SMTP Servers used)
> >
> > Sorry, no.
> >
> > The SMTP protocol transfers mail from the originator's machine, to =
his
> > SMTP server.
> >
> > This server will then store it, so it can forward it to the next =
step
> > when it's CPU/bandwidth usage is low.
> >
> > Some messages may be to users on that machine, or users whose mail =
is
> > served by that machine with the POP or IMAP protocols -- these get =
moved
> > to local files.
> >
> > Other messages, though, get forwarded -- possibly by the original =
SMTP
> > process, possibly by another process on that machine, possibly by a
> > process on another machine but which shares the filesystem.
> >
> > That other program will go through those files which get forwarded, =
and
> > perform DNS MX lookups on the domain-parts of the email addresses.
> >
> > For each host that was looked up, it connects to that host, and uses =
the
> > SMTP protocol to forward all of the messages which go to that host.  =
As
> > each message is transferred successfully, it gets removed from the =
file
> > the forwarding program read it from.
> >
> > From there, it will *either* go into a local file, or get fowarded
> > *again*.  For example, all messages of the form =
[a]@[b].somedomain.com
> > might get sent to the machine mail.somedomain.com, then get =
forwarded
> > (via SMTP) to the approproate machine based on [b], then get dropped =
in
> > a local file based on [a].
> >
> > In point of fact, messages can get forwarded almost any number of =
times,
> > so long as they don't end up travelling in a loop.
> >
> > If, at any point, the mail cannot be forwarded then it will send a
> > message back to the originator saying so.  For some times of errors =
(eg,
> > if it couldn't connect), it will try again, and maybe eventually get =
the
> > message through.  For some types of failures, it's "fatal", and =
won't
> > retry (eg, if the recipient doesn't exist on the destination =
machine, or
> > if his mailbox is full).
> >
> > Anyway, if you send 5000 mails, and 4995 go through, you (the =
sender)
> > should get 5 messages in your mailbox saying that the mail couldn't =
be
> > sent.
> >
> > Of course, this only works if your mail sending program uses your =
proper
> > email address in the "RCPT FROM" SMTP command.  (Note that this is
> > mostly unrelated to the email address in the "From:" MIME header ...
> > they are usually the same, but need not be).
> >
> > > I checked the RFC for SMTP, also Mail Headers and I think this is
> > > correct
> > >
> > > I know this is not a perl specific question, but I need to be =
sure.
> >
> > If you want to send mail with the greater assurance of knowing =
whether
> > or not you succeed, do the DNS MX queries yourself (with the =
Net::DNS
> > module), and then send your messages to the resulting hosts.  =
There's a
> > good chance that if you do that, you'll find out right away that if
> > there's a failure to send.  But it's slower.
> >
> > --
> > my $n =3D 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
> > ."\n1oa! er")[map $n =3D ($n * 24 + 30) % 31, (42) x 26]
>=20
> 
------=_NextPart_000_0043_01C27ACD.6BC01530
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT size=3D2>Thank you for the detailed explanations, =
but</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>as I read in books and on some sites, there are 3 =
Mail=20
Protocols:</FONT></DIV>
<DIV><FONT size=3D2></FONT><A=20
href=3D"http://www.stalker.com/solutions/email.html#UUCPLimits"><FONT=20
size=3D2></FONT></A>&nbsp;</DIV>
<DIV><FONT size=3D2><STRONG>UUCP and X.400</STRONG></FONT></DIV>
<DIV><FONT size=3D2>"</FONT></DIV>
<DIV><FONT size=3D2>The UUCP mail is based on the "store and forward" =
algorithm,=20
i.e. each computer sends the entire message to its "neighbor" via phone =
lines,=20
and that neighbor then transfers it to its neighbor, and so on till the =
message=20
is delivered to the recipient computer.</FONT></DIV>
<DIV><FONT size=3D2>"</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><STRONG>SMTP </STRONG></FONT></DIV>
<DIV><FONT size=3D2>"</FONT></DIV>
<DIV><FONT size=3D2>The SMTP mail system uses the DNS to convert the =
domain part=20
of an E-mail address to the network address of that computer, =
establishes a=20
communication link with the SMTP server software on that machine and =
transfers=20
the message directly to the recipient machine. Messages are transferred =
without=20
being stored on intermediate hosts.</FONT></DIV>
<DIV><FONT size=3D2>"</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>So my Conclusion only could be, that there is no way =

to&nbsp;get feedback&nbsp;that a mail really receives the=20
recipient.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><STRONG>The highest chance to&nbsp;successfull send =
mail is to=20
use a Sender SMTP Server&nbsp;to&nbsp;the Recipients&nbsp;POP=20
Account.</STRONG></FONT></DIV>
<DIV><FONT size=3D2><STRONG>Then Monitoring the LogFiles of the Server, =
and if an=20
error occurs resend until it is done.</STRONG></FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thanks again,</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>b.r Christoph</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>"john bennett" &lt;</FONT><A=20
href=3D"mailto:johngnub@worldnet.att.net"><FONT=20
size=3D2>johngnub@worldnet.att.net</FONT></A><FONT size=3D2>&gt; wrote =
in message=20
</FONT><A=20
href=3D"news:NTkt9.18807$Mb3.651316@bgtnsc04-news.ops.worldnet.att.net"><=
FONT=20
size=3D2>news:NTkt9.18807$Mb3.651316@bgtnsc04-news.ops.worldnet.att.net</=
FONT></A><FONT=20
size=3D2>...</FONT></DIV><FONT size=3D2>&gt; If the emails are getting =
"lost" or=20
just in delay (maybe a long delay) on<BR>&gt; the way, Dont forget to =
look at=20
the<BR>&gt; log files for the sender server, if it is a perl useing a =
module to=20
send the<BR>&gt; email, check to see the<BR>&gt; Module has a Verbose or =
debug=20
option to help track down the errror, No not a<BR>&gt; Perl =
thing,<BR>&gt; Just=20
a Sysadmin thing.<BR>&gt; <BR>&gt; ? Do we know that the email was not =
sent ? Or=20
only not recived ?<BR>&gt; <BR>&gt; 2 cents JB<BR>&gt; <BR>&gt; Benjamin =

Goldberg &lt;</FONT><A href=3D"mailto:goldbb2@earthlink.net"><FONT=20
size=3D2>goldbb2@earthlink.net</FONT></A><FONT size=3D2>&gt; wrote in=20
message<BR>&gt; </FONT><A =
href=3D"news:3DB5D2EA.689610BD@earthlink.net"><FONT=20
size=3D2>news:3DB5D2EA.689610BD@earthlink.net</FONT></A><FONT =
size=3D2>...<BR>&gt;=20
&gt; Christoph Wagner wrote:<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Dear=20
all,<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; I need to explain why some =
Mails are=20
not send, are missing.<BR>&gt; &gt; &gt; About 5 of 1000 Mails are =
not.<BR>&gt;=20
&gt; &gt;<BR>&gt; &gt; &gt; Is following correct?<BR>&gt; &gt; =
&gt;<BR>&gt; &gt;=20
&gt; SMTP Protocoll sends Mails directly from the Senders Mail Server =
to<BR>&gt;=20
&gt; &gt; Recipients Mail Server,<BR>&gt; &gt; &gt; there is no other =
MailServer=20
between.(2 SMTP Servers used)<BR>&gt; &gt;<BR>&gt; &gt; Sorry, =
no.<BR>&gt;=20
&gt;<BR>&gt; &gt; The SMTP protocol transfers mail from the originator's =

machine, to his<BR>&gt; &gt; SMTP server.<BR>&gt; &gt;<BR>&gt; &gt; This =
server=20
will then store it, so it can forward it to the next step<BR>&gt; &gt; =
when it's=20
CPU/bandwidth usage is low.<BR>&gt; &gt;<BR>&gt; &gt; Some messages may =
be to=20
users on that machine, or users whose mail is<BR>&gt; &gt; served by =
that=20
machine with the POP or IMAP protocols -- these get moved<BR>&gt; &gt; =
to local=20
files.<BR>&gt; &gt;<BR>&gt; &gt; Other messages, though, get forwarded =
--=20
possibly by the original SMTP<BR>&gt; &gt; process, possibly by another =
process=20
on that machine, possibly by a<BR>&gt; &gt; process on another machine =
but which=20
shares the filesystem.<BR>&gt; &gt;<BR>&gt; &gt; That other program will =
go=20
through those files which get forwarded, and<BR>&gt; &gt; perform DNS MX =
lookups=20
on the domain-parts of the email addresses.<BR>&gt; &gt;<BR>&gt; &gt; =
For each=20
host that was looked up, it connects to that host, and uses the<BR>&gt; =
&gt;=20
SMTP protocol to forward all of the messages which go to that =
host.&nbsp;=20
As<BR>&gt; &gt; each message is transferred successfully, it gets =
removed from=20
the file<BR>&gt; &gt; the forwarding program read it from.<BR>&gt; =
&gt;<BR>&gt;=20
&gt; From there, it will *either* go into a local file, or get =
fowarded<BR>&gt;=20
&gt; *again*.&nbsp; For example, all messages of the form=20
[a]@[b].somedomain.com<BR>&gt; &gt; might get sent to the machine=20
mail.somedomain.com, then get forwarded<BR>&gt; &gt; (via SMTP) to the=20
approproate machine based on [b], then get dropped in<BR>&gt; &gt; a =
local file=20
based on [a].<BR>&gt; &gt;<BR>&gt; &gt; In point of fact, messages can =
get=20
forwarded almost any number of times,<BR>&gt; &gt; so long as they don't =
end up=20
travelling in a loop.<BR>&gt; &gt;<BR>&gt; &gt; If, at any point, the =
mail=20
cannot be forwarded then it will send a<BR>&gt; &gt; message back to the =

originator saying so.&nbsp; For some times of errors (eg,<BR>&gt; &gt; =
if it=20
couldn't connect), it will try again, and maybe eventually get =
the<BR>&gt; &gt;=20
message through.&nbsp; For some types of failures, it's "fatal", and=20
won't<BR>&gt; &gt; retry (eg, if the recipient doesn't exist on the =
destination=20
machine, or<BR>&gt; &gt; if his mailbox is full).<BR>&gt; &gt;<BR>&gt; =
&gt;=20
Anyway, if you send 5000 mails, and 4995 go through, you (the =
sender)<BR>&gt;=20
&gt; should get 5 messages in your mailbox saying that the mail couldn't =

be<BR>&gt; &gt; sent.<BR>&gt; &gt;<BR>&gt; &gt; Of course, this only =
works if=20
your mail sending program uses your proper<BR>&gt; &gt; email address in =
the=20
"RCPT FROM" SMTP command.&nbsp; (Note that this is<BR>&gt; &gt; mostly =
unrelated=20
to the email address in the "From:" MIME header ...<BR>&gt; &gt; they =
are=20
usually the same, but need not be).<BR>&gt; &gt;<BR>&gt; &gt; &gt; I =
checked the=20
RFC for SMTP, also Mail Headers and I think this is<BR>&gt; &gt; &gt;=20
correct<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; I know this is not a perl =
specific=20
question, but I need to be sure.<BR>&gt; &gt;<BR>&gt; &gt; If you want =
to send=20
mail with the greater assurance of knowing whether<BR>&gt; &gt; or not =
you=20
succeed, do the DNS MX queries yourself (with the Net::DNS<BR>&gt; &gt; =
module),=20
and then send your messages to the resulting hosts.&nbsp; There's =
a<BR>&gt; &gt;=20
good chance that if you do that, you'll find out right away that =
if<BR>&gt; &gt;=20
there's a failure to send.&nbsp; But it's slower.<BR>&gt; &gt;<BR>&gt; =
&gt;=20
--<BR>&gt; &gt; my $n =3D 2; print +(split //, 'e,4c3H r =
ktulrnsJ2tPaeh'<BR>&gt;=20
&gt; ."\n1oa! er")[map $n =3D ($n * 24 + 30) % 31, (42) x 26]<BR>&gt; =
<BR>&gt;=20
</FONT></BODY></HTML>

------=_NextPart_000_0043_01C27ACD.6BC01530--



------------------------------

Date: 23 Oct 2002 17:54:32 GMT
From: agoodguygonebad@aol.com (AGoodGuyGoneBad)
Subject: some questions
Message-Id: <20021023135432.27003.00003394@mb-mh.aol.com>

1)If I call this sub several times

sub Option{
print "<SELECT NAME=\"$pre\">\n";
print "<OPTION VALUE = \"\"></OPTION>\n";
for ($ii=1;$ii<15;$ii++) {
print "<OPTION VALUE = \"$ii\">$ii</OPTION>\n";
}
print "</SELECT>\n";
}

is it any quicker to just do

sub Option{
print qq~
<SELECT NAME=\"$pre\">
<OPTION VALUE = \"\"></OPTION>
<OPTION VALUE =\"1\">1</OPTION>
<OPTION VALUE =\"2\">2</OPTION>
<OPTION VALUE =\"3\">3</OPTION>
<OPTION VALUE =\"4\">4</OPTION>
<OPTION VALUE =\"5\">5</OPTION>
<OPTION VALUE =\"6\">6</OPTION>
<OPTION VALUE =\"7\">7</OPTION>
<OPTION VALUE =\"8\">8</OPTION>
<OPTION VALUE =\"9\">9</OPTION>
<OPTION VALUE =\"10\">10</OPTION>
<OPTION VALUE =\"11\">11</OPTION>
<OPTION VALUE =\"12\">12</OPTION>
<OPTION VALUE =\"13\">13</OPTION>
<OPTION VALUE =\"14\">14</OPTION>
</SELECT>
~;
}


2)
 Option();
is better (in this case) than
 &Option;
right ?

3) to avoid stringification, should this
print "$Step2<br>\n";
be something like
print $Step2."<br>\n";
or does it really matter ?

Thanks
Steve


------------------------------

Date: Wed, 23 Oct 2002 13:39:43 +0000 (UTC)
From: Da Witch <heather710101@yahoo.com>
Subject: Re: warnings::register, no warnings, and inheritance
Message-Id: <ap68qv$lq9$1@reader1.panix.com>

In <ap5pdq$3kr$1@mamenchi.zrz.TU-Berlin.DE> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
>Your observation is quite correct, warnings.pm doesn't play nice with
>inheritance at the moment.

Thanks.  It's reassuring to know that at least I'm understanding
things more or less correctly.

>In short, by an oversight warnings::enabled (as well as warnings::warn
>and warnings::warnif) don't look in the right scope to find if warnings
>are enabled for a category.

Is there any hope that this will be fixed in the near future?  Or does
it have low priority?

h


------------------------------

Date: 23 Oct 2002 15:50:17 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: warnings::register, no warnings, and inheritance
Message-Id: <ap6gfp$shr$1@mamenchi.zrz.TU-Berlin.DE>

According to Da Witch  <heather710101@yahoo.com>:
> In <ap5pdq$3kr$1@mamenchi.zrz.TU-Berlin.DE>
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
> >Your observation is quite correct, warnings.pm doesn't play nice with
> >inheritance at the moment.
> 
> Thanks.  It's reassuring to know that at least I'm understanding
> things more or less correctly.
> 
> >In short, by an oversight warnings::enabled (as well as warnings::warn
> >and warnings::warnif) don't look in the right scope to find if warnings
> >are enabled for a category.
> 
> Is there any hope that this will be fixed in the near future?  Or does
> it have low priority?

Well, the next release of Perl won't have this bug, that much is safe
to say.  In fact, I proposed a patch on p5p, but withdrew it (or I think
I did) when I realized I dislike the marriage of warnings with Carp.  The
little patch cements it, but to make warnings independent of Carp (and
more predictable) would involve a thorough rewrite of parts of warnings.pm,
plus changes in quite a few core modules.  The change would also be mildly
incompatible with what is currently documented.

Whichever way it goes, some solution will be found.  When the next
release of Perl is due is, of course, anybody's guess.

Anno


------------------------------

Date: Wed, 23 Oct 2002 17:47:49 GMT
From: "john bennett" <johngnub@worldnet.att.net>
Subject: Re: What is a file XXX.pl.swp ??
Message-Id: <9hBt9.19925$Mb3.746327@bgtnsc04-news.ops.worldnet.att.net>

A few commands, things try, that may help:

To see what might be in the file.
- strings "xxx.pl.swp."

Try to see if a old telnet session is editing a (the) file in vi / vim.
- ps -ef |grep vi

- What Modules are used in the perl scripts? Try grep -i use foobar.pl to
list them out. They will look like "use Foo::Barz ();". The news group will
be able to
offer more help if we know the names of the modules. The module is what
maybe makeing the
"tmp" files.

- Also, I have used ActiveState Perl before and it made a simlar file to the
one you are seeing. Try "perl -v" and paste that in the posting. That may
help a bit.

2 cents JB.






Steve <THISISAFAKE@ADDRESS.000> wrote in message
news:3db628f4.19736731@news.earthlink.net...
> Hi,
>
> I just had a programmer write a script for my web site. When I
> installed it, there were a couple of files ending in .swp. This script
> was installed on a Linux server.
>
> What type of file is this?
>
> I looked it up on the web and all the file id guides I could find say
> they are DOS Swap files?
>
> I also understand that Linux is able to use files for swapping so I
> pulled up a search on "Linux" and ".pl.swp" and found several hits but
> I was unable to find one that defined it. My guess is-it is a swap
> file for the Perl Script.
>
> My question is. If I modify the script, do I need to modify the swp?
> Is it automatically generated by Perl? Please point me to a web page
> or faq that explains this better.
>
> Thanks in advance,
> Steve
> My real email address is dealsgalore[A-T]earthlink.net
>
> www.cheap-land.com




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 4016
***************************************


home help back first fref pref prev next nref lref last post