* Use Zone:Net/* for lookup before defualt local address when setting 'from' for NetMail

This commit is contained in:
Bryan Ashby 2018-01-06 13:24:35 -07:00
parent ab12fb5d79
commit 99244aa2e4
2 changed files with 10 additions and 5 deletions

View File

@ -112,7 +112,7 @@ function areaFix() {
// :TODO: Persist message in private outgoing (sysop out box) (TBD: implementation)
message.persist(err => {
if(!err) {
console.log('AreaFix message persisted and will be exported as per configuration');
console.log('AreaFix message persisted and will be exported at next scheduled scan');
}
return callback(err);
});

View File

@ -822,8 +822,9 @@ function FTNMessageScanTossModule() {
// - Where we send may not be where dstAddress is (it's routed!); use network found in route
// for local address
// 2) Direct to nodes: scannerTossers.ftn_bso.nodes{} -> config
// - Where we send is direct to dstAddr; use scannerTossers.ftn_bso.defaultNetwork to
// for local address
// - Where we send is direct to dstAddr;
// - Attempt to match address in messageNetworks.ftn.networks{}, else
// use scannerTossers.ftn_bso.defaultNetwork to for local address
// 3) Nodelist DB lookup (use default config)
// - Where we send is direct to dstAddr
//
@ -836,8 +837,12 @@ function FTNMessageScanTossModule() {
routeAddress = Address.fromString(route.address);
networkName = route.network || Config.scannerTossers.ftn_bso.defaultNetwork;
} else {
routeAddress = dstAddr;
networkName = Config.scannerTossers.ftn_bso.defaultNetwork;
routeAddress = dstAddr;
networkName = this.getNetworkNameByAddressPattern(`${dstAddr.zone}:${dstAddr.net}/*`);
if(!networkName) {
networkName = Config.scannerTossers.ftn_bso.defaultNetwork;
}
}
const config = _.find(this.moduleConfig.nodes, (node, nodeAddrWildcard) => {