Subversion Repositories SmartDukaan

Rev

Rev 71 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 71 Rev 78
Line 1... Line 1...
1
def getscore(struct):
1
def getscore(struct) :
-
 
2
    
-
 
3
    score = 0
-
 
4
    
-
 
5
    if struct.has_key("features") :
-
 
6
        features = struct.get("features")
-
 
7
        
-
 
8
        # Protocols : Mail for Exchange-3, POP3-1, SMTP-1, IMAP-1, IMAP4-1
-
 
9
        if features.has_key("Protocols") :
-
 
10
            ps = features.get("Protocols")
-
 
11
            
-
 
12
            if "Mail for Exchange" in ps :
-
 
13
                score += 3
-
 
14
 
-
 
15
            if "POP3" in ps :
-
 
16
                score += 1
-
 
17
                
-
 
18
            if "SMTP" in ps :
-
 
19
                score += 1
-
 
20
                
-
 
21
            if "IMAP" in ps :
-
 
22
                score += 1
-
 
23
                
-
 
24
            if "IMAP4" in ps :
-
 
25
                score += 1
-
 
26
                
2
    return 8
27
    return score