1
0
mirror of https://github.com/MailHops/mailhops-plugin.git synced 2025-05-17 23:00:10 -07:00

Added Readme file

Added multiple IP check in one received line
bump v0.8.3
This commit is contained in:
Andrew Van Tassel 2014-06-16 22:16:10 -06:00
parent 2a2c55ddd1
commit af4fb56fa1
4 changed files with 195 additions and 183 deletions

11
README.md Normal file
View File

@ -0,0 +1,11 @@
# MailHops ![MailHops](chrome/content/images/mailhops32.png) Postbox Plugin
1. Edit files
2. Run [build.sh](build.sh) script
3. Open Postbox and goto Tools->Add-ons and "Install Add-on From File..."
4. Choose mailhops.xpi from build script
```bash
$ chmod +x build.sh
$ ./build.sh
```

0
build.sh Normal file → Executable file
View File

View File

@ -25,7 +25,7 @@ var mailHops =
isLoaded: false,
options: {'map':'goog','unit':'mi','api_url':'http://api.mailhops.com','debug':false},
appVersion: 'MailHops Postbox 0.8.2',
appVersion: 'MailHops Postbox 0.8.3',
message: {secure:[]},
client_location: null
}
@ -251,10 +251,11 @@ var regexAllIp = /(1\d{0,2}|2(?:[0-4]\d{0,1}|[6789]|5[0-5]?)?|[3-9]\d?|0)\.(1\d{
//maybe multiple IPs in one Received: line
if(received_ips != null && received_ips.length !=0){
for( var r=0; r<received_ips.length; r++ ){
//only look at the first IP
if(regexIp.test(received_ips[r]) && mailHops.testIP(received_ips[r],rline)){
all_ips.unshift( received_ips[r] );
break;
//don't want duplicate IPs from the same Received header
if(r < received_ips.length && received_ips[r] == received_ips[r+1])
break;
}
}
}

Binary file not shown.