Net_Vpopmaild
[ class tree: Net_Vpopmaild ] [ index: Net_Vpopmaild ] [ all elements ]

Class: Net_Vpopmaild_Base

Source Location: /Net_Vpopmaild-0.3.2/Vpopmaild/Base.php

Class Overview


Net_Vpopmaild_Base


Author(s):

Variables

Methods


Child classes:

Net_Vpopmaild
Net_Vpopmaild

Inherited Variables

Inherited Methods


Class Details

[line 37]
Net_Vpopmaild_Base

Base class for Net_Vpopmaild. This class provides the network connection, status checking methods, and some general helper methods used.



[ Top ]


Class Variables

$debug =  false

[line 50]

debug

Set to true to enable logging. Can be set by setDebug()

  • See: function setDebug
  • Access: protected

Type:   bool


[ Top ]

$ezmlmOpts = array(
            'a' => 1, /* Archive */
            'b' => 1, /* Moderator-only access to archive */
            'c' => 0, /* ignored */
            'd' => 0, /* Digest */
            'e' => 0, /* ignored */
            'f' => 1, /* Prefix */
            'g' => 1, /* Guard Archive */
            'h' => 0, /* Subscribe doesn't require conf */
            'i' => 0, /* Indexed */
            'j' => 0, /* Unsubscribe doesn't require conf */
            'k' => 0, /* Create a blocked sender list */
            'l' => 0, /* Remote admins can access subscriber list */
            'm' => 0, /* Moderated */
            'n' => 0, /* Remote admins can edit text files */
            'o' => 0, /* Others rejected (for Moderated lists only */
            'p' => 1, /* Public */
            'q' => 1, /* Service listname-request */
            'r' => 0, /* Remote Administration */
            's' => 0, /* Subscriptions are moderated */
            't' => 0, /* Add Trailer to outgoing messages */
            'u' => 1, /* Only subscribers can post */
            'v' => 0, /* ignored */
            'w' => 0, /* special ezmlm-warn handling (ignored) */
            'x' => 0, /* enable some extras (ignored) */
            'y' => 0, /* ignored */
            'z' => 0)

[line 135]

ezmlmOpts

This will be an array of the default ezmlm command line options. Use 1 for "on" or "yes"

  • Access: protected

Type:   mixed


[ Top ]

$gidFlagValues = array(
        'no_password_change'        => 0x01, 
        'no_pop'                    => 0x02, 
        'no_webmail'                => 0x04, 
        'no_imap'                   => 0x08, 
        'bounce_mail'               => 0x10, 
        'no_relay'                  => 0x20, 
        'no_dialup'                 => 0x40, 
        'user_flag_0'               => 0x080, 
        'user_flag_1'               => 0x100, 
        'user_flag_2'               => 0x200, 
        'user_flag_3'               => 0x400, 
        'no_smtp'                   => 0x800, 
        'domain_admin_privileges'   => 0x1000, 
        'override_domain_limits'    => 0x2000, 
        'no_spamassassin'           => 0x4000, 
        'delete_spam'               => 0x8000, 
        'system_admin_privileges'   => 0x10000, 
        'system_expert_privileges'  => 0x20000, 
        'no_maildrop'               => 0x40000)

[line 77]

gidFlagValues

gid big values for account limits

  • Access: protected

Type:   array


[ Top ]

$loginUser =  null

[line 59]

loginUser

This is an array of the logged in user's info.

  • Access: public

Type:   mixed


[ Top ]

$vpopmailRobotNumber =  3

[line 124]

vpopmailRobotNumber

autorespond number argument

  • Access: public

Type:   int


[ Top ]

$vpopmailRobotProgram =  '/usr/bin/autorespond'

[line 106]

vpopmailRobotProgram

path to autorespond

  • Access: public

Type:   string


[ Top ]

$vpopmailRobotTime =  1000

[line 115]

vpopmailRobotTime

autorespond time argument

  • Access: public

Type:   int


[ Top ]



Method Detail

__construct (Constructor)   [line 182]

void __construct( )

__construct

Instantiate Net_Socket.

  • Access: public

[ Top ]

__destruct (Destructor)   [line 669]

void __destruct( )

__destruct

Send quit(), Close $socket.

  • Access: public

[ Top ]

acceptLog   [line 228]

void acceptLog( object &$log)

acceptLog

Assign $log an external instance of Log

  • Access: public

Parameters:

object   &$log     instance of Log

[ Top ]

connect   [line 248]

void connect( [string $address = 'localhost'], [int $port = 89], [int $timeout = 30])

connect

Make a connection to vpopmaild using Net_Socket::connect().

  • Throws: Net_Vpopmaild_FatalException if connection or initial status fails
  • Access: public

Parameters:

string   $address     defaults to 'localhost'
int   $port     defaults to 89
int   $timeout     defaults to 30 (seconds)

[ Top ]

dotOnly   [line 363]

bool dotOnly( string $data)

dotOnly

Return status method. Verifies that $data is exactly "."

  • Return: true on success, false on failure
  • Access: protected

Parameters:

string   $data     string to be checked

[ Top ]

formatBasePath   [line 440]

string formatBasePath( mixed $domain, [string $user = ''], [string $path = ''], [string $type = 'file'])

