-1

I'm running Postfix, Dovecot and Amavis on Debian. Somehow an email from a colleague wasn't delivered and I started to search the logs.

Here is what I've found. I don't know where the problem is.

  • My domain: mydomain.com
  • Sender: name.name@foreigndomain.com
  • Receiver: me@mydomain.com (alias for the mail address: mk@mydomain.com)

Log:

Dec 22 12:50:38 mail postfix/smtpd[30263]: connect from localhost[127.0.0.1]
Dec 22 12:50:38 mail postfix/smtpd[30263]: 9FFCD1682106: client=localhost[127.0.0.1]
Dec 22 12:50:38 mail postfix/cleanup[30259]: 9FFCD1682106: message-id=<4a3578f1b5824ec881e8936b8be7385d@mail.foreigndomain.com>
Dec 22 12:50:38 mail postfix/smtpd[30263]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Dec 22 12:50:38 mail postfix/qmgr[1138]: 9FFCD1682106: from=<name.name@foreigndomain.com>, size=36743, nrcpt=1 (queue active)
Dec 22 12:50:38 mail amavis[29079]: (29079-02) Passed CLEAN {RelayedInbound}, [127.0.0.1] [90.xx.xx.xx] <name.name@foreigndomain.com> -> <me@mydomain.com>, Message-ID: <4a3578f1b5824ec881e8936b8be7385d@mail.foreigndomain.com>, mail_id: 3WR65-x-uRfu, Hits: 0.002, size: 36262, queued_as: 9FFCD1682106, 1089 ms
Dec 22 12:50:38 mail postfix/lmtp[30260]: 80C6F1682101: to=<me@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=6.3, delays=5.1/0.02/0.04/1.1, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9FFCD1682106)
Dec 22 12:50:38 mail postfix/qmgr[1138]: 80C6F1682101: removed
Dec 22 12:50:38 mail dovecot: lmtp(30265): Connect from local
Dec 22 12:50:38 mail dovecot: lmtp(mk@mydomain.com)<30265><ZzG0K47d4V85dgAAz+uO0w>: sieve: msgid=<4a3578f1b5824ec881e8936b8be7385d@mail.foreigndomain.com>: stored mail into mailbox 'INBOX'
Dec 22 12:50:38 mail postfix/lmtp[30260]: 9FFCD1682106: to=<mk@mydomain.com>, orig_to=<me@mydomain.com>, relay=mail.mydomain.com[private/dovecot-lmtp], delay=0.22, delays=0.02/0.04/0.02/0.14, dsn=2.0.0, status=sent (250 2.0.0 <mk@mydomain.com> ZzG0K47d4V85dgAAz+uO0w Saved)
Dec 22 12:50:38 mail postfix/qmgr[1138]: 9FFCD1682106: removed
Dec 22 12:50:38 mail dovecot: lmtp(30265): Disconnect from local: Client has quit the connection (state=READY)

Does anyone have an explanation or solution for this problem?

Thanks!

postconf:

postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
address_verify_negative_refresh_time = 60s
address_verify_sender_ttl = 15686s
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
append_dot_mydomain = no
biff = no
body_checks = regexp:/etc/postfix/body_checks
broken_sasl_auth_clients = yes
compatibility_level = 2
content_filter = lmtp:[127.0.0.1]:10024
dovecot_destination_recipient_limit = 1
enable_original_recipient = no
greylisting = check_policy_service inet:127.0.0.1:10023
header_checks = regexp:/etc/postfix/header_checks
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
message_size_limit = 0
mime_header_checks = regexp:/etc/postfix/mime_header_checks
mydestination = mail.mydomain.com, xxxxx.contaboserver.net, localhost, localhost.localdomain
myhostname = mail.mydomain.com
mynetworks = 127.0.0.0/8 [::1]/128
myorigin = /etc/mailname
nested_header_checks = regexp:/etc/postfix/nested_header_checks
owner_request_special = no
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virt                                                                                                                     ual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $r                                                                                                                     ecipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps $virtual_uid_maps $virtual_                                                                                                                     gid_maps $smtpd_client_restrictions $smtpd_sender_restrictions $smtpd_recipient_restrictions
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
relay_domains = proxy:mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = proxy:mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
relayhost =
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf
smtp_dns_support_level = dnssec
smtp_tls_exclude_ciphers = RC4, aNULL
smtp_tls_protocols = !SSLv2,!SSLv3
smtp_tls_security_level = dane
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_message_rate_limit = 100
smtpd_client_restrictions = check_client_access proxy:mysql:/etc/postfix/mysql-virtual_client.cf, permit_inet_interfaces                                                                                                                     , permit_mynetworks, reject_rbl_client zen.spamhaus.org, permit_sasl_authenticated, reject_unauth_pipelining , permit
smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, reject_multi_recipient_bounce, permit
smtpd_etrn_restrictions = permit_mynetworks, reject
smtpd_forbidden_commands = CONNECT,GET,POST,USER,PASS
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_invalid_helo_hostname, permit_mynetworks, check_helo_access regexp:/etc/postfix/helo_ac                                                                                                                     cess, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, check_helo_access regexp:/etc/postfix/blacklist_helo, ,r                                                                                                                     eject_unknown_helo_hostname, permit
smtpd_recipient_restrictions = permit_mynetworks, reject_unknown_recipient_domain, reject_unlisted_recipient, check_reci                                                                                                                     pient_access proxy:mysql:/etc/postfix/mysql-verify_recipients.cf, permit_sasl_authenticated, reject_non_fqdn_recipient,                                                                                                                      reject_unauth_destination, check_recipient_access proxy:mysql:/etc/postfix/mysql-virtual_recipient.cf, check_recipient_a                                                                                                                     ccess mysql:/etc/postfix/mysql-virtual_policy_greylist.cf, check_policy_service unix:private/quota-status
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_restriction_classes = greylisting
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_sender_login_maps.cf
smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, permit_sas                                                                                                                     l_authenticated, reject_non_fqdn_sender, check_sender_access regexp:/etc/postfix/tag_as_foreign.re, check_sender_access                                                                                                                      proxy:mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_exclude_ciphers = RC4, aNULL
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RS                                                                                                                     A-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-G                                                                                                                     CM-SHA384
tls_preempt_cipherlist = no
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_alias_domains = proxy:mysql:/etc/postfix/mysql-virtual_alias_domains.cf
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,                                                                                                                      proxy:mysql:/etc/postfix/mysql-virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = proxy:mysql:/etc/postfix/mysql-virtual_gids.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_uid_maps = proxy:mysql:/etc/postfix/mysql-virtual_uids.cf

