My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* SMTP_Server_Relay
*
* @author Jason Johnson <jason@php-smtp.org>
* @copyright Copyright (c) 2008, Jason Johnson
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @version 1.0
* @package php-smtp
*/

class SMTP_Server_Relay {
var $log;
var $index;

function SMTP_Server_Relay() {
$this->log = new SMTP_Server_Log();
$this->index = new SMTP_Server_Index();
}

function relay($pos) {
$session =& new SMTP_Server_Relay_Session($pos);
$session->run();

$session = null;
}

function run() {
while(true) {
$this->index->read();

if($this->index->length() > 0) {
for($pos = 0; $pos < $this->index->length(); $pos++) {
$this->relay($pos);
}
}

$this->index->truncate();

sleep(10);
}
}
}
?>
Show details Hide details

Change log

r25 by spligak on Apr 18, 2008   Diff
First pass at indexing outbound messages.
Go to: 
Project members, sign in to write a code review

Older revisions

r21 by spligak on Apr 10, 2008   Diff
Cleaned up some constants, check
preference on mx weight, create
sessions by reference
r19 by spligak on Apr 09, 2008   Diff
[No log message]
r14 by spligak on Apr 08, 2008   Diff
Entry points for both the incoming
server and outgoing relay. Also, a
bootstrap script to get both running
with one command.
All revisions of this file

File info

Size: 797 bytes, 44 lines
Hosted by Google Code