Да забыл добавить. Почтовик - postfix.
Связка postfix + mysql:
[main.cf]
..................
################ My config ###################
disable_vrfy_command = yes
message_size_limit=40024000
smtp_skip_4xx_greeting = yes
smtp_skip_5xx_greeting = no
transport_maps = mysql:/usr/local/etc/postfix/transport.cf
############# Virtual ######################
virtual_mailbox_base = /
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/aliases.cf
virtual_alias_maps = mysql:/usr/local/etc/postfix/remote_aliases.cf
virtual_transport = virtual
virtual_uid_maps = static:65534
# if nodody in you system has this id
virtual_gid_maps = static:6
# if mail group has this gid
relay_domains = $transport_maps,$mydestination
smtpd_recipient_restrictions = mysql:/usr/local/etc/postfix/protected_destinations, reject_rbl_client opm.blitzed.org, reject_rbl_client list.dsbl.org, reject_rbl_client bl.spamcop.net, reject_rbl_client sbl-xbl.spamhaus.org,check_sender_access mysql:/usr/local/etc/postfix/restricted_senders, permit_mynetworks,check_sender_access mysql:/usr/local/etc/postfix/antispam,check_relay_domains
########## Permisiions for local users
smtpd_restriction_classes = local_only,insiders_only
local_only = check_recipient_access mysql:/usr/local/etc/postfix/local_domains,reject_unauth_destination insiders_only = check_sender_access mysql:/usr/local/etc/postfix/insiders,reject
smtpd_client_restrictions = reject_rbl_client list.dsbl.org,regexp:/usr/local/etc/postfix/block_from_name reject_code = 550
unknown_client_reject_code = 550
############## Checks ##############
header_checks=regexp:/usr/local/etc/postfix/header-checks
mime_header_checks=regexp:/usr/local/etc/postfix/mime_checks
mime_header_checks=pcre:/usr/local/etc/postfix/mime_checks
############## BLOCK MORE CONNECTION #################
smtpd_client_connection_count_limit=5
anvil_rate_time_unit=180
smtpd_client_connection_rate_limit=5