GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MAIL::ALIAS (3)

.ds Aq ’

NAME

Mail::Alias - Maniulates mail alias files of various formats. Works on files directly or loads files into memory and works on the buffer.

CONTENTS

SYNOPSIS



    use Mail::Alias;



DESCRIPTION

Mail::Alias can read various formats of mail alias. Once an object has been created it can be used to expand aliases and output in another format.

CONSTRUCTOR

<B>new ()B> Alias objects can be created in two ways; With a format specified- Mail::Alias::Sendmail->new([filename]) Without a format specified- Mail::Alias->new([filename]}. Format defaults to SENDMAIL In either case, the filename is optional and, if supplied, it will be read in when the object is created. Available formats are Sendmail, Ucbmail, and Binmail.

METHODS

<B>read ()B> Reads an alias file of the specified format into memory. Comments or blank lines are lost upon reading. Due to storage in a hash, ordering of the alias lines is also lost.
<B>write ()B> The current set of aliases contained in the object memory are written to a file using the current format. If a filehandle is passed, data is written to the already opened file. If a filename is passed, it is opened and the memory is written to the file. Note: if passing a filename, include the mode (i.e. to write to a file named aliases pass >aliases). Before writing, the alias lines are sorted alphabetically.
<B>format ()B> Set the current alias file format.
<B>exists ()B> Indicates the presence of the passed alias within the object (if using memory access), or the current aliases file (if using direct file access). For direct file access, the return value is the address string for the alias.
<B>expand ()B> Expands the passed alias into a list of addresses. Expansion properly handles :include: files, recursion, and continuation lines.Only works when memory access is being used. If the alias is not found in the object, you get back what you sent.
<B>alias_file ()B> Sets or gets the name of the current alias filename for direct access.
<B>append () *-Sendmail only-*B> Adds an alias to an existing Sendmail alias file. The alias and addresses can be passed as two separate arguments (alias, addresses) or as a single line of text (alias: addresses)
<B>delete () *-Sendmail only-*B> Deletes the entry for an alias from the current alias file.
<B>update () *-Sendmail only-*B> Replaces the address string entry for an alias in the current alias file.
<B>usemem ()B> Sets the working mode to use memory (indirect access). Use read(), write() and format() methods.
<B>usefile ()B> Sets the working mode to use files (direct access). Use append() and delete() methods.

AUTHOR

Tom Zeltwanger <perl@ename.com> (CPAN author ID: ZELT)

COPYRIGHT

Copyright (c) 2000 Tom Zeltwanger. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Versions up to 1.06, Copyright (c) 1995-1997 Graham Barr. All rights reserved. This program is free software; you can distribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 ALIAS (3) 2000-10-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.