aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--default.yml4
-rwxr-xr-xfripost-adduser27
-rwxr-xr-xfripost-mkpass2
3 files changed, 5 insertions, 28 deletions
diff --git a/default.yml b/default.yml
index 3f36fdf..f7eaad3 100644
--- a/default.yml
+++ b/default.yml
@@ -1,7 +1,3 @@
# default.yml -- defaults for fripost administrative scripts
---
dbi_dsn: dbi:mysql:mail;host=127.0.0.1;port=3306
-maildir_base: /home/mail/virtual/
-maildir_user: postfix
-maildir_group: postfix
-maildir_umask: 0700
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
diff --git a/fripost-mkpass b/fripost-mkpass
index 83a58ac..2047b8a 100755
--- a/fripost-mkpass
+++ b/fripost-mkpass
@@ -6,7 +6,7 @@ use strict;
=head1 NAME
-fripost-mkpass.pl - Create a random new password
+fripost-mkpass - Create a random new password
=cut