create_dovecot_shares - Create Dovecot shares and put symlinks into user Maildirs
This document describes create_dovecot_shares version 1.01
[root@suretec home]$ create_dovecot_shares [OPTIONS]
INPUT OPTIONS:
--username Username/Usernames you want to share the Maildir of, comma seperated
--group Group for Maildir share ownership
--dry-run Doesn't make any changes, just shows what would happen
--share-with List of users to share with (creates symlinks in their Maildir), comma seperated
--maildir List or Maildirs to share, or all found in home directory if not specified
--override Overrides all existing shares (dovecot-shared file and perms) if found
--skip Skips existing share with same name if found, comma seperated
--prefix Prefix for shares. Default is username.INBOX etc.
--restore Restore to before changes. Takes a run number, e.g. 5 runs back
OUTPUT OPTIONS:
--History Prints Summary of last Create Share runs (we keep 10.)
--clean Removes the dovecot_shares.hist file from F</var/cache>
--Version Print program version
--verbose Print in fine detail what is happening
--help List this help
--man List the full create_dovecot_shares manpage
EXAMPLES:
[root@suretec home]$ create_dovecot_shares --username=ghenry --group=support --skip=/home/ghenry/Maildir,/home/ghenry/Maildir/.Sent --share-with=john,admin --dry-run
[root@suretec home]$ create_dovecot_shares --username=ghenry,john,jack --group=accounts --share-with=philip --override
[root@suretec home]$ create_dovecot_shares --username=ghenry --share-with=john --group=accounts --prefix=OFFICE
[root@suretec home]$ create_dovecot_shares --username=ghenry --group=accounts --maildir=/home/john/Maildir/.Sent
[root@suretec home]$ create_dovecot_shares --restore 5
[root@suretec home]$ create_dovecot_shares --History
Creating lots of dovecot-shared files, changing permissions and creating symlinks is a pain, especially when dealing with more than a handle of users.
create_dovecot_shares helps.
It modifies users home directories and Maildirs (permissions) for sharing via Dovecot, and creates symlinks into the Maildir you want the shares accessed from.
There's even a restore option, to roll back any changes you made with a history of 10 runs.
See "SYNOPSIS" for examples.
Must be root.
Creating lots of dovecot-shared files for the Dovecot IMAP Server, changing permissions and creating symlinks is a pain, especially when dealing with more than a handle of users.
create_dovecot_shares helps
This script requires no configuration files or environment variables.
It does set:
$ENV{'PATH'}= '/usr/local/bin:/usr/bin:/bin';
$ENV{'SHELL'}= '/bin/bash';
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
linux
None reported.
No bugs have been reported.
Please report any bugs or feature requests to support@suretecsystems.com or call the number on http://www.suretecsystems.com/contact.
Gavin Henry, <ghenry@suretecsystems.com>
Copyright (c) 2006, Suretec Systems Ltd. http://www.suretecsystems.com
Copyright (c) 2006, Gavin Henry, <ghenry@suretecsystems.com>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the terms of the GPL V2. See perldoc perlgpl.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
Hey! The above document had some coding errors, which are explained below:
'=begin' only takes one parameter, not several as in '=begin pod_to_ignore # }}}'