3 <TITLE>FS::svc_acct_sm - Object methods for svc_acct_sm records</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
9 <A NAME="__index__"></A>
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>
26 <H1><A NAME="name">NAME</A></H1>
27 <P>FS::svc_acct_sm - Object methods for svc_acct_sm records</P>
30 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
32 use FS::svc_acct_sm;</PRE>
34 $record = new FS::svc_acct_sm \%hash;
35 $record = new FS::svc_acct_sm { 'column' => 'value' };</PRE>
37 $error = $record->insert;</PRE>
39 $error = $new_record->replace($old_record);</PRE>
41 $error = $record->delete;</PRE>
43 $error = $record->check;</PRE>
45 $error = $record->suspend;</PRE>
47 $error = $record->unsuspend;</PRE>
49 $error = $record->cancel;</PRE>
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>
56 <DT><STRONG><A NAME="item_key">svcnum - primary key (assigned automatcially for new accounts)</A></STRONG><BR>
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>
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>
62 <DT><STRONG><A NAME="item_domuser_%2D_virtual_username">domuser - virtual username</A></STRONG><BR>
67 <H1><A NAME="methods">METHODS</A></H1>
69 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
71 Creates a new virtual mail alias. To add the virtual mail alias to the
72 database, see <A HREF="#insert">insert</A>.
74 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
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>
83 [ -e $dir/.qmail-$qdomain-default ] || {
84 touch $dir/.qmail-$qdomain-default;
85 chown $uid:$gid $dir/.qmail-$qdomain-default;
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>
90 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
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>
96 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
98 Replaces OLD_RECORD with this one in the database. If there is an error,
99 returns the error, otherwise returns false.
101 <DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR>
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>
106 <DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR>
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>
111 <DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR>
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>
116 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
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
121 <P>Sets any fixed values; see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>.</P>
125 <H1><A NAME="version">VERSION</A></H1>
126 <P>$Id: svc_acct_sm.html,v 1.1 2001-07-30 07:36:03 ivan Exp $</P>
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>
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>