diff options
author | Stefan Kangas <skangas@skangas.se> | 2011-02-10 19:18:16 +0100 |
---|---|---|
committer | Stefan Kangas <skangas@skangas.se> | 2011-02-10 19:18:16 +0100 |
commit | 5c8a9b353e6d925ccab12533b358b69421c7875c (patch) | |
tree | 9d7780feee5821dcd75d5135bb3e4f92c04e5791 | |
parent | d18b13bc64d66df89b2a37aacc8fca22a38dbb23 (diff) |
Do not add the maildir since postfix does this for us
-rw-r--r-- | default.yml | 4 | ||||
-rwxr-xr-x | fripost-adduser | 27 | ||||
-rwxr-xr-x | fripost-mkpass | 2 |
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 |