dovecot:

# 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.4 ()
# OS: Linux 4.19.0-12-amd64 x86_64 Debian 10.7
# Hostname: mail.mydomain.com
auth_mechanisms = plain login
disable_plaintext_auth = no
imap_capability = +SEPCIAL-USE XLIST
listen = *,[::]
lmtp_rcpt_check_quota = yes
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_max_userip_connections = 100
mail_plugins = quota
mail_privileged_group = vmail
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
  separator = .
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  quota = dict:user::file:/var/vmail/%d/%n/.quotausage
  quota_status_nouser = DUNNO
  quota_status_overquota = 552 5.2.2 Mailbox is full
  quota_status_success = DUNNO
  sieve = /var/vmail/%d/%n/.sieve
  sieve_after = /var/vmail/%d/%n/.ispconfig.sieve
  sieve_before = /var/vmail/%d/%n/.ispconfig-before.sieve
  sieve_max_actions = 100
  sieve_max_redirects = 25
  sieve_max_script_size = 2M
}
protocols = imap pop3 lmtp
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
  }
  user = root
}
service imap-login {
  client_limit = 1000
  process_limit = 512
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service quota-status {
  client_limit = 1
  executable = quota-status -p postfix
  unix_listener /var/spool/postfix/private/quota-status {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service stats {
  unix_listener stats-reader {
    group = vmail
    mode = 0660
    user = vmail
  }
  unix_listener stats-writer {
    group = vmail
    mode = 0660
    user = vmail
  }
}
ssl_cert = </etc/postfix/smtpd.cert
ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_min_protocol = TLSv1.2
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol imap {
  auth_verbose = yes
  mail_plugins = quota imap_quota
}
protocol pop3 {
  auth_verbose = yes
  mail_plugins = quota
  pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
  mail_plugins = sieve quota
  postmaster_address = postmaster@xxxxxx.contaboserver.net
}
protocol lmtp {
  mail_plugins = quota sieve
  postmaster_address = postmaster@xxxxxx.contaboserver.net
}
Marcel
  • 1
  • 1
  • see also: [Meta: What information should I include or obfuscate in my posts?](https://meta.serverfault.com/questions/963/what-information-should-i-include-or-obfuscate-in-my-posts/6063#6063) which helps both with composing good questions and keeping the spam filter of *Server Fault* at bay. – anx Dec 24 '20 at 09:33
  • 4
    You ask about a mail that *"wasn't delivered"* but those logs are about a message that (as dovecot confirms) *was delivered* to your `INBOX` folder (though not telling the story what you or your mail client then proceeded to do with it). Please [edit] your question to clarify. – anx Dec 24 '20 at 09:39
  • add to the dovecot config `mail_debug = yes` and `debug_log_path = /var/log/dovecot/dovecot-debug.log` and watch the logs. it should now tell you where it stores the mails – Max Muster Dec 27 '20 at 06:58

1 Answers1

0

the Email was removed from the the que.

qmgr (that is the mail queue) qmgr = daemon manages the Postfix queues.

enter image description here

line Nr. 8 and line nr. 12 are confusing youprobably,
As you can see in line 10 it goes to the inbox. In line 12 it removes it from the que.

if you have some other application deleting it from there is another story. But anyway dovecot placed it in the Inbox.

Max Muster
  • 337
  • 2
  • 6
  • 27
  • Thanks for the explanation. I have only one client and the email was never shown in the Inbox. The client only moves the spam to tue junk folder. – Marcel Dec 25 '20 at 13:25
  • then update your question with a `postconf -n` and a `dovecot -n` I will take a look. – Max Muster Dec 25 '20 at 13:28
  • Where do you store the mail ? In Dovecot.there should be something like `mail_location = maildir:~/mail:LAYOUT=fs:INBOX=/var/vmail/%u/mail` – Max Muster Dec 27 '20 at 06:41
  • Your mail has been delivered, but hwo knows where ? Prolly the delivery system has delivered the mail to another folder that the one you consider to be INBOX – Max Muster Dec 27 '20 at 06:46
  • the mail dir is mentioned in the plugin section. Normally all emails are correctly delivered to their folders /var/vmail/%d/%n/ – Marcel Dec 27 '20 at 11:03