Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Port 80 Mail Relay (Spammers Welcome?)

by bastard (Hermit)
on Sep 14, 2001 at 00:29 UTC ( [id://112299]=note: print w/replies, xml ) Need Help??


in reply to Port 80 Mail Relay (Spammers Welcome?)

Unfortunately the webmail I just wrote was under contract so i cant share the code. What I can share is the theory behind what I wrote.

It doesn't take alot to write an webmailer. (A week or so).

These are the modules i used. (ones that i hadn't custom written for this script). use Email::Valid;
use Mail::Mailer;
use Mail::Sendmail;

To prevent abuse, (a very bad thing from here) I set it up so that all the form takes other than the to-be-emailed fields is a hidden "code" field. This field describes a directory in the data directory that contans a config file and display template. Also every field to be sent is descibed in the config file (for data validation and required fields), and any that arent, don't get sent, so people can't make their own version of the form to send wierd things.

The destination email address is hard coded into the config file preventing open use of the script. The one i just wrote supports multiple email address each assigned a name in the config file. The names can be specified in the form, they would get translated by whats in the config file. (multiple names are ok).

A script could probably be built to manage the config files and templates. The config files should probably also be xml, but I was lazy and didn't want to install the expat stuff.

With this system, the referrer is not needed (besides, it can be spoofed), and it sidesteps alot of other problems. (and probably creates a few new ones, but I think overall its more secure.)

  • Comment on Re: Port 80 Mail Relay (Spammers Welcome?)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://112299]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found