opnsense-ports/mail/p5-Net-SMTP-Server/files/patch-Server__Relay.pm
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

11 lines
399 B
Perl

--- ./Server/Relay.pm.orig 2014-08-29 12:29:32.000000000 -0400
+++ ./Server/Relay.pm 2014-08-29 12:30:08.000000000 -0400
@@ -24,7 +24,7 @@
# Loop through the recipient list.
foreach $target (@{$self->{TO}}) {
my $rr;
- my $domain = /@(.*)/;
+ my $domain = ($target =~ /@(.*)/) ? $1 : hostdomain;
my $res = new Net::DNS::Resolver;
my @mx = mx($res, defined($1) ? $1 : hostdomain);