Skip Menu |

This queue is for tickets about the SMTP-Server CPAN distribution.

Report information
The Basics
Id: 37731
Status: open
Priority: 0/
Queue: SMTP-Server

People
Owner: Nobody in particular
Requestors: XSAWYERX [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: Can't validate MX so doesn't relay anywhere
Line no. 28 in Net::SMTP::Server::Relay is the following: my $domain = /@(.*)/; This doesn't evaluate correctly, and thus no relay is actually performed in the subroutine "_relay". My suggestion is to change it with these lines, just for example: if ($target =~ /@(.*)/) { $domain = $1; } else { next; } However, I assume there's a regular expression for hostname parsing. What if there is no use written there? This needs to be tested more.
From: bharath rao
On Wed Jul 16 10:40:43 2008, xsawyerx wrote: Show quoted text
> Line no. 28 in Net::SMTP::Server::Relay is the following: > my $domain = /@(.*)/; > > This doesn't evaluate correctly, and thus no relay is actually performed > in the subroutine "_relay". > > My suggestion is to change it with these lines, just for example: > if ($target =~ /@(.*)/) { $domain = $1; } > else { next; } > > However, I assume there's a regular expression for hostname parsing. > What if there is no use written there? This needs to be tested more.
This is how I fixed it: # my $domain = /@(.*)/; my $domain = ($target =~ /@(.*)/) ? $1 : hostdomain;