1Alias(3)              User Contributed Perl Documentation             Alias(3)
2
3
4

NAME

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

SYNOPSIS

10           use Mail::Alias;
11

DESCRIPTION

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

CONSTRUCTOR

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

METHODS

26       read () Reads an alias file of the specified format into memory.
27       Comments or blank lines are lost upon reading. Due to storage in a
28       hash, ordering of the alias lines is also lost.
29       write () The current set of aliases contained in the object memory are
30       written to a file using the current format. If a filehandle is passed,
31       data is written to the already opened file. If a filename is passed, it
32       is opened and the memory is written to the file. Note: if passing a
33       filename, include the mode (i.e. to write to a file named aliases pass
34       >aliases). Before writing, the alias lines are sorted alphabetically.
35       format () Set the current alias file format.
36       exists () Indicates the presence of the passed alias within the object
37       (if using memory access), or the current aliases file (if using direct
38       file access). For direct file access, the return value is the address
39       string for the alias.
40       expand () Expands the passed alias into a list of addresses. Expansion
41       properly handles :include: files, recursion, and continuation
42       lines.Only works when memory access is being used. If the alias is not
43       found in the object, you get back what you sent.
44       alias_file () Sets or gets the name of the current alias filename for
45       direct access.
46       append () *-Sendmail only-* Adds an alias to an existing Sendmail alias
47       file. The alias and addresses can be passed as two separate arguments
48       (alias, addresses) or as a single line of text (alias: addresses)
49       delete () *-Sendmail only-* Deletes the entry for an alias from the
50       current alias file.
51       update () *-Sendmail only-* Replaces the address string entry for an
52       alias in the current alias file.
53       usemem () Sets the working mode to use memory (indirect access). Use
54       read(), write() and format() methods.
55       usefile () Sets the working mode to use files (direct access). Use
56       append() and delete() methods.
57

AUTHOR

59       Tom Zeltwanger <perl@ename.com> (CPAN author ID: ZELT)
60
62       Copyright (c) 2000 Tom Zeltwanger. All rights reserved. This program is
63       free software; you can redistribute it and/or modify it under the same
64       terms as Perl itself.
65
66       Versions up to 1.06, Copyright (c) 1995-1997 Graham Barr. All rights
67       reserved.  This program is free software; you can distribute it and/or
68       modify it under the same terms as Perl itself.
69
70
71
72perl v5.30.0                      2019-07-26                          Alias(3)
Impressum