Change font size
It is currently Tue Dec 18, 2018 12:02 pm

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 10 posts ]
Author Message
 Post subject: WORKING EMAIL SCRIPT FOR OSGRID..!!
PostPosted: Sun Sep 27, 2009 6:30 am 
Furious Typer
User avatar

Joined: Tue Aug 18, 2009 1:24 pm
Posts: 64
Location: Netherlands
I Finaly found a working email script for osgrid... it still uses the second life mail server, bu it works!!!

first update your opensim.ini file.
{L_CODE}:
[SMTP]
    enabled=true

    ;internal_object_host=lsl.opensim.local
    host_domain_header_from=***.***.***.*** (fill in mail server IP adress. to find out, open
                                             Command prompt and type "ping mail.domain.xx")

    SMTP_SERVER_HOSTNAME=mail.domain.xx
    SMTP_SERVER_PORT=25
    SMTP_SERVER_LOGIN=<mail login name>
    SMTP_SERVER_PASSWORD=<pass>
    POP_SERVER_HOSTNAME=mail.domain.xx (or POP)
    POP_SERVER_PORT=110
    POP_SERVER_LOGIN=<mail login name>
    POP_SERVER_PASSWORD=<pass>


then startup osgrid server, go inworld an create a new prim. and put in this script.
change email adress to "yourmail@yourdomain.com". choose "reset scripts in this selection"
from tools menu and take it in to your inv. and rezz it again.Click the prim twice.

check your mail... (can take a while before all emails are in..)

email script:
{L_CODE}:
//Send an email from Second Life to a normal email account
// Author unknown:
// Retrieved from Free SL Scripts on http://www.gendersquare.org/sl

string mail = "yourmail@yourdomain.com"; //please fill in your own e-mail adress

default
{
    state_entry()
    {
        if(mail == "Hello, this is a message from OSGRID")
            mail = (string)llGetKey()+"@lsl.secondlife.com";

        //Send an email to a normal email account
        llEmail( mail, "Hello. This is a email from OSGRID", "I'm sending a message, please contact me..." );
    }

    touch_start( integer num_detected )
    {
        integer i = 0;

        //Send an email to the person who touched the prim
        do
            llEmail(mail, "Hello, I have been clicked..", "Someone is sending you an email form osgrisd. I was touched by: " + llDetectedName(i) + "\nKey: " + (string) llDetectedKey(i) );
        while(++i < num_detected);
        llResetScript();
    }
}


improvements are welcome...
thanks

_________________
۩____________________________________________________________________۩
Website: http://verwijs.wordpress.com
Website: http://verwijs-pc.nl (dutch)
Twitter: http://www.twitter.com/OpenSimFan/
Osgrid Profile: http://www.osgrid.org/elgg/pg/profile/Christopher.MetalFan


Last edited by Dave DutchMaster on Sun Sep 27, 2009 11:19 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: WORKING EMAIL SCRIPT FOR OSGRID..!!
PostPosted: Sun Sep 27, 2009 11:02 am 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
I must warn you enabling this in a public grid is extremly dangerous for you, it means bascilly anyone can send emails from your server with no restrictions, i highly suggest you do not enable this in your region, as your email provider could get unhappy with you if spam is generated from your regions.


Top
 Profile  
 
 Post subject: Re: WORKING EMAIL SCRIPT FOR OSGRID..!!
PostPosted: Sun Sep 27, 2009 11:18 am 
Furious Typer
User avatar

Joined: Tue Aug 18, 2009 1:24 pm
Posts: 64
Location: Netherlands
if you use this you will use your own email server, not mine.. and without password you can't log in to my mail server. but i will keep in check, if i get to much crap i will deactivate it....


thanks

_________________
۩____________________________________________________________________۩
Website: http://verwijs.wordpress.com
Website: http://verwijs-pc.nl (dutch)
Twitter: http://www.twitter.com/OpenSimFan/
Osgrid Profile: http://www.osgrid.org/elgg/pg/profile/Christopher.MetalFan


Top
 Profile  
 
 Post subject: Re: WORKING EMAIL SCRIPT FOR OSGRID..!!
PostPosted: Sun Sep 27, 2009 11:32 am 
OSG Elite
User avatar

Joined: Thu Dec 11, 2008 7:51 am
Posts: 392
Location: England UK
I think you are missing the point, Dave. Imagine this scenario:

You setup e-mail on one of your regions.
You test it and verify that it is working.
I come along with a very simple script to see if e-mail is working on your region; just a very simple one to send a test e-mail to an address of my choice.
I then get that e-mail, so I basically have an LSL to SMTP relay at my hands.
I then create another script to spam message after message to any address of my choosing from your sim, using your SMTP server. I wouldn't even need to rez an object as an attachment would work just as well. Sure you could disable scripts for everyone but yourself, but from my experience a region without scripts running for everyone is pretty lame (I can't use my AO ;))

