2b8348544564695c23691f73fc42aa29d11dc4d2
[freeside.git] / htdocs / docs / man / FS / svc_acct_sm.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::svc_acct_sm - Object methods for svc_acct_sm records</TITLE>
4 <LINK REV="made" HREF="mailto:ivan@rootwood.sisd.com">
5 </HEAD>
6
7 <BODY>
8
9 <!-- INDEX BEGIN -->
10
11 <UL>
12
13         <LI><A HREF="#NAME">NAME</A>
14         <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
15         <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
16         <LI><A HREF="#METHODS">METHODS</A>
17         <LI><A HREF="#VERSION">VERSION</A>
18         <LI><A HREF="#BUGS">BUGS</A>
19         <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
20 </UL>
21 <!-- INDEX END -->
22
23 <HR>
24 <P>
25 <H1><A NAME="NAME">NAME</A></H1>
26 <P>
27 FS::svc_acct_sm - Object methods for svc_acct_sm records
28
29 <P>
30 <HR>
31 <H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
32 <P>
33 <PRE>  use FS::svc_acct_sm;
34 </PRE>
35 <P>
36 <PRE>  $record = new FS::svc_acct_sm \%hash;
37   $record = new FS::svc_acct_sm { 'column' =&gt; 'value' };
38 </PRE>
39 <P>
40 <PRE>  $error = $record-&gt;insert;
41 </PRE>
42 <P>
43 <PRE>  $error = $new_record-&gt;replace($old_record);
44 </PRE>
45 <P>
46 <PRE>  $error = $record-&gt;delete;
47 </PRE>
48 <P>
49 <PRE>  $error = $record-&gt;check;
50 </PRE>
51 <P>
52 <PRE>  $error = $record-&gt;suspend;
53 </PRE>
54 <P>
55 <PRE>  $error = $record-&gt;unsuspend;
56 </PRE>
57 <P>
58 <PRE>  $error = $record-&gt;cancel;
59 </PRE>
60 <P>
61 <HR>
62 <H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
63 <P>
64 An FS::svc_acct object represents a virtual mail alias. FS::svc_acct
65 inherits from FS::Record. The following fields are currently supported:
66
67 <DL>
68 <DT><STRONG><A NAME="item_svcnum">svcnum - primary key (assigned automatcially for new accounts)</A></STRONG><DD>
69 <DT><STRONG><A NAME="item_domsvc">domsvc - svcnum of the virtual domain (see FS::svc_domain)</A></STRONG><DD>
70 <DT><STRONG><A NAME="item_domuid">domuid - uid of the target account (see FS::svc_acct)</A></STRONG><DD>
71 <DT><STRONG><A NAME="item_domuser">domuser - virtual username</A></STRONG><DD>
72 </DL>
73 <P>
74 <HR>
75 <H1><A NAME="METHODS">METHODS</A></H1>
76 <DL>
77 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><DD>
78 <P>
79 Creates a new virtual mail alias. To add the virtual mail alias to the
80 database, see <A HREF="#insert">insert</A>.
81
82 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><DD>
83 <P>
84 Adds this virtual mail alias to the database. If there is an error, returns
85 the error, otherwise returns false.
86
87 <P>
88 The additional fields pkgnum and svcpart (see <A HREF="../FS/cust_svc.html">FS::cust_svc</A>) should be defined. An FS::cust_svc record will be created and inserted.
89
90 <P>
91 If the configuration values (see <A HREF="../FS/Conf.html">FS::Conf</A>) shellmachine and qmailmachines exist, and domuser is `*' (meaning a
92 catch-all mailbox), the command:
93
94 <P>
95 <PRE>  [ -e $dir/.qmail-$qdomain-default ] || {
96     touch $dir/.qmail-$qdomain-default;
97     chown $uid:$gid $dir/.qmail-$qdomain-default;
98   }
99 </PRE>
100 <P>
101 is executed on shellmachine via ssh (see <EM>dot-qmail</EM>). This behaviour can be surpressed by setting $FS::svc_acct_sm::nossh_hack
102 true.
103
104 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><DD>
105 <P>
106 Deletes this virtual mail alias from the database. If there is an error,
107 returns the error, otherwise returns false.
108
109 <P>
110 The corresponding FS::cust_svc record will be deleted as well.
111
112 <DT><STRONG><A NAME="item_replace">replace OLD_RECORD</A></STRONG><DD>
113 <P>
114 Replaces OLD_RECORD with this one in the database. If there is an error,
115 returns the error, otherwise returns false.
116
117 <DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><DD>
118 <P>
119 Just returns false (no error) for now.
120
121 <P>
122 Called by the suspend method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
123
124 <DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><DD>
125 <P>
126 Just returns false (no error) for now.
127
128 <P>
129 Called by the unsuspend method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
130
131 <DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><DD>
132 <P>
133 Just returns false (no error) for now.
134
135 <P>
136 Called by the cancel method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
137
138 <DT><STRONG><A NAME="item_check">check</A></STRONG><DD>
139 <P>
140 Checks all fields to make sure this is a valid virtual mail alias. If there
141 is an error, returns the error, otherwise returns false. Called by the
142 insert and replace methods.
143
144 <P>
145 Sets any fixed values; see <A HREF="../FS/part_svc.html">FS::part_svc</A>.
146
147 </DL>
148 <P>
149 <HR>
150 <H1><A NAME="VERSION">VERSION</A></H1>
151 <P>
152 $Id: svc_acct_sm.html,v 1.1 1999-08-04 12:13:27 ivan Exp $
153
154 <P>
155 <HR>
156 <H1><A NAME="BUGS">BUGS</A></H1>
157 <P>
158 The remote commands should be configurable.
159
160 <P>
161 The <CODE>$recref</CODE> stuff in sub check should be cleaned up.
162
163 <P>
164 <HR>
165 <H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
166 <P>
167 <A HREF="../FS/Record.html">FS::Record</A>, <A HREF="../FS/Conf.html">FS::Conf</A>, <A HREF="../FS/cust_svc.html">FS::cust_svc</A>, <A HREF="../FS/part_svc.html">FS::part_svc</A>, <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>,
168 <A HREF="../FS/svc_acct.html">FS::svc_acct</A>, <A HREF="../FS/svc_domain.html">FS::svc_domain</A>, <A HREF="../FS/SSH.html">FS::SSH</A>, <EM>ssh</EM>, <EM>dot-qmail</EM>, schema.html from the base documentation.
169
170 </BODY>
171
172 </HTML>