formatBasePath

Format file/directory paths into user@domain/path.

  • Return: formatted base path
  • Access: protected

Parameters:

mixed   $domain     domain name required
string   $user     optional user name
string   $path     optional filename path
string   $type     type file or directory, defaults to 'file'

[ Top ]

listDir   [line 592]

array listDir( mixed $domain, [string $user = ''], [string $path = ''])

listDir

List a directory and return the contents as an array.

  • Return: array of directory contents on success
  • Throws: Net_Vpopmaild_Exception on failure
  • Access: public

Parameters:

mixed   $domain     domain name
string   $user     optional user name
string   $path     optional path

[ Top ]

mkDir   [line 650]

bool mkDir( mixed $domain, [string $user = ''], [string $path = ''])

mkDir

Create a directory.

  • Return: true on success
  • Throws: Net_Vpopmaild_Exception on failure
  • Access: public

Parameters:

mixed   $domain     domain name
string   $user     optional user name
string   $path     optional path

[ Top ]

quit   [line 421]

void quit( )

quit

Send quit command to vpopmaild. Called by __destruct()

  • Access: public

[ Top ]

readFile   [line 560]

array readFile( mixed $domain, [string $user = ''], [string $path = ''])

readFile

Read a file and return the contents as an array.

  • Return: file contents as array on success
  • Throws: Net_Vpopmaild_Exception on failure
  • Access: public

Parameters:

mixed   $domain     domain name
string   $user     optional username
string   $path     optional path

[ Top ]

readInfo   [line 467]

array readInfo( )

readInfo

Collect user/dom info into an Array and return. NOTE: +OK has already been read.

  • Return: info array
  • Access: protected

[ Top ]

recordio   [line 273]

void recordio( string $data)

recordio

Record i/o to $log. Only logs if $this->debug is set to true.

  • Access: public

Parameters:

string   $data     data to be logged

[ Top ]

rmDir   [line 625]

bool rmDir( mixed $domain, [string $user = ''], [string $path = ''])

rmDir

Remove a directory.

  • Return: true on success
  • Throws: new Net_Vpopmaild_Excpetion on failure
  • Access: public

Parameters:

mixed   $domain     domain name
string   $user     optional user name
string   $path     optional path name

[ Top ]

rmFile   [line 503]

bool rmFile( mixed $domain, [string $user = ''], [string $path = ''])

rmFile

Remove a file.

  • Return: true on success
  • Throws: Net_Vpopmaild_Exception on failure
  • Access: public

Parameters:

mixed   $domain     domain name, required
string   $user     optional user name
string   $path     optional path

[ Top ]

setDebug   [line 202]

void setDebug( [bool $value = true], [string $logFile = null])

setDebug

Set $debug (true by default). Call this to set $debug to true and enable logging.

  • Throws: Net_Vpopmaild_Exception on failure to create a Log object
  • Access: public

Parameters:

bool   $value     defaults to true to enable debugging
string   $logFile     path to local log file, defaults to System::tmpdir() . PATH_SEPARATOR . 'vpopmaild.log' (/tmp/vpopmaild.log on Unix, for example)

[ Top ]

sockRead   [line 403]

string sockRead( )

sockRead

Read line from socket. Uses Net_Socket::readLine().

  • Return: line read from socket
  • Throws: Net_Vpopmaild_FatalException if Net_Socket::readLine() returns PEAR_Error
  • Access: protected

[ Top ]

sockWrite   [line 383]

bool sockWrite( string $data)

sockWrite

Write $data to socket. Uses Net_Socket::writeLine().

  • Return: true on success
  • Throws: Net_Vpopmaild_FatalException if Net_Socket::writeLine() returns PEAR_Error
  • Access: protected

Parameters:

string   $data     string to be checked

[ Top ]

statusErr   [line 345]

bool statusErr( string $data)

statusErr

Return status method. Verifies that $data starts with "-ERR "

  • Return: true on success, false on failure
  • Access: protected

Parameters:

string   $data     string to be checked

[ Top ]

statusOk   [line 290]

bool statusOk( string $data)

statusOk

Return status method. Verifies that $data contains +OK

  • Return: true on success, false on failure
  • Access: protected

Parameters:

string   $data     string to be checked

[ Top ]

statusOkMore   [line 309]

bool statusOkMore( string $data)

statusOkMore

Return status method. Verifies that $data is is exactly +OK+ (more to come)

  • Return: true on success, false on failure
  • Access: protected

Parameters:

string   $data     string to be checked

[ Top ]

statusOkNoMore   [line 327]

bool statusOkNoMore( string $data)

statusOkNoMore

Return status method. Verifies that $data is exactly +OK

  • Return: true on success, false on failure
  • Access: protected

Parameters:

string   $data     string to be checked

[ Top ]

writeFile   [line 528]

bool writeFile( mixed $contents, mixed $domain, [string $user = ''], [string $path = ''])

writeFile

Write a file.

  • Return: true on success
  • Throws: Net_Vpopmaild_Exception on failure
  • Access: public

Parameters:

mixed   $contents     file contents
mixed   $domain     domain name
string   $user     optional user name
string   $path     optional path

[ Top ]


Documentation generated on Sat, 04 Oct 2008 13:00:05 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.