Verified And Recipient Authorized

Discussion re sg development. You don't have to be a developer.

Verified And Recipient Authorized

Postby VARA » Wed Sep 15, 2004 1:55 am

A spam gourmet subscriber Ofer Hadas directed me to your site - love it and the plain talk informative tone.

I have an anti-phishing solution (in the public domain) called VARA - which uses delimiters in the user portion of the RCPT address.

http://wiki.OutboundIndex.net/VarA

It occurs to me that the spam gourmet code probably already does much of the same parsing that I will need, although my application calls for a PTR and forward DNS lookup which spam gourmet probably does not.

Anyway - I would be interested in your comments on delimiters as that has been the hottest debate so far about VARA. I would like to use underscore.

We have a C milter and a python milter for another purpose to which we will be adding VARA support. However it seems it would be easy to do the simple VARA stuff in perl for a start, esp since it takes time and sometimes DVDs / wine / pizza to get C and python programmers motivated.

Thank you,

- April
VARA
 
Posts: 1
Joined: Wed Sep 15, 2004 1:43 am
Location: USA

Postby josh » Wed Sep 15, 2004 10:53 pm

Our delimiter parsing merely uses perl regular expressions - a very unexciting part of the code (as opposed to the eye candy elsewhere ;))

Code: Select all
  my $delimiters = $config->getDelimiters();
  if ($musername =~ /(.+)[$delimiters](.+)[$delimiters](.+)[$delimiters](.+)/) {
    ($mprefix,$mword,$mcount,$musername) = ($1,$2,$3,$4);
  } elsif ($musername =~ /(.+)[$delimiters](.+)[$delimiters](.+)/) {
    ($mword,$mcount,$musername) = ($1,$2,$3);
  } elsif ($musername =~ /(.+)[$delimiters](.+)/) {
    ($mword,$musername) = ($1,$2);
  }


the delimiter(s) are stored in an external config file. The variable $musername represents the part of the email address in front of the @ sign, and the other variables are what we break out of it.

If you want to see the full source, you can at http://www.sourceforge.net/projects/spamgourmet -- browse CVS, since we haven't done a release in quite awhile.

Perl is pretty good at this stuff, and we've never identified this code as a performance bottleneck. What's the controversy about? The choice of delimiters serves to limit the usernames that are available (because the delimiters become reserved), but other than that it's been pretty much a non-issue for us.
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest

cron