summaryrefslogtreecommitdiff
path: root/FS/FS/svc_forward.pm
diff options
context:
space:
mode:
authorivan <ivan>2006-04-14 11:55:58 +0000
committerivan <ivan>2006-04-14 11:55:58 +0000
commit2a2173b5c05b1273f3990ee5b914a2d9efac0c3f (patch)
treecaddaa7361f2784d2f59be15fc1be273d1d54f40 /FS/FS/svc_forward.pm
parentb5b3d4ad4663657fcc980ed8c421b3558d4b7482 (diff)
add the svc_forward-arbitrary_dst flag to enable arbitrary svc_forward destinations
Diffstat (limited to 'FS/FS/svc_forward.pm')
-rw-r--r--FS/FS/svc_forward.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/FS/FS/svc_forward.pm b/FS/FS/svc_forward.pm
index 12b556f33..ab24d3277 100644
--- a/FS/FS/svc_forward.pm
+++ b/FS/FS/svc_forward.pm
@@ -257,9 +257,15 @@ sub check {
}
if ( $self->dst ) {
- $self->dst =~ /^([\w\.\-\&]*)(\@([\w\-]+\.)+\w+)$/
- or return "Illegal dst: ". $self->dst;
- $self->dst("$1$2");
+ my $conf = new FS::Conf;
+ if ( $conf->exists('svc_forward-arbitrary_dst') ) {
+ my $error = $self->ut_textn('dst');
+ return $error if $error;
+ } else {
+ $self->dst =~ /^([\w\.\-\&]*)(\@([\w\-]+\.)+\w+)$/
+ or return "Illegal dst: ". $self->dst;
+ $self->dst("$1$2");
+ }
} else {
$self->dst('');
}