Первый раз настраиваю связку Postfix и Doveсot. Все работает нормально (pop, imap, sasl), до того момента, как я пытаюсь использовать Dovecot как LDA. Т.е. как только я добавляю в конфиг master.cf строчки:dovecot unix - n n - - pipe
flags=DRhu user=virtual:virtual argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}
postfix перестает работать, а в логи спится вот что:
Apr 28 13:57:19 mail postfix/master[978]: daemon started -- version 2.3.14, configuration /usr/local/etc/postfix
Apr 28 13:57:49 mail postfix/smtpd[982]: fatal: no SASL authentication mechanisms
Apr 28 13:57:49 mail postfix/pipe[984]: warning: unexpected end-of-input from dovecot socket while reading input attribute name
Apr 28 13:57:49 mail postfix/pipe[984]: warning: deliver_request_get: error receiving common attributes
Apr 28 13:57:50 mail postfix/master[978]: warning: process /usr/local/libexec/postfix/smtpd pid 982 exit status 1
Apr 28 13:57:50 mail postfix/master[978]: warning: /usr/local/libexec/postfix/smtpd: bad command startup -- throttling
Если убираю все, что связянно с lda из конфигов, то работает.
Привожу полные конфиги Postfix-a и Dovecot-a:
# cat main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
mail_owner = postfix
myhostname = mail.domain.org
#mydomain = domain.tld
myorigin = $myhostname
inet_interfaces = all
mydestination = $myhostname, localhost
unknown_local_recipient_reject_code = 550
mynetworks_style = host
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
recipient_delimiter = +
smtpd_banner = $myhostname ESMTP ready
debug_peer_level = 2
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = no
virtual_gid_maps = static:2000
virtual_uid_maps = static:2000
virtual_mailbox_base = /var/mail/domains
virtual_mailbox_domains = domain.org
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/virtual-maps.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/dovecot
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
# cat dovecot.conf
## Dovecot configuration file
protocols = imap pop3
disable_plaintext_auth = no
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot.log
#syslog_facility = mail
ssl_disable = yes
login_greeting = POP3 ready.
mail_location = maildir:/var/mail/domains/%d/%n
mail_privileged_group = virtual
mail_debug = yes
verbose_proctitle = yes
first_valid_uid = 2000
last_valid_uid = 2000
first_valid_gid = 2000
last_valid_gid = 2000
protocol imap {
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
postmaster_address = postmaster@domain.org
sendmail_path = /usr/sbin/sendmail
}
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
auth_verbose = yes
auth_debug = yes
auth_debug_passwords = yes
auth default {
mechanisms = plain login
passdb sql {
args = /usr/local/etc/dovecot-sql.conf
}
userdb sql {
args = /usr/local/etc/dovecot-sql.conf
}
user = virtual
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = dovecot
group = dovecot
}
client {
path = /var/spool/postfix/private/dovecot
mode = 0660
user = postfix
group = postfix
}
}
}
---------------------
# uname -r
7.0-RELEASE
# pkg_info | grep postfix
postfix-2.4.7,1 A secure alternative to widely-used Sendmail
# pkg_info | grep dovecot
dovecot-1.0.13_2 Secure and compact IMAP and POP3 servers