Вот часть моего конфига
Код: Выделить всё
begin acl
acl_check_connect:
accept hosts = localhost
control = no_enforce_sync
accept
acl_check_auth:
accept encrypted = *
accept condition = ${if eq{${uc:$smtp_command_argument}}{CRAM-MD5}}
deny message = TLS encryption required
acl_check_rcpt:
accept hosts = :
accept hosts = +relay_from_hosts
accept authenticated = *
deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]
deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
deny message = "HELO/EHLO require by SMTP RFC"
condition = ${if eq{$sender_helo_name}{}{yes}{no}}
deny message = $sender_host_address is not allowed to send mail from $sender_address_domain
spf = softfail:fail
deny message = "Your IP in HELO - access denied!"
hosts = * : !+relay_from_hosts
condition = ${if eq{$sender_helo_name}{$sender_host_address}{true}{false}}
deny condition = ${if eq{$sender_helo_name}{$interface_address}{yes}{no}}
hosts = !127.0.0.1 : !localhost : !+relay_from_hosts : *
message = "my IP in your HELO! Access denied!
deny condition = ${if match{$sender_helo_name}{\N^\d+$\N}{yes}{no}}
hosts = !127.0.0.1 : !localhost : !+relay_from_hosts : *
message = "can not be only number in HELO!"
deny condition = ${if match{$sender_address}{\N^\s+$\N}{yes}{no}}
hosts = !127.0.0.1 : !localhost : !+relay_from_hosts : *
message = "Sender address contains spaces?! not for RFC..."
deny condition = ${if eq{$sender_address}{}{yes}{no}}
hosts = !127.0.0.1 : !localhost : !+relay_from_hosts : *
message = "Sender address is empty?! not for RFC..."
deny condition = ${lookup mysql{SELECT `goto` FROM `alias` WHERE `address`='${quote_mysql:$local_part@domain.ru}'}{no}{yes}}
hosts = !127.0.0.1 : !localhost : !+relay_from_hosts : *
message = "No such user!"
deny hosts = !+relay_from_hosts : *
dnslists = bl.spamcop.net : cbl.abuseat.org : zen.spamhaus.org
message = "you in blacklist - $dnslist_domain \n $dnslist_text"
warn set acl_m0 = 30s
warn hosts = +relay_from_hosts : 127.0.0.1/8
set acl_m0 = 0s
warn logwrite = Delay $acl_m0 for $sender_host_name [$sender_host_address] with HELO=$sender_helo_name. Mail from $sender_address to $local_part@$domain.
delay = $acl_m0
accept domains = +local_domains
endpass
message = "In my mailserver not stored this user"
verify = recipient
accept domains = +relay_to_domains
endpass
message = "main server not know how relay to this address"
verify = recipient
deny message = "No, there is no open relays here :)"
1)без TLS и без AUTH попытка выдает No such user!
2)с TLS но без AUTH - попытка выдает No such user!
3)без TLS но с AUTH - попытка выдает TLS encryption required
4)с TLS с AUTH - почта отправляется
No such user он выдает из-за этого правила:
Код: Выделить всё
deny condition = ${lookup mysql{SELECT `goto` FROM `alias` WHERE `address`='${quote_mysql:$local_part@domain.ru}'}{no}{yes}}
hosts = !127.0.0.1 : !localhost : !+relay_from_hosts : *
message = "No such user!"
И вообще посоветуйте как можно оптимизировать данный конфиг, любой критике буду рад