I have been working on this for 2 days now and am desperate for some help.
Postfix & Dovecot
CentOS Linux release 7.9.2009
Plesk 18.0.50
For the most part emails are flowing into the server correctly - however I have an odd scenario where some emails that come through our external spam filter and flow through an account that's a forward or an alias, they do not actually end up in the users mailbox.
This is an example of one of the emails I have traced this morning:
From Mail Assure Spam Filter Log
1pZZdb-0002Mt-IH
myolddomain.com
2023-03-07 07:54
[email protected]
luke
allowlisted
INTERAC e-Transfer: LUKE PITTMAN cancelled the money transfer sent to you.
delivered
The columns for the data above should be rather obvious, but basically it confirms that my server received the email (delivered) from Mail Assure (the external spam filtering service).
Matching email from /var/log/maillog
Mar 7 07:54:29 server postfix/smtpd[27797]: connect from delivery.mtaroutes.com[185.201.16.200]
Mar 7 07:54:30 server postfix/smtpd[27797]: CB260BC4006B: client=delivery.mtaroutes.com[185.201.16.200]
Mar 7 07:54:31 server postfix/cleanup[28935]: CB260BC4006B: message-id=<248542808.92042284.1678204442900@6ea0c801e2d0>
Mar 7 07:54:31 server postfix/qmgr[14249]: CB260BC4006B: from=<[email protected]>, size=62814, nrcpt=1 (queue active)
Mar 7 07:54:31 server postfix/pipe[28941]: CB260BC4006B: to=<[email protected]>, relay=plesk_virtual, delay=0.67, delays=0.63/0/0/0.04, dsn=2.0.0, status=sent (delivered via plesk_virtual service)
Mar 7 07:54:31 server postfix/qmgr[14249]: CB260BC4006B: removed
Mar 7 07:54:31 server postfix/smtpd[27797]: disconnect from delivery.mtaroutes.com[185.201.16.200] ehlo=2 starttls=1 mail=1 rcpt=1 bdat=2 quit=1 commands=8
But that's it... the email does not end up in the mailbox (anywhere, inbox, spam folders, etc)
-bash-4.2# cd /var/qmail/mailnames/mynewdomain.com/luke
-bash-4.2# grep -R CB260BC4006B ./*
-bash-4.2#
I also ran back to the root directory and ran the same command with no results as well, so it's literally nowhere to be found on the server.
To prove to myself that the above command does work when finding an email, I ran it on an email that actually went through:
-bash-4.2# grep -R 134D4BC4006F ./*
./Maildir/cur/1678205924.M212491P6629.server.mydomain.com,S=7790,W=7925:2,: id 134D4BC4006F; Tue, 7 Mar 2023 08:18:44 -0800 (PST)
To add to the confusion - when I remove the external spam filter from the loop, the above emails have exactly the same results in the log files, but the emails actually show up in the mailbox. This tells me the spam filter is adding some header (or something) that is triggering the plesk_virtual mail system to drop the email. Or something.
But this is where I've reached the limit of my server administration knowledge and would love some direction.
Edit.
-bash-4.2# postconf -n
alias_maps = hash:/etc/aliases, nis:mail.aliases, hash:/var/spool/postfix/plesk/aliases
authorized_flush_users =
authorized_mailq_users =
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = yes
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_size_limit = 0
mailman_destination_recipient_limit = 1
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 51200000
meta_directory = /etc/postfix
mydestination = localhost.$mydomain, localhost, localhost.localdomain
mynetworks =
newaliases_path = /usr/bin/newaliases.postfix
plesk_virtual_destination_recipient_limit = 1
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-3.5.14/README_FILES
recipient_canonical_classes = envelope_recipient,header_recipient
recipient_canonical_maps = tcp:127.0.0.1:12346
recipient_delimiter =
sample_directory = /usr/share/doc/postfix-3.5.14/samples
sender_dependent_default_transport_maps = hash:/var/spool/postfix/plesk/sdd_transport_maps
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_send_xforward_command = yes
smtp_tls_security_level = may
smtp_use_tls = no
smtpd_authorized_xforward_hosts = 127.0.0.0/8 [::1]/128
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_milters = inet:127.0.0.1:12768
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated
smtpd_tls_cert_file = /etc/postfix/postfix.pem
smtpd_tls_ciphers = medium
smtpd_tls_dh1024_param_file = /usr/local/psa/etc/dhparams2048.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_mandatory_protocols = TLSv1.2
smtpd_tls_protocols = TLSv1.2
smtpd_tls_security_level = may
smtpd_use_tls = yes
smtputf8_enable = no
tls_medium_cipherlist = 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
tls_preempt_cipherlist = yes
tls_server_sni_maps = hash:/var/spool/postfix/plesk/certs
tls_ssl_options = no_compression
transport_maps = , hash:/var/spool/postfix/plesk/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
virtual_gid_maps = static:30
virtual_mailbox_base = /var/qmail/mailnames
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_mailbox_limit = 0
virtual_mailbox_maps = , hash:/var/spool/postfix/plesk/vmailbox
virtual_transport = plesk_virtual
virtual_uid_maps = static:30
-bash-4.2# postconf -M
smtp inet n - n - - smtpd
cleanup unix n - n - 0 cleanup
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp -o syslog_name=postfix/$service_name
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
postlog unix-dgram n - n - 1 postlogd
plesk_virtual unix - n n - - pipe flags=DORhu user=popuser:popuser argv=/usr/lib64/plesk-9.0/postfix-local -f ${sender} -d ${recipient} -p /var/qmail/mailnames -q ${queue_id}
127.0.0.1:12346 inet n n n - - spawn user=popuser:popuser argv=/usr/lib64/plesk-9.0/postfix-srs
mailman unix - n n - - pipe flags=R user=mailman:mailman argv=/usr/lib64/plesk-9.0/postfix-mailman ${nexthop} ${user} ${recipient}
pickup fifo n - n 60 1 pickup
qmgr fifo n - n 1 1 qmgr
smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes
submission inet n - n - - smtpd -o smtpd_enforce_tls=yes -o smtpd_tls_security_level=may -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
plesk_saslauthd unix y y n - 1 plesk_saslauthd status=5 listen=6 dbpath=/var/spool/postfix/plesk/passwd.db
plesk-158.69.12.128- unix - - n - - smtp -o smtp_bind_address=158.69.12.128 -o smtp_bind_address6= -o smtp_address_preference=ipv4
plesk-54.39.48.83- unix - - n - - smtp -o smtp_bind_address=54.39.48.83 -o smtp_bind_address6= -o smtp_address_preference=ipv4
-bash-4.2#
plex_virtual
service points in this direction as well. And you don't give us any actual configuration to go on from anyway.main.cf
is the most important file when it comes to postfix delivery configuration.