Change DNS logging, especially around missing details
This commit is contained in:
parent
a82927c1f6
commit
d8c68bcaa2
@ -232,14 +232,15 @@ final class DNS extends BaseProtocol
|
|||||||
// Check we have the right record
|
// Check we have the right record
|
||||||
if ((! $ao) || (($rootdn !== self::TLD) && ((! $ao->zone->domain->dnsdomain) || ($ao->zone->domain->dnsdomain !== $rootdn)))) {
|
if ((! $ao) || (($rootdn !== self::TLD) && ((! $ao->zone->domain->dnsdomain) || ($ao->zone->domain->dnsdomain !== $rootdn)))) {
|
||||||
Log::alert(sprintf('%s:= No DNS record for [%d:%d/%d.%d@%s]',self::LOGKEY,$z,$n,$f,$p,$d));
|
Log::alert(sprintf('%s:= No DNS record for [%d:%d/%d.%d@%s]',self::LOGKEY,$z,$n,$f,$p,$d));
|
||||||
|
|
||||||
return $this->nameerr();
|
return $this->nameerr();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($this->query->type) {
|
switch ($this->query->type) {
|
||||||
case self::DNS_TYPE_SRV:
|
case self::DNS_TYPE_SRV:
|
||||||
|
if (($ao->system->address) && ($xx=$ao->system->mailers->where('id',$mailer->id)->pop())) {
|
||||||
Log::info(sprintf('%s:= Returning [%s] for DNS query [%s]',self::LOGKEY,$ao->system->address,$ao->ftn));
|
Log::info(sprintf('%s:= Returning [%s] for DNS query [%s]',self::LOGKEY,$ao->system->address,$ao->ftn));
|
||||||
|
|
||||||
if (($ao->system->address) && ($xx=$ao->system->mailers->where('id',$mailer->id)->pop())) {
|
|
||||||
return $this->reply(
|
return $this->reply(
|
||||||
self::DNS_NOERROR,
|
self::DNS_NOERROR,
|
||||||
[serialize([
|
[serialize([
|
||||||
@ -250,6 +251,8 @@ final class DNS extends BaseProtocol
|
|||||||
]) => self::DNS_TYPE_SRV]);
|
]) => self::DNS_TYPE_SRV]);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Log::alert(sprintf('%s:! No/incomplete hostname/port details for [%d] for DNS query [%s]',self::LOGKEY,$ao->system->id,$ao->ftn));
|
||||||
|
|
||||||
return $this->nodata();
|
return $this->nodata();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,7 +264,7 @@ final class DNS extends BaseProtocol
|
|||||||
[serialize($ao->system->name) => self::DNS_TYPE_TXT]);
|
[serialize($ao->system->name) => self::DNS_TYPE_TXT]);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Log::info(sprintf('%s:= Returning [%s] for DNS query [%s]',self::LOGKEY,$ao->system->address,$ao->ftn));
|
Log::info(sprintf('%s:= Returning [%s] for DNS query [%s]',self::LOGKEY,$ao->system->address ?: 'NO ADDRESS',$ao->ftn));
|
||||||
|
|
||||||
return (! $ao->system->address)
|
return (! $ao->system->address)
|
||||||
? $this->nodata()
|
? $this->nodata()
|
||||||
|
Loading…
Reference in New Issue
Block a user