aboutsummaryrefslogtreecommitdiffstats
path: root/fripost-newdomain
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@fripost.org>2012-05-31 18:30:22 +0200
committerGuilhem Moulin <guilhem.moulin@fripost.org>2012-05-31 18:30:22 +0200
commit0461d89edb3f8e272697726208ab7747c30a81df (patch)
treeaf9b674793f2e10f8889a4d5a10949f301626989 /fripost-newdomain
parentea06aa8c41d103ff161630fd85d083b9ed6f0b41 (diff)
Catch-All aliases.
Diffstat (limited to 'fripost-newdomain')
-rwxr-xr-xfripost-newdomain10
1 files changed, 4 insertions, 6 deletions
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();