1
/* Copyright (C) 2000-2004 Thomas Bopp, Thorsten Hampel, Ludger Merkens
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License as published by
5
* the Free Software Foundation; either version 2 of the License, or
6
* (at your option) any later version.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
* $Id: imap.pike,v 1.1.1.1 2006/03/27 12:40:18 exodusd Exp $
20
constant cvs_version="$Id: imap.pike,v 1.1.1.1 2006/03/27 12:40:18 exodusd Exp $";
35
werror("Failed to bind socket !\n");
38
master()->register_user((u=new(OBJ_IMAP, tmp)));
41
program get_socket_program()
43
return (program)OBJ_IMAP;
46
bool port_required() { return false; }
50
int port_nr = _Server->query_config("imap_port");
53
LOG("Port for IMAP not defined - service is NOT started");
57
string ip = _Server->query_config("ip");
58
if ( ! stringp(ip) || sizeof(ip)==0 ) ip = 0;
59
if ( !bind(port_nr, setup_port, ip) )
61
werror("Failed to bind imap port on "
62
+ (stringp(ip) ? ip+":" : "port ") + port_nr + " !\n");
65
LOG("IMAP Port registered on " + (stringp(ip) ? ip+":" : "port " )
74
string get_port_config()
79
string get_port_name()
84
int get_port() { return _Server->query_config("imap_port"); }
85
string describe() { return "IMAP(#"+get_port()+")"; }