Can't send or receive mail from Postfix+Dovecot+MySQL
by cindywill317 from LinuxQuestions.org on (#5DVQ9)
Hi,
I was building mail server on my Debian10 by using Postfix, Dovecot and MySQL.
I already got them running.
But I still can't send or receive any mail.
(Postfix shows "exited" though I heard that's just a bug for Debian?)
I check the postqueue, all the mails are there.
And here's the maillog
PHP Code:Feb 7 05:34:02 mylocalhost postfix/qmgr[25507]: fatal: scan_dir_push: open directory deferred/7: Permission denied
Feb 7 05:34:03 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/qmgr pid 25507 exit status 1
Feb 7 05:34:03 mylocalhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/qmgr: bad command startup -- throttling
Feb 7 05:34:39 mylocalhost postfix/cleanup[25515]: fatal: defer: remove 231A01ECCF log: Permission denied
Feb 7 05:34:40 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 25515 exit status 1
Feb 7 05:34:40 mylocalhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/cleanup: bad command startup -- throttling
Feb 7 05:34:41 mylocalhost postfix/cleanup[25516]: fatal: defer: remove 276521ECCF log: Permission denied
Feb 7 05:34:42 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 25516 exit status 1
Feb 7 05:34:54 mylocalhost postfix/master[22985]: warning: master_wakeup_timer_event: service pickup(public/pickup): Resource temporarily unavailable
Feb 7 05:35:03 mylocalhost postfix/qmgr[25520]: fatal: scan_dir_push: open directory deferred/7: Permission denied
Feb 7 05:35:04 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/qmgr pid 25520 exit status 1
Feb 7 05:35:04 mylocalhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/qmgr: bad command startup -- throttling
Feb 7 05:35:19 mylocalhost postfix/anvil[25494]: statistics: max connection rate 1/60s for (smtp:2607:f8b0:4864:20::329) at Feb 7 05:33:31
Feb 7 05:35:19 mylocalhost postfix/anvil[25494]: statistics: max connection count 1 for (smtp:2607:f8b0:4864:20::329) at Feb 7 05:33:31
Feb 7 05:35:19 mylocalhost postfix/anvil[25494]: statistics: max cache size 1 at Feb 7 05:33:31
Feb 7 05:35:41 mylocalhost postfix/cleanup[25528]: fatal: trace: remove 3066D1ECCF log: Permission denied
Feb 7 05:35:42 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 25528 exit status 1
Feb 7 05:35:42 mylocalhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/cleanup: bad command startup -- throttling
Feb 7 05:35:43 mylocalhost postfix/cleanup[25529]: fatal: trace: remove 34DCA1ECCF log: Permission denied
Feb 7 05:35:44 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 25529 exit status 1
Feb 7 05:35:54 mylocalhost postfix/master[22985]: warning: master_wakeup_timer_event: service pickup(public/pickup): Resource temporarily unavailable
My /etc/postfix/main.cf
PHP Code:# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/letsencrypt/live/mydomain.com/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mydomain.com/privkey.pem
smtpd_use_tls=yes
smtpd_tls_auth_only = yes
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
# Authentication
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
# Restrictions
smtpd_helo_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_helo_hostname,
reject_non_fqdn_helo_hostname
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_unlisted_recipient,
reject_unauth_destination
smtpd_sender_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_sender,
reject_unknown_sender_domain
smtpd_relay_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
defer_unauth_destination
# Milter configuration
milter_default_action = accept
milter_protocol = 6
smtpd_milters = local:/opendkim/opendkim.sock
non_smtpd_milters = $smtpd_milters
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydomain = mydomain.com
myorigin = $mydomain
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# Handing off local delivery to Dovecot's LMTP, and telling it where to store mail
virtual_transport = lmtp:unix:private/dovecot-lmtp
# Virtual domains, users, and aliases
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,
mysql:/etc/postfix/mysql-virtual-email2email.cf
# Even more Restrictions and MTA params
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
#smtpd_etrn_restrictions = reject
#smtpd_reject_unlisted_sender = yes
#smtpd_reject_unlisted_recipient = yes
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtp_always_send_ehlo = yes
#smtpd_hard_error_limit = 1
smtpd_timeout = 30s
smtp_helo_timeout = 15s
smtp_rcpt_timeout = 15s
smtpd_recipient_limit = 40
minimal_backoff_time = 180s
maximal_backoff_time = 3h
# Reply Rejection Codesinvalid_hostname_reject_code = 550
non_fqdn_reject_code = 550
unknown_address_reject_code = 550
unknown_client_reject_code = 550
unknown_hostname_reject_code = 550
unverified_recipient_reject_code = 550
unverified_sender_reject_code = 550
Can someone please help me out? Thanks!:cry:


I was building mail server on my Debian10 by using Postfix, Dovecot and MySQL.
I already got them running.
But I still can't send or receive any mail.
(Postfix shows "exited" though I heard that's just a bug for Debian?)
I check the postqueue, all the mails are there.
And here's the maillog
PHP Code:Feb 7 05:34:02 mylocalhost postfix/qmgr[25507]: fatal: scan_dir_push: open directory deferred/7: Permission denied
Feb 7 05:34:03 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/qmgr pid 25507 exit status 1
Feb 7 05:34:03 mylocalhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/qmgr: bad command startup -- throttling
Feb 7 05:34:39 mylocalhost postfix/cleanup[25515]: fatal: defer: remove 231A01ECCF log: Permission denied
Feb 7 05:34:40 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 25515 exit status 1
Feb 7 05:34:40 mylocalhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/cleanup: bad command startup -- throttling
Feb 7 05:34:41 mylocalhost postfix/cleanup[25516]: fatal: defer: remove 276521ECCF log: Permission denied
Feb 7 05:34:42 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 25516 exit status 1
Feb 7 05:34:54 mylocalhost postfix/master[22985]: warning: master_wakeup_timer_event: service pickup(public/pickup): Resource temporarily unavailable
Feb 7 05:35:03 mylocalhost postfix/qmgr[25520]: fatal: scan_dir_push: open directory deferred/7: Permission denied
Feb 7 05:35:04 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/qmgr pid 25520 exit status 1
Feb 7 05:35:04 mylocalhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/qmgr: bad command startup -- throttling
Feb 7 05:35:19 mylocalhost postfix/anvil[25494]: statistics: max connection rate 1/60s for (smtp:2607:f8b0:4864:20::329) at Feb 7 05:33:31
Feb 7 05:35:19 mylocalhost postfix/anvil[25494]: statistics: max connection count 1 for (smtp:2607:f8b0:4864:20::329) at Feb 7 05:33:31
Feb 7 05:35:19 mylocalhost postfix/anvil[25494]: statistics: max cache size 1 at Feb 7 05:33:31
Feb 7 05:35:41 mylocalhost postfix/cleanup[25528]: fatal: trace: remove 3066D1ECCF log: Permission denied
Feb 7 05:35:42 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 25528 exit status 1
Feb 7 05:35:42 mylocalhost postfix/master[22985]: warning: /usr/lib/postfix/sbin/cleanup: bad command startup -- throttling
Feb 7 05:35:43 mylocalhost postfix/cleanup[25529]: fatal: trace: remove 34DCA1ECCF log: Permission denied
Feb 7 05:35:44 mylocalhost postfix/master[22985]: warning: process /usr/lib/postfix/sbin/cleanup pid 25529 exit status 1
Feb 7 05:35:54 mylocalhost postfix/master[22985]: warning: master_wakeup_timer_event: service pickup(public/pickup): Resource temporarily unavailable
My /etc/postfix/main.cf
PHP Code:# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/letsencrypt/live/mydomain.com/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mydomain.com/privkey.pem
smtpd_use_tls=yes
smtpd_tls_auth_only = yes
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
# Authentication
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
# Restrictions
smtpd_helo_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_helo_hostname,
reject_non_fqdn_helo_hostname
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_unlisted_recipient,
reject_unauth_destination
smtpd_sender_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_sender,
reject_unknown_sender_domain
smtpd_relay_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
defer_unauth_destination
# Milter configuration
milter_default_action = accept
milter_protocol = 6
smtpd_milters = local:/opendkim/opendkim.sock
non_smtpd_milters = $smtpd_milters
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydomain = mydomain.com
myorigin = $mydomain
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# Handing off local delivery to Dovecot's LMTP, and telling it where to store mail
virtual_transport = lmtp:unix:private/dovecot-lmtp
# Virtual domains, users, and aliases
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,
mysql:/etc/postfix/mysql-virtual-email2email.cf
# Even more Restrictions and MTA params
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
#smtpd_etrn_restrictions = reject
#smtpd_reject_unlisted_sender = yes
#smtpd_reject_unlisted_recipient = yes
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtp_always_send_ehlo = yes
#smtpd_hard_error_limit = 1
smtpd_timeout = 30s
smtp_helo_timeout = 15s
smtp_rcpt_timeout = 15s
smtpd_recipient_limit = 40
minimal_backoff_time = 180s
maximal_backoff_time = 3h
# Reply Rejection Codesinvalid_hostname_reject_code = 550
non_fqdn_reject_code = 550
unknown_address_reject_code = 550
unknown_client_reject_code = 550
unknown_hostname_reject_code = 550
unverified_recipient_reject_code = 550
unverified_sender_reject_code = 550
Can someone please help me out? Thanks!:cry: