r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Core] Discuss core issues

Maxim
12-Dec-2009
[15168]
when you say hosting account, you mean a server on the net with its 
own dns/ip which is different than the ip being served to you by 
your access provider... yes?
Von
12-Dec-2009
[15169]
Yes, it's a shared hosting account; my provider is GoDaddy.
Maxim
12-Dec-2009
[15170]
its possible GoDaddy has an smtp relay you can connect to, which 
will accept connections from the hosted machine.

your internet provider will not allow anyone else than its own allocated 
ips to make an smtp connect... for sure.
Von
12-Dec-2009
[15171x2]
SMTP Relay lets you send email messages through your email account 
using your existing email service. For example, you can continue 
to use Microsoft Outlook to compose, receive, and send email messages, 
but the actual email messages are processed through our SMTP relaying 
services. This lets you bypass ISP restrictions on your outbound 
email messages and allows you to use your professional looking "[sales-:-coolexample-:-com]" 
email address rather than a general “[sales-:-ispname]” address.
Does this mean, I'll need to use perl: sendmail?
Graham
12-Dec-2009
[15173]
godaddy has it's own smtp server
Maxim
12-Dec-2009
[15174x2]
so, von, if you have a godaddy mail account setup, you can connect 
to its smtp server directly. 


is your hosted machine's set-net function setup to connect to something 
like [smtp-:-godaddy] ?
set-net is the rebol networking setup function. it is usually run 
on install and is stored in your user.r
Von
12-Dec-2009
[15176x2]
I have the following smtp in my set-net:  smtpout.secureserver.net
It works when I send an e-mail from my home laptop but not on my 
hosting account.
Graham
12-Dec-2009
[15178x4]
well, doesn't it ask you for a password??
esmtp requires a password
so you need to encode the password somewhere if you're going to use 
a script
and if you're not on your ISP ... it probably won't even let you 
send the email
Von
12-Dec-2009
[15182]
I've supplied all necessary info in set-net, which includes username 
and password.
Graham
12-Dec-2009
[15183]
well, then you need to a trace/net to see where the issue is
Von
12-Dec-2009
[15184]
In the past I've always used /usr/sbin/sendmail to send e-mails via 
cgi but I'm lost on how to do it via Rebol.
Graham
12-Dec-2009
[15185x2]
do you have a shell account?
from godaddy?
Von
12-Dec-2009
[15187]
I have to create one but the GoDaddy system says that I'll have to 
update my database name due to the conversion.
Graham
12-Dec-2009
[15188x4]
if sendmail works .. maybe you can use

set-net [ localhost [sales-:-coolexample-:-com] [
try this

rebol []
echo %log.txt
set-net [ [sales-:-coolexample-:-com] smtpout.secureserver.net ]
trace/net on
send [self-:-somewhere-:-com] "test"
make it a cgi script and see what is written to %log.txt
I get this

>> set-net [ [sales-:-coolexample-:-com] smtpout.secureserver.net ]
>> send [someone-:-gmail-:-com] "testing"
Net-log: ["Opening" "tcp" "for" "esmtp"]
connecting to: smtpout.secureserver.net
Net-log: [none "220"]
Net-log: {220 p3plsmtpa01-02.prod.phx3.secureserver.net ESMTP}
Net-log: [["EHLO" system/network/host] "250"]
Net-log: "250-p3plsmtpa01-02.prod.phx3.secureserver.net"
Net-log: "250-AUTH LOGIN PLAIN"
Net-log: "250-8BITMIME"
Net-log: "250 PIPELINING"
Net-log: ["Supported auth methods:" [login plain]]
Net-log: ["MAIL FROM: <[sales-:-coolexample-:-com]>" "250"]
Net-log: "250 Sender accepted."
Net-log: ["RCPT TO: <[someone-:-gmail-:-com]>" "250"]

** User Error: Server error: tcp 553 Sorry, that domain isn't in 
my list of allowed rcpthosts.
Von
12-Dec-2009
[15192]
log.txt:  Content-Type: text/plain

Net-log: ["Opening" "tcp" "for" "esmtp"]
Net-log: [none "220"]
** User Error: Server error: tcp connection failed
** Near: smtp-port: open [scheme: 'esmtp] 
either only
Maxim
12-Dec-2009
[15193]
that looks like an outgoing firewall issue.
Graham
12-Dec-2009
[15194x4]
yeah ..port 25 is being blocked
you have to use this .... http://help.godaddy.com/article/1073
this is the correct smtp server relay-hosting.secureserver.net
limit of 1000 email per day
Von
12-Dec-2009
[15198]
Wow, that's it! :-)  I've spent almost 10 hours trying to resolve 
this and I had the wrong smtp relay, duh me!  I really appreciate 
your help!
Maxim
12-Dec-2009
[15199]
the best developper community in the world   :-D
Graham
12-Dec-2009
[15200]
My paypal account is ...
Maxim
12-Dec-2009
[15201]
(hahaha was gonna say...  "bills in the mail"  ;-)
Graham
12-Dec-2009
[15202]
too slow ...
Von
12-Dec-2009
[15203]
Hey, I'd be happy to send some $, if it means speeding up my learning 
curve!  I'll PayPal some money over, seriously!
Graham
12-Dec-2009
[15204x2]
great .. can pay for my new USB LCD monitor :)  [sales-:-compkarori-:-co-:-nz] 
:)
.. help pay .. not pay for the whole lthing!
Von
12-Dec-2009
[15206]
Done, I've submitted via PayPal :-)  Thanks for your help, I get 
can some rest now :-)  Thanks Maxim for your help also!
Graham
12-Dec-2009
[15207]
Thanks Von .. will certainly encourage others to help you out :)
Maxim
12-Dec-2009
[15208]
and who said we coudn't make profit by reboling  ;-)
Von
13-Dec-2009
[15209]
Graham, you mentioned that I should encode the password.   Is this 
in case someone hacks into my host?  If I use the encloak function, 
couldn't someone also find my readable key in the script and then 
decloak my password using Rebol?
Henrik
13-Dec-2009
[15210x2]
would there be instances where write/lines/append would write a quarter 
or half a line? I'm logging tests of several script instances into 
the same file and write/lines/append sometimes produces only half 
a line in the log.
sometimes empty lines occur as well
sqlab
13-Dec-2009
[15212]
If you write with different rebol instances into the same file at 
the same time, you are out of luck. I
Janko
13-Dec-2009
[15213x2]
could you create something like a trie in rebol or would you have 
to go lower level for it to be normally eficient?
(let's say I want to use key-value (string-int) pairs for 5M words 
.. hash tables are probably more memory consuming for such a big 
set of data?)
Maxim
13-Dec-2009
[15215x3]
hash tables for such a big set are the only way to go... they will 
be magnitudes faster on access.
I've had REBOL use up over 700MB of RAM without isues or dramatic 
speed drops... but having millions of items, make sure you pre-allocate 
your hash-table, cause if you keep-appending to the same table for 
each entry, it will get  exponentially slower.
but when things are in the millions, sometimes using a disk-based 
on-demand caching algorithm is fastest... it really depends on the 
application.


cause think of it this way.  every byte used by each element becomes 
a MB  so adds up quickly.


5 million pairs of (10 byte) strings and pairs... is just about 350MB 
!

 >> b: make block! 5000010
>> m: stats
== 84172417

>> loop 5000000 [append b copy random "1234567890" append b random 
10000000]

== ["5862713409" 4765171 "2546013987" 2726704 "9528013746" 3565380 
"4591302786" ...
>>  stats - m
== 348435008