regenerated perl api docs from embedded pod
[freeside.git] / htdocs / docs / man / svc_acct_sm.txt
1 NAME
2     FS::svc_acct_sm - Object methods for svc_acct_sm records
3
4 SYNOPSIS
5       use FS::svc_acct_sm;
6
7       $record = new FS::svc_acct_sm \%hash;
8       $record = new FS::svc_acct_sm { 'column' => 'value' };
9
10       $error = $record->insert;
11
12       $error = $new_record->replace($old_record);
13
14       $error = $record->delete;
15
16       $error = $record->check;
17
18       $error = $record->suspend;
19
20       $error = $record->unsuspend;
21
22       $error = $record->cancel;
23
24 DESCRIPTION
25     An FS::svc_acct object represents a virtual mail alias.
26     FS::svc_acct inherits from FS::Record. The following fields are
27     currently supported:
28
29     svcnum - primary key (assigned automatcially for new accounts)
30     domsvc - svcnum of the virtual domain (see the FS::svc_domain manpage)
31     domuid - uid of the target account (see the FS::svc_acct manpage)
32     domuser - virtual username
33 METHODS
34     new HASHREF
35         Creates a new virtual mail alias. To add the virtual mail
36         alias to the database, see the section on "insert".
37
38     insert
39         Adds this virtual mail alias to the database. If there is an
40         error, returns the error, otherwise returns false.
41
42         The additional fields pkgnum and svcpart (see the
43         FS::cust_svc manpage) should be defined. An FS::cust_svc
44         record will be created and inserted.
45
46         If the configuration values (see the FS::Conf manpage)
47         shellmachine and qmailmachines exist, and domuser is `*'
48         (meaning a catch-all mailbox), the command:
49
50           [ -e $dir/.qmail-$qdomain-default ] || {
51             touch $dir/.qmail-$qdomain-default;
52             chown $uid:$gid $dir/.qmail-$qdomain-default;
53           }
54
55         is executed on shellmachine via ssh (see the section on
56         "EXTENSION ADDRESSES" in the dot-qmail manpage). This
57         behaviour can be surpressed by setting
58         $FS::svc_acct_sm::nossh_hack true.
59
60     delete
61         Deletes this virtual mail alias from the database. If there
62         is an error, returns the error, otherwise returns false.
63
64         The corresponding FS::cust_svc record will be deleted as
65         well.
66
67     replace OLD_RECORD
68         Replaces OLD_RECORD with this one in the database. If there
69         is an error, returns the error, otherwise returns false.
70
71     suspend
72         Just returns false (no error) for now.
73
74         Called by the suspend method of FS::cust_pkg (see the
75         FS::cust_pkg manpage).
76
77     unsuspend
78         Just returns false (no error) for now.
79
80         Called by the unsuspend method of FS::cust_pkg (see the
81         FS::cust_pkg manpage).
82
83     cancel
84         Just returns false (no error) for now.
85
86         Called by the cancel method of FS::cust_pkg (see the
87         FS::cust_pkg manpage).
88
89     check
90         Checks all fields to make sure this is a valid virtual mail
91         alias. If there is an error, returns the error, otherwise
92         returns false. Called by the insert and replace methods.
93
94         Sets any fixed values; see the FS::part_svc manpage.
95
96 VERSION
97     $Id: svc_acct_sm.txt,v 1.2 1999-02-09 09:38:13 ivan Exp $
98
99 BUGS
100     The remote commands should be configurable.
101
102     The $recref stuff in sub check should be cleaned up.
103
104 SEE ALSO
105     the FS::Record manpage, the FS::Conf manpage, the FS::cust_svc
106     manpage, the FS::part_svc manpage, the FS::cust_pkg manpage, the
107     FS::svc_acct manpage, the FS::svc_domain manpage, the FS::SSH
108     manpage, the ssh manpage, the dot-qmail manpage, schema.html
109     from the base documentation.
110
111 HISTORY
112     ivan@voicenet.com 97-jul-16 - 21
113
114     rewrite ivan@sisd.com 98-mar-10
115
116     s/qsearchs/qsearch/ to eliminate warning ivan@sisd.com 98-apr-19
117
118     uses conf/shellmachine and has an nossh_hack ivan@sisd.com 98-
119     jul-14
120
121     s/\./:/g in .qmail-domain:com ivan@sisd.com 98-aug-13
122
123     pod, FS::Conf, moved .qmail file from check to insert 98-sep-23
124