#
# Config file for gld
#

#
# TCP Port gld should listen to (default is 2525)
#
PORT=2525

#
# Shall we bind only to loopback ? (0=No,1=Yes) (default is 1)
#
LOOPBACKONLY=1

#
# The list of networks allowed to connect to us (default is everybody)
# The format is network/cidrmask,....
# 
# comment the line to deactivate it.
#
CLIENTS=127.0.0.1/32

#
# The user used to run gld (default value is no user change)
# comment the line to deactivate it.
#
USER=gld

#
# The group used to run gld (default value is no group change)
# comment the line to deactivate it.
#
GROUP=gld

#
# Maximum simultaneous connexions (default is 100)
#
MAXCON=100

#
# How many seconds we should wait before accepting
# a mail that is in the greylist. (default is 60)
#
MINTIME=60

#
# Shall we use lightgrey option ? (0=No,1=Yes) (default is 0)
#
# The lightgrey option, mask the last octet of IP addresses
# and thus we greylist only C classes (/24) instead of individual IPs.
#
LIGHTGREY=0

#
# Shall we use the mxgrey algorithm ? (0=No,>0=Yes) (default is 0)
#
# the mxgrey algorithm is a variation of the greylist algorithm.
# When this is enabled, we allow all incoming mails from an IP address
# whatever source/destination email as long as this IP has been greylisted
# at least X time and succeded the mail resend .
#
# Example:
# The IP 1.2.3.4 sends an email from src@domain.com to user@yourdomain.com
# We greylist this mail as this IP is not yet in database and send a 450 SMTP code
# After some time, the IP re-send the mail from src@domain.com to user@yourdomain.com
# We update the db.
# Some time after the ip 1.2.3.4 sends an email from john@domain.com to fred@yourdomain.com
# We will accept this mail without any greylisting, as this ip already succeded a greylist test
# and thus seems to be a valid smtp server and not a spammer .
#
# The advantage of this method, is that it reduce the re-send time due to greylisting to
# x mail per server instead of one mail per destination .
#
# The value you provide in MXGREY is the minimum number of succesful greylists
# before accepting all mails from this MX. higher the number is, harder is to get in.
#
# This algortihm replace the old LIGHTGREYDOMAIN which was available prior version 1.6
#
MXGREY=0

#
# Shall we use the whitelist table ?  (0=No,1=Yes) (default is 1)
#
# If set to yes, then the table 'whitelist' is looked up
# each time postfix request the server
# if the email/domain/ip is in the whitelist, then the response
# will be 'dunno' .
#
# In the whitelist table, you can set the following values:
# an email: ie john@foo.tld
# a domain: ie @bar.tld
# an IP   : ie 1.2.3.4
# a subnet: ie 1.2.3
#
WHITELIST=1

#
# Shall we use a DNS based whitelist ? (default is no)
#
# To activate it, the line must be uncommented
# and the value set to the domain of the DNS whitelist.
# for example, if DNSWL is set to toto.com and we get a mail from ip a.b.c.d
# then gld will DNS lookup d.c.b.a.toto.com
# and if found allow the ip without greylisting it.
# 
#DNSWL=toto.com

#
# Shall we send a 'dunno' in case of error (mysql down,....) (0=No,1=Yes) (default is 1)
#
# Normaly, if an error occur, the server is supposed to close the connection
# and thus postfix will return a 450 Server configuration error
# if this parameter is set to 1, then the server will return 'dunno'
# and thus let postfix decide the fate of the mail.
#
ERRACCEPT=1

#
# Shall we log to the syslog (0=No,1=Yes) (default is 1)
#
SYSLOG=1

#
# If we use syslog, which facility shall we use (default is mail)
# it can only be one of the following facilities:
# daemon mail local0 local1 local2 local3 local4 local5 local6 local7
#
FACILITY=mail

#
# The Message that We display in case of reject (default is "Greylisted")
#
# If you want another SMTP return code than the default 450, just put it in
# the beginning of the message, ie: 451 You have been greylisted by gld ...
# If you don't provide any SMTP code, the default 450 will be used by postfix
#
# WARNING: if you set a custom smtp code make sure it's a 4XX code.
# if you don't provide a 4XX code, gld will ignore it and send the default 450.
# Be also warned that if you set a custom code, gld will no use defer_if_permit anymore
# but direct supplied code to postfix .
#
MESSAGE=Greylisting in action, please try later 

#
# Training mode activated ? (0=No,1=Yes) (default is 0)
#
# If activated, gld will do all the work but will always reply dunno to postfix
# and thus, will never greylist any mail.
# This feature is useful for testing gld performances without greylisting any mail
#
TRAINING=0

#
# SQL INFOS (defaults are localhost,myuser,mypasswd,mydb)
#
SQLHOST=XXXXXXXXX
SQLUSER=XXXXXXXX
SQLPASSWD=XXXXXXX
SQLDB=XXXXXXXX
