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
|
||||
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));
|
||||
|
||||
return $this->nameerr();
|
||||
}
|
||||
|
||||
switch ($this->query->type) {
|
||||
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));
|
||||
|
||||
if (($ao->system->address) && ($xx=$ao->system->mailers->where('id',$mailer->id)->pop())) {
|
||||
return $this->reply(
|
||||
self::DNS_NOERROR,
|
||||
[serialize([
|
||||
@ -250,6 +251,8 @@ final class DNS extends BaseProtocol
|
||||
]) => self::DNS_TYPE_SRV]);
|
||||
|
||||
} 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();
|
||||
}
|
||||
|
||||
@ -261,7 +264,7 @@ final class DNS extends BaseProtocol
|
||||
[serialize($ao->system->name) => self::DNS_TYPE_TXT]);
|
||||
|
||||
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)
|
||||
? $this->nodata()
|
||||
|
Loading…
Reference in New Issue
Block a user