# milter-greylist config
# This part was auto-generated: Sun Mar 13 18:35:36 MSK 2005
#
# Greylisting config file
#
# $Id: greylist.conf-baseconfig,v 1.3 2005/02/28 01:55:54 admin Exp $
#

# Uncomment this to enable verbose output.
# Note that options appearing before the "verbose" option in this
# file will not be treated verbosely.
# May be overridden by the "-v" command line argument.
#verbose

# If you work with multiple MX, list them with
# peer entries to enable greylist sync among the MX
#peer 194.85.82.65
#peer 194.85.82.4

# Greylisting your own MTA is a very bad idea: never
# comment this line, except for testing purposes.
#добавляем в доверенный список наши внутренние локальные сети. таким образом с компов этих сетей пользователи могут отправлять письма с помощью нашего сервера.


acl whitelist addr 127.0.0.0/8
acl whitelist addr 192.168.0.0/24
acl whitelist addr 192.168.1.0/24
acl whitelist addr 192.168.2.0/24

acl whitelist addr 111.111.100.0/24

# If you use IPv6, uncomment this
#acl whitelist addr ::1/128

# This option tells milter-greylist when it should
# add an X-Greylist header. Default is all, which
# causes a header to always be added. Other possible
# values are none, delays and nodelays
#
эта фича добавит к каждому прошедшему в конечном итоге к пользователю письму строку X-milter greylist и задержку между первым стуком на сервер и повторным письмом другими словами задержку в доставке и другую полезную инфу

report all

# How long a client has to wait before we accept
# the messages it retries to send. Here, 1 hour.
# May be overridden by the command line argument "-w xxx".
#greylist 1h
#задаем сколько времени после первого прихода письма повторное письма будет отторгаться

greylist 15m

# How long does auto-whitelisting lasts (set it to 0
# to disable auto-whitelisting). Here, 3 days
# May be overridden by the "-a" command line argument.
#autowhite 3d
#время после которого будут сброшены белые списки одобренных адресов мэйл серверов (не тех естественно которые заданы вручную они всеглда белые а тех что были внесены в белый список после получения повторного письма). кстати перезапуск службы также обнуляет списки. а команда kill `hup -1 /var/milter-greylist/milter-greylist.pid` просто стопорит службу по крайней мере в варианте скомпилированном из исходников.

autowhite 30d

# Uncomment if you want auto-whitelist to work for
# the IP rather than for the (IP, sender, reciever)
# tuple.
#lazyaw

# You can specify a file where milter-greylist will
# store its PID
# May be overridden by the "-P" command line argument.
#файл где будет храниться номер процесса родителя

pidfile "/var/milter-greylist/milter-greylist.pid"

# The socket used to communicate with Sendmail can
# be specified in this file:
# May be overridden by the "-p" command line argument.
#файл-сокет через который будет происходить обмен информацией. должен совпадать с тем что указан в /etc/sendmail.mc

socket "/var/milter-greylist/milter-greylist.sock"

# The dumpfile location
# May be overridden by the "-d" command line argument.
dumpfile "/var/milter-greylist/greylist.db"

# How often should we dump to the dumpfile (0: on each change, -1: never)
dumpfreq 1m

# How long will the greylist database retain tuples
#насколько я понимаю время сколько будет наш сервер ждать повторное письмо

timeout 5d

# The user the milter should run as
# May be overridden by the "-u" command line argument.

#user "mailgrey"

