aboutsummaryrefslogtreecommitdiffstats
path: root/fripost-adduser
diff options
context:
space:
mode:
authorStefan Kangas <skangas@skangas.se>2011-02-10 19:18:16 +0100
committerStefan Kangas <skangas@skangas.se>2011-02-10 19:18:16 +0100
commit5c8a9b353e6d925ccab12533b358b69421c7875c (patch)
tree9d7780feee5821dcd75d5135bb3e4f92c04e5791 /fripost-adduser
parentd18b13bc64d66df89b2a37aacc8fca22a38dbb23 (diff)
Do not add the maildir since postfix does this for us
Diffstat (limited to 'fripost-adduser')
-rwxr-xr-xfripost-adduser27
1 files changed, 4 insertions, 23 deletions
diff --git a/fripost-adduser b/fripost-adduser
index 7971138..4b93a6f 100755
--- a/fripost-adduser
+++ b/fripost-adduser
@@ -6,21 +6,16 @@ use strict;
=head1 NAME
-fripost-adduser.pl - Add a new mailbox to the system
+fripost-adduser - Add a new mailbox to the system
=head1 DESCRIPTION
-This script eases the burden of adding a new user to the system.
-
-Necessary steps to add a user to the system:
-1. Create the Maildir (ensuring proper permissions)
-2. Add him to the MySQL database
-3. Send welcome message
-4. Ensure welcome message has arrived
+This script eases the burden of adding a new user to the system. It simply adds
+a new user to the database.
=cut
-our $VERSION = '0.01';
+our $VERSION = '0.02';
use FindBin qw($Bin);
use lib "$Bin/lib";
@@ -102,20 +97,6 @@ if ($conf->{pretend}) {
exit 0;
}
-## Create maildir
-my ($login,$pass,$uid,$gid) = getpwnam($conf->{maildir_user})
- or die "maildir_user not found: $conf->{maildir_user}";
-
-my $maildir_loc = $conf->{maildir_base} . '/' . $user->{maildir};
-
-$maildir_loc =~ m!(.+)/Maildir/$!;
-system(qw/sudo mkdir -p -m/, $conf->{maildir_umask}, $1);
-system(qw/sudo maildirmake/, $maildir_loc);
-system(qw/sudo chmod/, $conf->{maildir_umask}, $maildir_loc);
-system(qw/sudo chown -R/, "$conf->{maildir_user}:$conf->{maildir_group}", $conf->{maildir_base});
-
-say "Created maildir in $maildir_loc";
-
## TODO: Make sure the user does not already exist
## Insert user into database