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