Page 1 of 3 123
Username Post: SPF (Sender Policy Framework) processor        (Topic#4863)
Paul_Smith 
Administrator

Posts: 6279
Paul_Smith
28/05/04 12:43 PM - Post#4863    



Attached is a large-ish sample of what can be done with Lua. It's an SPF parser/processor for direct incoming SMTP mail.

SPF is described at http://spf.pobox.com. Basically if someone sends you a message from someone@aol.com, SPF lets you ask aol.com 'was that mail server allowed to send me that message', so it stops people faking those addresses.

It only works if the sender's email domain supports SPF (a list of the major ISPs/Companies which currently do is on http://spf.pobox.com/execsumm.html, but the list is growing (and it's easy to add to your own domain if you control the DNS)

Read the install notes at the start of the file.

Note that this will only work on VPOP3 2.1.0 RC 10 (2.0.13) and later as it requires some new Lua support functions we added in that version.

Fixed version uploaded 19 Oct 2004

Fixed version uploaded 20 Sept 2005
   Attachment
 
Andras_Hirschler 
enthusiast

Posts: 587
Andras_Hirschler
31/08/04 10:35 AM - Post#5995    


    In response to Paul_Smith

do you plan to add spf support to vpop3, without lua?
are there any disadvantages using a lua script comparing to a built in function (if there is one)
ie: stability? reliability performance?

regards,
a.
 
Paul_Smith 
Administrator

Posts: 6279
Paul_Smith
31/08/04 12:12 PM - Post#6002    


    In response to Andras_Hirschler

Quote:

do you plan to add spf support to vpop3, without lua?



No - why would we...

Quote:

are there any disadvantages using a lua script comparing to a built in function (if there is one)
ie: stability? reliability performance?



Performance is about the only one that's possible, but it's not going to be noticeable for the vast majority of people - the speed of the Internet connection and DNS resolution is going to be the limiting factor, not the scripting.

Lua is an interpreted programming language like any other, so if you'd use PHP, Python, Perl, JavaScript, VBScript etc, then Lua is just the same type of thing (except a lot quicker, and designed for integration into other software).

Because Lua is designed primarily for integration into other software rather than as a standalone language (like Perl, PHP etc) it's less well known to the general public - but it's widely used and is mature (it's even used for programming AI & environmental behaviour in many games (eg Neverwinter Nights), including ones on the Playstation etc)
Paul Smith PSCS Technical Support


 
JCB_Digger 
member

Posts: 192
JCB_Digger
06/10/04 05:38 PM - Post#6502    


    In response to Paul_Smith

Hi,

I've installed this into my VPop directorym changed my allowed list of servers, closed down Vpop and restarted.

I'm still receiving mail (so I can't have broken VPop completely), but, how do I know that the SPF processor is actually working?

An idiots guide for the "Lua-challenged" amongst us would be nice :-)

Ta, John
 
Hans_Aikema 
newbie

Posts: 67
Hans_Aikema
06/10/04 10:15 PM - Post#6507    


    In response to JCB_Digger

Als antwoord op:


I'm still receiving mail (so I can't have broken VPop completely), but, how do I know that the SPF processor is actually working?





When correctly installed and working the SPF processor inserts a header "Received-SPF: " in each message that was received through SMTP showing the SPF-rating of the message (unknown, neutral, pass).
Also you'll see some logging of the LUA-script in the file LUA.out in your VPop3 installation directory.
 
JCB_Digger 
member

Posts: 192
JCB_Digger
07/10/04 08:15 AM - Post#6512    


    In response to Hans_Aikema

Hi,

I'm not getting any additional SPF headers, so I must have done something wrong.. What else should I have done?

Thanks, John
 
Paul_Smith 
Administrator

Posts: 6279
Paul_Smith
07/10/04 09:53 AM - Post#6519    


    In response to JCB_Digger

Is there anything in the Lua.out or luaerrors.log files in the VPOP3 folder?
Paul Smith PSCS Technical Support


 
JCB_Digger 
member

Posts: 192
JCB_Digger
07/10/04 11:36 AM - Post#6525    


    In response to Paul_Smith

No, neither file exists

Should I have installed anything else apart from the script - IE, is the LUA interpreter built in to VPop Enterprise?

Thanks, John
 
Paul_Smith 
Administrator

Posts: 6279
Paul_Smith
07/10/04 11:38 AM - Post#6527    


    In response to JCB_Digger

You just need VPOP3 2.1.0 or later. The Lua interpreter is included in it as standard.
Paul Smith PSCS Technical Support


 
Paul_Smith 
Administrator

Posts: 6279
Paul_Smith
07/10/04 11:39 AM - Post#6528    


    In response to JCB_Digger

