3 <TITLE>FS::svc_acct_sm - Object methods for svc_acct_sm records</TITLE>
4 <LINK REV="made" HREF="mailto:none">
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>
25 <H1><A NAME="NAME">NAME</A></H1>
27 FS::svc_acct_sm - Object methods for svc_acct_sm records
31 <H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
33 <PRE> use FS::svc_acct_sm;
36 <PRE> $record = new FS::svc_acct_sm \%hash;
37 $record = new FS::svc_acct_sm { 'column' => 'value' };
40 <PRE> $error = $record->insert;
43 <PRE> $error = $new_record->replace($old_record);
46 <PRE> $error = $record->delete;
49 <PRE> $error = $record->check;
52 <PRE> $error = $record->suspend;
55 <PRE> $error = $record->unsuspend;
58 <PRE> $error = $record->cancel;
62 <H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
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:
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>
75 <H1><A NAME="METHODS">METHODS</A></H1>
77 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><DD>
79 Creates a new virtual mail alias. To add the virtual mail alias to the
80 database, see <A HREF="#insert">insert</A>.
82 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><DD>
84 Adds this virtual mail alias to the database. If there is an error, returns
85 the error, otherwise returns false.
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.
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:
95 <PRE> [ -e $dir/.qmail-$qdomain-default ] || {
96 touch $dir/.qmail-$qdomain-default;
97 chown $uid:$gid $dir/.qmail-$qdomain-default;
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
104 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><DD>
106 Deletes this virtual mail alias from the database. If there is an error,
107 returns the error, otherwise returns false.
110 The corresponding FS::cust_svc record will be deleted as well.
112 <DT><STRONG><A NAME="item_replace">replace OLD_RECORD</A></STRONG><DD>
114 Replaces OLD_RECORD with this one in the database. If there is an error,
115 returns the error, otherwise returns false.
117 <DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><DD>
119 Just returns false (no error) for now.
122 Called by the suspend method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
124 <DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><DD>
126 Just returns false (no error) for now.
129 Called by the unsuspend method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
131 <DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><DD>
133 Just returns false (no error) for now.
136 Called by the cancel method of FS::cust_pkg (see <A HREF="../FS/cust_pkg.html">FS::cust_pkg</A>).
138 <DT><STRONG><A NAME="item_check">check</A></STRONG><DD>
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.
145 Sets any fixed values; see <A HREF="../FS/part_svc.html">FS::part_svc</A>.
150 <H1><A NAME="VERSION">VERSION</A></H1>
152 $Id: svc_acct_sm.html,v 1.2 2000-03-03 18:22:43 ivan Exp $
156 <H1><A NAME="BUGS">BUGS</A></H1>
158 The remote commands should be configurable.
161 The <CODE>$recref</CODE> stuff in sub check should be cleaned up.
165 <H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
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.