
#
# Configuration for cpop.
#
# WARNING: This file is also read by the Claranet Courier Authentication Module.
#

[master]

pidfile		= /var/tmp/cpop-master.pid
logger          = syslog local0

# Auth configuration

[auth]

uid         = 5000
gid         = 5000
logger      = syslog local0
lockfile    = /var/tmp/cpop-auth.lock
socket      = /var/tmp/cpop-auth.socket
backlog     = 100
children    = 10
realms      = claranet_fr, easy_biz, fr_clara_net freesurf_fr

# Configuration for CCAM (Claranet Courier Authentication Daemon)

[ccam]

uid			= 5000
gid			= 5000
logger			= syslog local1
realms			= claranet_fr, easy_biz, fr_clara_net, freesurf_fr
authenticate_rules	= claranet_rules, freesurf_rules

# Authentication realms

[fr_clara_net]

bulletins   = direct "no"
homedir     = direct "/clara/fr_clara_net/${l}"
maildir     = direct "/clara/fr_clara_net/${l}/Maildir"
password    = backend base_fr_clara_net map_password

[claranet_fr]

bulletins   = direct "no"
homedir     = direct "/clara/claranet.fr/_${l:0:2}/_${l:2:2}/${l}"
maildir     = direct "/clara/claranet.fr/_${l:0:2}/_${l:2:2}/${l}/Maildir"
password    = backend base_claranet map_password

[easy_biz]

bulletins   = direct "no"
homedir     = direct "/clara/doms/_${d:0:2}/_${d:2:2}/${d}/${l}"
maildir     = direct "/clara/doms/_${d:0:2}/_${d:2:2}/${d}/${l}/Maildir"
password    = backend base_easy map_password

[freesurf_fr]

bulletins   = direct "no"
homedir	    = direct "/freesurf_mail/freesurf.fr/_${l:0:2}/_${l:2:2}/${l}"
maildir	    = direct "/freesurf_mail/freesurf.fr/_${l:0:2}/_${l:2:2}/${l}/Maildir"
password    = backend base_freesurf map_password


# Authentication rules

[claranet_rules]

no_domain		= set_domain "claranet.fr"
domain_claranet.fr      = authenticate_realm "claranet_fr"
domain_fr.clara.net     = authenticate_realm "fr_clara_net"
domain_freesurf.fr	= authenticate_realm "freesurf_fr"
default                 = authenticate_realm "easy_biz"

[freesurf_rules]

no_domain		= set_domain "freesurf.fr"
domain_freesurf.Fr	= authenticate_realm "freesurf_fr"
default			= authenticate_realm "freesurf"


# Authentication backends

[backends]

base_claranet     = mysql_thorens_claranet mysql_orb_claranet mysql_localhost_claranet
base_easy         = mysql_thorens_easy mysql_orb_easy mysql_localhost_easy
base_fr_clara_net = mysql_in_fr_clara_net
base_freesurf	  = mysql_thorens_freesurf mysql_orb_freesurf

# Mysql Servers

[mysql_in_fr_clara_net]

priority       = 1
type           = mysql
server         = 212.43.194.12
username       = auth
password       = kern.flp
database       = internal
request_one    = "SELECT CONCAT('{crypt}', `passwd`) FROM `passwd` WHERE `login` = '${l}'"
map_password   = request_one column 1

[mysql_localhost_claranet]

priority       = 3
type           = mysql
server         = localhost
username       = u_cpop_ng
password       = lksdfsdflkd
database       = clarapw
request_one    = "SELECT CONCAT('{plain}', `passwd`) FROM `clarapw` WHERE `login` = '${l}'"
map_password   = request_one column 1

[mysql_thorens_claranet]

priority       = 2
type           = mysql
server         = 212.43.194.150
username       = u_cpop_ng
password       = lkdflkfld
database       = clarapw
request_one    = "SELECT CONCAT('{plain}', `passwd`) FROM `clarapw` WHERE `login` = '${l}'"
map_password   = request_one column 1

[mysql_orb_claranet]

priority       = 1
type           = mysql
server         = 212.43.194.126
username       = u_cpop_ng
password       = lksfldkfld
database       = clarapw
request_one    = "SELECT CONCAT('{plain}', `passwd`) FROM `clarapw` WHERE `login` = '${l}'"
map_password   = request_one column 1

[mysql_orb_freesurf]

priority	= 1
type		= mysql
server		= 212.43.194.126
username	= u_cpop_ng
password	= lmkldkfldk
database	= freesurf
request_one	= "SELECT CONCAT('{plain}', `passwd`) FROM `clarapw` WHERE `login` = '${l}'"
map_password	= request_one column 1