You just need VPOP3 2.1.0 or later. The Lua interpreter is included in it as standard.

(You did rename the file to SMTPSVR.LUA as described at the start of the file - didn't you...)
Paul Smith PSCS Technical Support


 
JCB_Digger 
member

Posts: 192
JCB_Digger
07/10/04 01:20 PM - Post#6531    


    In response to Paul_Smith



Erm, nearly...

I renamed the file to SMTPSRV.LUA almost exactly as described in the file..

Sorry.

Regards, John
 
Paul_Smith 
Administrator

Posts: 6279
Paul_Smith
08/10/04 06:07 PM - Post#6557    


    In response to JCB_Digger

So, does it work now?
Paul Smith PSCS Technical Support


 
Fergus 
enthusiast

Posts: 266
Fergus
11/10/04 09:47 AM - Post#6570    


    In response to Paul_Smith

Paul,

I tried using the spf lua script on friday last week, initially it was working great, then after about a 2-3 hours it started causing vpop to generate exception errors every 20-30 minutes (these were sent to support@pscs.co.uk).

I ending up removing it, and this stopped the exception errors - are you able to tell what the issue was from the exception errors?

Cheers,
Fergus.
Vpop Ent 2.3.10/Avast/Spam Filter/SMTP Incoming/W2K Svr SP4/Dual PIII 1.1Ghz/1Gb Ram


 
Paul_Smith 
Administrator

Posts: 6279
Paul_Smith
11/10/04 11:39 AM - Post#6573    


    In response to Fergus

See this other thread
Paul Smith PSCS Technical Support


 
JCB_Digger 
member

Posts: 192
JCB_Digger
11/10/04 03:31 PM - Post#6579    


    In response to Fergus

Sorry, yes, it does work now (and started generating exception errors as noted (and fixed) in the other thread in 'bugs').

Regards, John
 
Fergus 
enthusiast

Posts: 266
Fergus
12/10/04 08:13 AM - Post#6589    


    In response to Paul_Smith

Thanks Paul,

I've made the change to SMTPSVR.LUA and the scripts works okay. However, the Epanopy Spam Filter plugin doesn't seem to be working for my SMTP incoming email (its okay for pop accounts) Is there something I have to add to the script to get Epanopy to check the messages ?

Cheers,
Fergus
Vpop Ent 2.3.10/Avast/Spam Filter/SMTP Incoming/W2K Svr SP4/Dual PIII 1.1Ghz/1Gb Ram


 
JCB_Digger 
member

Posts: 192
JCB_Digger
13/10/04 03:29 PM - Post#6653    


    In response to Fergus

Same here - I'm trying to search for "Received-SPF: fail" and redirect it to a mailbox (I realise you can't use SPF as an automatic whitelist, but anything which fails the SPF check should be regarded as forged email/Spam).

Regards, John
 
Fergus 
enthusiast

Posts: 266
Fergus
19/10/04 07:49 AM - Post#6726    


    In response to JCB_Digger

Paul,

I can't get the SPF lua script running along side epanopy.

Whenever I enable the SMTPSVR.lua to add SPF checks, epanopy doesn't check the messages.

Have you any ideas ?
Fergus.
Vpop Ent 2.3.10/Avast/Spam Filter/SMTP Incoming/W2K Svr SP4/Dual PIII 1.1Ghz/1Gb Ram


 
JCB_Digger 
member

Posts: 192
JCB_Digger
19/10/04 08:56 AM - Post#6727    


    In response to Fergus

Fergus,

Check out this thread:-

http://discuss.pscs.co.uk/showflat.php?Cat=0&Board=SPAMFILTER&Number=6702&fpart=1&PHPSESSID=#Post6723

Regards, John
 
Fergus 
enthusiast

Posts: 266
Fergus
19/10/04 10:28 AM - Post#6729    


    In response to JCB_Digger

thanks john,
I've been watching that thread as well, but it seems to suggest that SMTPSVR.lua is executed after Epanopy, but whenever I have the SMTPSVR.lua in the vpop directory, epanopy does not mark the messages as it has been.

Are you using Epanopy alongside the SPF script sucessfully ?
Fergus.
Vpop Ent 2.3.10/Avast/Spam Filter/SMTP Incoming/W2K Svr SP4/Dual PIII 1.1Ghz/1Gb Ram


 
 Page 1 of 3 123
Icon Legend Permissions & Sharing Options Topic Options
Print Topic


26255 Views
FusionBB™ Version 3.1 Final | ©2003-2020 InteractivePHP, Inc.
Execution time: 0.488 seconds.   Total Queries: 226   Zlib Compression is on.
All times are (GMT+1). Current time is 11:01 AM
Top