Using e-mail on any region is very risky, unless you have your own local mail server and are able to create a rule that any mail from [object@domain] can only goto [domain]. That way the e-mail will only be relayed to that specific domain, i.e. your own.

ETA: Or have the rule set to send to just a single e-mail address, not just a domain.

_________________
"Nothing lasts forever; It's scientific"
~David Byrne (Talking Heads)


Top
 Profile  
 
 Post subject: Re: WORKING EMAIL SCRIPT FOR OSGRID..!!
PostPosted: Thu Oct 01, 2009 3:09 pm 
Furious Typer
User avatar

Joined: Tue Aug 18, 2009 1:24 pm
Posts: 64
Location: Netherlands
Adelle Fitzgerald {L_WROTE}:
I think you are missing the point, Dave. Imagine this scenario:

You setup e-mail on one of your regions.
You test it and verify that it is working.
I come along with a very simple script to see if e-mail is working on your region; just a very simple one to send a test e-mail to an address of my choice.
I then get that e-mail, so I basically have an LSL to SMTP relay at my hands.
I then create another script to spam message after message to any address of my choosing from your sim, using your SMTP server. I wouldn't even need to rez an object as an attachment would work just as well. Sure you could disable scripts for everyone but yourself, but from my experience a region without scripts running for everyone is pretty lame (I can't use my AO ;))

Using e-mail on any region is very risky, unless you have your own local mail server and are able to create a rule that any mail from [object@domain] can only goto [domain]. That way the e-mail will only be relayed to that specific domain, i.e. your own.

ETA: Or have the rule set to send to just a single e-mail address, not just a domain.



turned it off now..

_________________
۩____________________________________________________________________۩
Website: http://verwijs.wordpress.com
Website: http://verwijs-pc.nl (dutch)
Twitter: http://www.twitter.com/OpenSimFan/
Osgrid Profile: http://www.osgrid.org/elgg/pg/profile/Christopher.MetalFan


Top
 Profile  
 
 Post subject: Best practices for email scripts
PostPosted: Thu Oct 01, 2009 4:02 pm 
Furious Typer
User avatar

Joined: Thu Sep 10, 2009 1:46 pm
Posts: 94
Location: Portland, Oregon
Disclaimer: I spent some time working for a major US VPS host where one of my work email addresses started in "abuse@", and had to deal with both spammers and poorly behaved customer-implemented email tools regularly. If you love long hours and receiving death threats at home from criminals, consider a career in internet abuse management and get good at it!

Dave DutchMaster {L_WROTE}:
turned it off now..


You have the right idea right now: Keep it disabled until you're good and ready for it.

If/when you turn it back on, make sure you follow best practices. This isn't directed towards any one user, but to anyone considering the email module in general: DO NOT enable the email module unless you are ready, willing and able to implement and manage automated systems with REAL, real world consequences potentially up to and including termination of your internet or hosting service and potential punative "clean up" fees from your provider. In this case, unless you have experience implementing listservs or customer support response systems in a hosting environment facing the public internet, think twice before using the email module. Spammers are professional abusers of email and will find any method they can to get their message out, and I have zero reason to believe that they're incapable of reading this thread.

1) Implement limits on your server so only authorized owners can call email functions in scripts and have them work. I don't know if this is yet possible.

2) Control who you're sending to by implementing a closed-loop opt-in system¹. "But I'm not running a mailing list!" Not in the traditional sense, no. But it's still an extremely good idea to limit who you're going to send more than a "Reply to me with this unique hash if you really meant to get emailed script output" message to. Speaking of which: Make sure you can't request more than one confirmation over X amount of time. This may mean that you will occasionally need to manually confirm someone who requested too many times and locked themselves out, but it's better than the consequences of the alternative.

3) Be sure emails sent from scripts include the "Precedence: Bulk" header²; this is probably best done by opensimulator's email component itself at some point, but you may have to do it in scripts if it's not done automatically. This is especially important if your script is expecting a reply to avoid loops. It also allows people to manage their email better since all machine-generated email regardless of sender can be filtered to a single folder readily.

4) If you aren't sure what to do, ask someone! You have the forums here, Google, Spamhaus, and you have the support staff at your network or hosting provider to help guide you on the best practices for implementing automated email systems.



¹ http://www.spamhaus.org/mailinglists.html
² http://www.febooti.com/products/command ... dence.html


Top
 Profile  
 
 Post subject: Re: WORKING EMAIL SCRIPT FOR OSGRID..!!
PostPosted: Thu Oct 01, 2009 10:24 pm 
Furious Typer
User avatar

Joined: Tue Aug 18, 2009 1:24 pm
Posts: 64
Location: Netherlands
thank you for your replay, i didn't know that email this way was dangerous especially when you are running your own mail server (on linux for example). but if its dangerous, why make it possible then for OSGRID simulators?

and what about "Second Life" is it also dangerous to turn on email there?

_________________
۩____________________________________________________________________۩
Website: http://verwijs.wordpress.com
Website: http://verwijs-pc.nl (dutch)
Twitter: http://www.twitter.com/OpenSimFan/
Osgrid Profile: http://www.osgrid.org/elgg/pg/profile/Christopher.MetalFan


Top
 Profile  
 
 Post subject: Re: WORKING EMAIL SCRIPT FOR OSGRID..!!
PostPosted: Fri Oct 02, 2009 12:40 am 
Furious Typer
User avatar

Joined: Thu Sep 10, 2009 1:46 pm
Posts: 94
Location: Portland, Oregon
Dave DutchMaster {L_WROTE}:
thank you for your replay, i didn't know that email this way was dangerous especially when you are running your own mail server (on linux for example). but if its dangerous, why make it possible then for OSGRID simulators?


As with any other system capable of sending an email without direct human intervention, it exists because there are people who are capable of implementing such a system securely. Do note that at least in OpenSimulator, this module is intentionally off by default for this reason: It makes the functionality available to those who know about it, but prevents those ignorant of the feature from getting burned.

{L_QUOTE}:
and what about "Second Life" is it also dangerous to turn on email there?


There, you're offloading the risk to Linden Lab. I would still follow best practices there to help avoid getting the Lab's mail servers from being accused of being a spam haven, I imagine they have controls in place to monitor this better than your average OpenSim user.


Top
 Profile  
 
 Post subject: Re: WORKING EMAIL SCRIPT FOR OSGRID..!!
PostPosted: Fri Oct 02, 2009 11:52 am 
Furious Typer
User avatar

Joined: Tue Aug 18, 2009 1:24 pm
Posts: 64
Location: Netherlands
yes i think so to. Second life is to big to let spam or viruses bring the whole thing down trough the mail server.

maybe in the future, OSGRID is able to use the same technique as linden labs for email.
but first stability (physics) has to be first priority and server speed. (POOF IT UP!!!)

_________________
۩____________________________________________________________________۩
Website: http://verwijs.wordpress.com
Website: http://verwijs-pc.nl (dutch)
Twitter: http://www.twitter.com/OpenSimFan/
Osgrid Profile: http://www.osgrid.org/elgg/pg/profile/Christopher.MetalFan


Top
 Profile  
 
 Post subject: Re: WORKING EMAIL SCRIPT FOR OSGRID..!!
PostPosted: Fri Oct 02, 2009 4:13 pm 
Furious Typer
User avatar

Joined: Thu Sep 10, 2009 1:46 pm
Posts: 94
Location: Portland, Oregon
Dave DutchMaster {L_WROTE}:
yes i think so to. Second life is to big to let spam or viruses bring the whole thing down trough the mail server.

maybe in the future, OSGRID is able to use the same technique as linden labs for email.
but first stability (physics) has to be first priority and server speed. (POOF IT UP!!!)


The problem with that, is that LRI is big enough to be a major internet backbone by itself these days, sending email from a unified set of servers. OSgrid is spread out across the internet, including many dynamic IPs that would get blocked by many email providers in the first place. Osgrid has thousands of regions under the control of dozens of different administrators with radically different degrees of expertise. It's really hard to enforce gridwide social protocol on anything, much less something designed to be a greased pig in the first place such as email. The best support for this we will likely ever have is for it to be enabled on a few well connected sims hosted by email experts to keep an eye on it as we do now.

A huge factor in LRI being able to offer this so readily through Second Life is that of topology, SL has central control of everything gridwide in terms of email to/from the grid. When you have that, you can throw dedicated staff at managing potential issues in a timely manner. You can enforce policy from a central point.

Sure, now OSgrid could, in theory, set up a central mail hub for this purpose. But it wouldn't solve the problem: You still can't let users you don't trust use email services without them being abused. Arguably, a more centralized arrangement would exaserbate the problem in our context. For example, say User A, connected to Region A via a local area network (Network A) has a script that is listening for an email sent by a second script in Region B running on another server connected to Network A. Region X has a script that is being abused for whatever means by Scriptkiddie X (heck, Region X may have even been connected to the grid explicitly for the purposes of network abuse). Spamhaus, spamcop.net, or some other well-known DNSBL sees the growing abuse and lists the OSgrid outbound mail servers as an emerging threat. Network A's mail servers stop accepting mail from OSgrid based on said listing, since Region B's scripts are no longer able to be received by Region A, thanks to the email output being sent from OSgrid's mail server and not directly from Region B across Network A's local mail server. User A has no recourse to fix the break. OSgrid Gods have a royal mess to clean up that will almost certainly include many rounds of emails and phone calls, many of which are long distance and possibly overseas in the wee hours of the night, to various network providers and internet abuse watchdog orgs.

So is it likely that we'll ever have complete, end to end email support like the Linden grid? Very unlikely, because email tends to be the root of all computer security evil.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 10 posts ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net