# This is a list of broken MTA that break with greylisting. Copied from
# http://cvs.puremagic.com/viewcvs/greylisti...ip.txt?rev=1.11
acl whitelist addr 12.5.136.141/32 # Southwest Airlines (unique sender)
acl whitelist addr 12.5.136.142/32 # Southwest Airlines
acl whitelist addr 12.107.209.244/32 # kernel.org (unique sender)
acl whitelist addr 12.107.209.250/32 # sourceware.org (unique sender)
acl whitelist addr 63.82.37.110/32 # SLmail
acl whitelist addr 64.7.153.18/32 # sentex.ca (common pool)
acl whitelist addr 64.12.136.0/24 # AOL (common pool)
acl whitelist addr 64.12.137.0/24 # AOL
acl whitelist addr 64.12.138.0/24 # AOL
acl whitelist addr 64.124.204.39 # moveon.org (unique sender)
acl whitelist addr 64.125.132.254/32 # collab.net (unique sender)
acl whitelist addr 66.94.237.16/28 # Yahoo Groups servers (common pool)
acl whitelist addr 66.94.237.32/28 # Yahoo Groups servers (common pool)
acl whitelist addr 66.94.237.48/30 # Yahoo Groups servers (common pool)
acl whitelist addr 66.100.210.82/32 # Groupwise?
acl whitelist addr 66.135.209.0/24 # Ebay (for time critical alerts)
acl whitelist addr 66.135.197.0/24 # Ebay
acl whitelist addr 66.162.216.166/32 # Groupwise?
acl whitelist addr 66.206.22.82/32 # Plexor
acl whitelist addr 66.206.22.83/32 # Plexor
acl whitelist addr 66.206.22.84/32 # Plexor
acl whitelist addr 66.206.22.85/32 # Plexor
acl whitelist addr 66.218.66.0/23 # Yahoo Groups servers (common pool)
acl whitelist addr 66.218.67.0/23 # Yahoo Groups servers (common pool)
acl whitelist addr 66.218.68.0/23 # Yahoo Groups servers (common pool)
acl whitelist addr 66.27.51.218/32 # ljbtc.com (Groupwise)
acl whitelist addr 152.163.225.0/24 # AOL
acl whitelist addr 194.245.101.88/32 # Joker.com
acl whitelist addr 195.235.39.19/32 # Tid InfoMail Exchanger v2.20
acl whitelist addr 195.46.220.208/32 # mgn.net
acl whitelist addr 195.46.220.209/32 # mgn.net
acl whitelist addr 195.46.220.210/32 # mgn.net
acl whitelist addr 195.46.220.211/32 # mgn.net
acl whitelist addr 195.46.220.221/32 # mgn.net
acl whitelist addr 195.46.220.222/32 # mgn.net
acl whitelist addr 195.238.2.105/32 # skynet.be (wierd retry pattern)
acl whitelist addr 195.238.2.124/32 # skynet.be
acl whitelist addr 195.238.3.12/32 # skynet.be
acl whitelist addr 195.238.3.13/32 # skynet.be
acl whitelist addr 204.107.120.10/32 # Ameritrade (no retry)
acl whitelist addr 205.188.0.0/16 # AOL
acl whitelist addr 205.206.231.0/24 # SecurityFocus.com (unique sender)
acl whitelist addr 207.115.63.0/24 # Prodigy - retries continually
acl whitelist addr 207.171.168.0/24 # Amazon.com
acl whitelist addr 207.171.180.0/24 # Amazon.com
acl whitelist addr 207.171.187.0/24 # Amazon.com
acl whitelist addr 207.171.188.0/24 # Amazon.com
acl whitelist addr 207.171.190.0/24 # Amazon.com
acl whitelist addr 211.29.132.0/24 # optusnet.com.au (wierd retry pattern)
acl whitelist addr 213.136.52.31/32 # Mysql.com (unique sender)
acl whitelist addr 216.33.244.0/24 # Ebay
acl whitelist addr 217.158.50.178/32 # AXKit mailing list (unique sender)


# acl whitelist domain mail.ru

##### Testing recipients
### acl greylist rcpt /webmaster@.*\.mipt\.ru/
### acl greylist rcpt /postmaster@.*\.mipt\.ru/
### acl greylist rcpt /info@.*\.mipt\.ru/
### acl greylist rcpt /bofh@.*\.mipt\.ru/
### acl greylist rcpt /admin@.*\.mipt\.ru/
### acl greylist rcpt /manager@.*\.mipt\.ru/
### acl greylist rcpt /root@.*\.mipt\.ru/
### acl whitelist default

##### Full-server mode:
### acl whitelist rcpt <username>
### acl greylist default

##### Current rules:

#rcpt - реципиент то есть получатель. значит если письмо одресовано указанному получателю(адресату проще говоря) то оно без вопросов будет пропускаться

acl whitelist rcpt root@.narod.ru


acl whitelist rcpt sysadmin@narod.ru
#acl whitelist rcpt /diags@.*\.narod\.ru/

#более продвинутый вариант: будет пропущено без задержки письмо с любого ящика сервера space.com адресованное info@narod.ru

acl whitelist from /.*@space\.com/ rcpt info@narod.ru
acl greylist default


------------------------------------------------------------

#пояснение насчет масок в адресах.

адрес должен быть заключен в слэши /

/john@com.com/

адреса можно задавать масками,

/.*@com\.com/

.-одиночный символ

.*-любой набор символов включая ничего

\-экранирует спецсимвол

в итоге пример расшифровывается так любой адрес с com.com, то есть john@com.com,

piter@com.com итп


про маски можно прочитать в

#man 7 re_format

но в Linux такого нет поэтому читаем в

#man 7 regex


Сайт управляется системой uCoz