ispman/lib/ISPMan MailGroupMan.pm, 1.9, 1.9.2.1 MessagingMan.pm, 1.4, 1.4.6.1 ResellerMan.pm, 1.9, 1.9.4.1

Pedro Algarvio <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14538/lib/ISPMan

Modified Files:
      Tag: dev_1_3-cyrus_virtdomain
	MailGroupMan.pm MessagingMan.pm ResellerMan.pm 
Log Message:
Branch is now "aparently" updated to HEAD, though debuging is needed.


Index: MessagingMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/MessagingMan.pm,v
retrieving revision 1.4
retrieving revision 1.4.6.1
diff -u -d -r1.4 -r1.4.6.1
--- MessagingMan.pm	30 May 2004 23:35:37 -0000	1.4
+++ MessagingMan.pm	11 Sep 2006 23:31:27 -0000	1.4.6.1
@@ -2,8 +2,10 @@
 
 use strict;
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+use Email::Valid;
 
 # Atif: 2003-08-08
+# derjohn: 2006-07-05: changes and fixes
 # Do not load Mail::Internet here
 # use it in the send_email_to_domain.lib where it is actually used
 # use Mail::Internet;
@@ -31,14 +33,24 @@
     my $ok  = 1;
     my $err = '';
 
+    my $verifier = new Email::Valid;
+
     if ( $r->param('fromEmail') ) {
-        if ( $r->param('fromEmail') !~ /^(\w|\.)+\@\w+\.(\w|\.)+\w$/ ) {
+        if (
+            !$verifier->address(
+                -address => $r->param('fromEmail'),
+                -fqdn    => 1
+            )
+          )
+        {
             $err .= 'Invalid e-mail address. ';
             $ok = 0;
         }
 
-        if (   $r->param('cc')
-            && $r->param('cc') !~ /^(\w|\.)+\@\w+\.(\w|\.)+\w$/ )
+        if ( $r->param('cc')
+            && !(
+                $verifier->address( -address => $r->param('cc'), -fqdn => 1 ) )
+          )
         {
             $err .= 'Invalid CC: e-mail address. ';
             $ok = 0;

Index: ResellerMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/ResellerMan.pm,v
retrieving revision 1.9
retrieving revision 1.9.4.1
diff -u -d -r1.9 -r1.9.4.1
--- ResellerMan.pm	1 Jul 2004 18:58:11 -0000	1.9
+++ ResellerMan.pm	11 Sep 2006 23:31:27 -0000	1.9.4.1
@@ -47,6 +47,7 @@
       ispmanResellerMaxClients
       telephoneNumber
       facsimileTelephoneNumber
+      cn
     );
 }
 

Index: MailGroupMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/MailGroupMan.pm,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -d -r1.9 -r1.9.2.1
--- MailGroupMan.pm	13 May 2006 11:37:46 -0000	1.9
+++ MailGroupMan.pm	11 Sep 2006 23:31:27 -0000	1.9.2.1
@@ -151,10 +151,11 @@
 sub updateMailGroup {
     my $self = shift;
     my $r    = shift;
-    my $dn   = $r->param("dn");
+
+    my $dn = $self->getMailGroupDN( $r->param("ispmanDomain"), $r->param("mailGroup") );
 
     my $data = {};
-    $data->{'cn'}                    = $r->param("cn");
+    $data->{'cn'}                    = $r->param("mailGroup");
     $data->{'mailForwardingAddress'} =
       [ split( /\s+/, $r->param("mailForwardingAddress") ) ];
     $data->{'mailAlias'} = [ split( /\s+/, $r->param("mailAlias") ) ];


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.