diff options
Diffstat (limited to 'fripost-newdomain')
-rwxr-xr-x | fripost-newdomain | 10 |
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(); |