| CatalystX-Usul documentation | view source | Contained in the CatalystX-Usul distribution. |
CatalystX::Usul::MailAliases - Manipulate the mail aliases file
0.3.$Revision: 584 $
use CatalystX::Usul::MailAliases; $alias_obj = CatalystX::Usul::MailAliases->new( $app, $config );
Management model file the system mail alias file
Sets these attributes:
The real mail alias file. Defaults to /etc/mail/aliases
Boolean indicating whether source code control tracking is being used. Defaults to false
Path to the copy of the aliases file that this module works on. Defaults to aliases in the ctrldir
Path to the appname_misc program which is optionally used to commit changes to the local copy of the aliases file to a source code control repository
Path to the newaliases program that is used to update the MTA
when changes are made
Path to the suid root wrapper program that is called to enable update
access to the real mail alias file
$alias_obj->create( $fields );
Create a new mail alias. Passes the fields to the suid root
wrapper on the command line. The wrapper calls the update_file method
to get the job done. Adds the text from the wrapper call to the results
section on the stash
$alias_obj->delete( $name );
Deletes the named mail alias. Calls update_file via the suid
wrapper. Adds the text from the wrapper call to the results section on
the stash
$response_obj = $alias_obj->retrieve( $name );
Returns an object containing a list of alias names and the fields pertaining to the requested alias if it exists
$alias_obj->update( $fields );
Update an existing mail alias. Calls update_file via the suid wrapper
$alias_obj->update_file( $alias, $recipients, $owner, $comment );
Called from the suid root wrapper this method updates the local copy
of the alias file as required and then copies the changed file to the
real system alias file. It will also run the newaliases program and
commit the changes to a source code control system if one is being used
Initialises these attributes in the object returned by retrieve
List of alias names
Creation comment associated with the selected alias
Date the selected alias was created
Boolean indicating whether the selected alias was found in the alias file
Who created the selected alias
List of recipients for the selected owner
Reads the local copy of the mail alias file with locking
None
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
Copyright (c) 2008 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
| CatalystX-Usul documentation | view source | Contained in the CatalystX-Usul distribution. |