Subversion Repositories SmartDukaan

Rev

Rev 78 | Rev 1915 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
78 naveen 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
 
27
    return score