From 0461d89edb3f8e272697726208ab7747c30a81df Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 31 May 2012 18:30:22 +0200 Subject: Catch-All aliases. --- fripost-newdomain | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'fripost-newdomain') diff --git a/fripost-newdomain b/fripost-newdomain index 5c4c2fb..2f204ee 100755 --- a/fripost-newdomain +++ b/fripost-newdomain @@ -150,7 +150,7 @@ $domain{domain} //= prompt "Domain name: "; $domain{isActive} = 'TRUE'; # Ensure that the domain is valid. -Email::Valid->address('test@'.$domain{domain}) +Email::Valid->address('fake@'.$domain{domain}) or die "Error: Invalid domain `$domain{domain}'.\n"; if (defined $conf->{owner}) { @@ -220,7 +220,7 @@ else { # Create aliases. sub create_alias { - my ($ldap, $from, $to, $owner) = @_; + my ($ldap, $from, $to) = @_; my %alias = (address => $from, goto => $to); @@ -233,15 +233,13 @@ sub create_alias { return unless grep { $_->{goto} eq $alias{goto} } $res->entries; } - $alias{owner} = $owner if defined $owner; $alias{isActive} = 'TRUE'; $ldap->alias->add( \%alias ); say "Created alias from $from to $to."; } -create_alias($ldap, 'abuse@' . $domain{domain} ,'abuse@fripost.org', $domain{owner}); -create_alias($ldap, 'postmaster@' . $domain{domain},'postmaster@fripost.org', $domain{owner}); - +create_alias($ldap, 'abuse@' . $domain{domain} ,'abuse@fripost.org'); +create_alias($ldap, 'postmaster@' . $domain{domain},'postmaster@fripost.org'); $ldap->unbind(); -- cgit v1.2.3