[mysql_thorens_freesurf]

priority	= 2
type		= mysql
server		= 212.43.194.150
username	= u_cpop_ng
password	= dlfldklf
database	= freesurf
request_one	= "SELECT CONCAT('{plain}', `passwd`) FROM `clarapw` WHERE `login` = '${l}'"
map_password	= request_one column 1

[mysql_localhost_freesurf]

priority	= 3
type		= mysql
server		= localhost
username	= u_cpop_ng
password	= lsdfkldfklffd
database	= freesurf
request_one	= "SELECT CONCAT('{plain}', `passwd`) FROM `clarapw` WHERE `login` = '${l}'"
map_password	= request_one column 1

[mysql_thorens_easy]

priority       = 2
type           = mysql
server         = 212.43.194.150
username       = u_cpop_ng
password       = lkdflkdl
database       = easy
request_one    = "SELECT CONCAT('{plain}', `passwd`) FROM `mbox` WHERE `mbox` = '${u}' AND `alias` = '' AND `status` = 'Active'"
map_password   = request_one column 1


[mysql_orb_easy]

priority       = 3
type           = mysql
server         = 212.43.194.126
username       = u_cpop_ng
password       = mldfmldmfl
database       = easy
request_one    = "SELECT CONCAT('{plain}', `passwd`) FROM `mbox` WHERE `mbox` = '${u}' AND `alias` = '' AND `status` = 'Active'"
map_password   = request_one column 1


[mysql_localhost_easy]

priority       = 1
type           = mysql
server         = localhost
username       = u_cpop_ng
password       = mdflmdslfk
database       = easy
request_one    = "SELECT CONCAT('{plain}', `passwd`) FROM `mbox` WHERE `mbox` = '${u}' AND `alias` = '' AND `status` = 'Active'"
map_password   = request_one column 1


[popper]

uid                        = 5000
gid                        = 5000

logger                     = syslog local0

auth_socket                = /var/tmp/cpop-auth.socket

max_trans_clients          = 500
max_auth_clients           = 1500

bindings                   = pop.fr.clara.net pop.fr.clara.net_ssl pop.freesurf.fr

[authorization]

idle_timeout               = 60
max_time                   = 120
max_bad_commands           = 5

[transaction]

idle_timeout               = 600
max_bad_commands           = 100

[accounting]

server                     = 212.43.194.32
udp_port                   = 20000
hmac_key                   = zeXCL4qf6ha2DNX9g7Dg

stats_file		   = /var/tmp/cpop.stats

# Bindings

[pop.fr.clara.net]

# listen                  = [2001:a70:fd::14:88]:110
listen                  = 212.43.194.147:110
backlog                 = 100
hostname                = pop-01.fr.clara.net
banner                  = ""
authenticate_rules      = claranet_rules
implementation		= "Claranet France POP3 server"
expire			= "NEVER"
tls_mode                = stls
tls_certificate         = /usr/local/etc/cpop-ng/pop.fr.clara.net.crt
tls_private_key         = /usr/local/etc/cpop-ng/pop.fr.clara.net.key
create_dirs		= /clara/claranet.fr /clara/doms
last			= enabled

[pop.fr.clara.net_ssl]

# listen                 = [2001:a70:fd::14:88]:995
listen                  = 212.43.194.147:995
backlog                 = 100
hostname                = pop-01.fr.clara.net
banner                  = ""
authenticate_rules      = claranet_rules
implementation		= "Claranet France POP3 server"
expire			= "NEVER"
tls_mode                = immediate
tls_certificate         = /usr/local/etc/cpop-ng/pop.fr.clara.net.crt
tls_private_key         = /usr/local/etc/cpop-ng/pop.fr.clara.net.key
create_dirs		= /clara/claranet.fr /clara/doms
last			= enabled

[pop.freesurf.fr]

listen                  = 212.43.194.167:110
backlog                 = 100
hostname                = pop-01.freesurf.fr
banner                  = ""
authenticate_rules      = freesurf_rules
implementation          = "Freesurf POP3 server"
expire                  = "NEVER"
tls_mode                = stls
tls_certificate         = /usr/local/etc/cpop-ng/pop.fr.clara.net.crt
tls_private_key         = /usr/local/etc/cpop-ng/pop.fr.clara.net.key
create_dirs             = /freesurf_mail
last                    = enabled

# vim: set nu nowrap:
