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:
parent
2a2c55ddd1
commit
af4fb56fa1
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# MailHops  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
|
||||||
|
```
|
@ -25,7 +25,7 @@ var mailHops =
|
|||||||
|
|
||||||
isLoaded: false,
|
isLoaded: false,
|
||||||
options: {'map':'goog','unit':'mi','api_url':'http://api.mailhops.com','debug':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:[]},
|
message: {secure:[]},
|
||||||
client_location: null
|
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
|
//maybe multiple IPs in one Received: line
|
||||||
if(received_ips != null && received_ips.length !=0){
|
if(received_ips != null && received_ips.length !=0){
|
||||||
for( var r=0; r<received_ips.length; r++ ){
|
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)){
|
if(regexIp.test(received_ips[r]) && mailHops.testIP(received_ips[r],rline)){
|
||||||
all_ips.unshift( received_ips[r] );
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
mailhops.xpi
BIN
mailhops.xpi
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user