[freeside-devel] [patch] freeside/FS/FS/svc_forward.pm update

ivan ivan at 420.am
Mon Sep 19 14:23:15 PDT 2005


On Mon, Sep 19, 2005 at 02:07:33AM -0600, Scott Edwards wrote:
> Previous to this update, it was illegal to set multiple destination
> email addresses,

I don't think we want to allow multiple destination email addresses in 
the svc_forward.dst field.  Multiple svc_forward records or an 
associated one-to-many table seem like a better way to handle this.  I 
think some of the existing exports (postfix, others?) already support 
multiple destinations.

> or permit destination email addresses to be
> back-slashed (ignore further processing, man forward).

I don't know what you mean by "man forward" but this sounds specific to 
a particular MTA.  I think we might want to have the service support 
forwarding to just email addresses for now.

-- 
_ivan


> This patch
> opens up the regular expression used in validating the input.
> 
> There appears to be a quoting issue with the backslashes somewhere,
> but it may well be my own provisioning script.
> 
> Thanks,
> 
> 
> Scott Edwards
> --
> Daxal Communications - http://www.daxal.com/

> Index: svc_forward.pm
> ===================================================================
> RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_forward.pm,v
> retrieving revision 1.18
> diff -u -r1.18 svc_forward.pm
> --- svc_forward.pm	6 Apr 2005 22:52:12 -0000	1.18
> +++ svc_forward.pm	19 Sep 2005 07:42:06 -0000
> @@ -257,9 +257,11 @@
>    }
>  
>    if ( $self->dst ) {
> -    $self->dst =~ /^([\w\.\-\&]*)(\@([\w\-]+\.)+\w+)$/
> +    my $dst=$self->dst;
> +    $dst =~ s/\s//gs;
> +    $dst =~ /^(\\?([\w\.\-\&]*)(\@([\w\-]+\.)+\w+)(,(\\?[\w\.\-\&]*)(\@([\w\-]+\.)+\w+))*)$/
>         or return "Illegal dst: ". $self->dst;
> -    $self->dst("$1$2");
> +    $self->dst($dst);
>    } else {
>      $self->dst('');
>    }
> 

> _______________________________________________
> freeside-devel mailing list
> freeside-devel at sisd.com
> http://420.am/cgi-bin/mailman/listinfo/freeside-devel




More information about the freeside-devel mailing list