<div dir="ltr"><div>Hello,<br></div><div><br></div><div>here is postoconf -nf</div><br><div>alias_database = hash:/etc/postfix/aliases<br>alias_maps = hash:/etc/postfix/aliases<br>biff = no<br>body_checks = regexp:/etc/postfix/body_checks<br>broken_sasl_auth_clients = yes<br>command_directory = /usr/sbin<br>compatibility_level = 3.6<br>daemon_directory = /usr/libexec/postfix<br>data_directory = /var/lib/postfix<br>disable_vrfy_command = yes<br>dovecot_destination_recipient_limit = 1<br>enable_long_queue_ids = no<br>html_directory = no<br>inet_interfaces = all<br>inet_protocols = ipv4 ipv6<br>mail_owner = postfix<br>mailbox_size_limit = 0<br>mailq_path = /usr/bin/mailq<br>manpage_directory = /usr/local/man<br>message_size_limit = 51200000<br>meta_directory = /etc/postfix<br>milter_default_action = accept<br>milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}<br>milter_protocol = 6<br>myhostname = <a href="http://mail.domain.com">mail.domain.com</a><br>mynetworks = <a href="http://127.0.0.0/8">127.0.0.0/8</a> [::ffff:127.0.0.0]/104 [::1]/128<br>newaliases_path = /usr/bin/newaliases<br>non_smtpd_milters = $smtpd_milters<br>proxy_read_maps = $local_recipient_maps $virtual_alias_maps<br>    $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains<br>    $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps<br>    $recipient_canonical_maps $relocated_maps transport_maps $mynetworks<br>queue_directory = /var/spool/postfix<br>readme_directory = no<br>receive_override_options = no_address_mappings<br>recipient_delimiter = +<br>relay_recipient_maps = proxy:mysql:/etc/postfix/<a href="http://mysql_virtual_alias_maps.cf">mysql_virtual_alias_maps.cf</a><br>sample_directory = /etc/postfix<br>sendmail_path = /usr/sbin/sendmail<br>setgid_group = postdrop<br>shlib_directory = no<br>smtp_enforce_tls = yes<br>smtp_sasl_security_options = noanonymous<br>smtp_tls_cert_file = /etc/dehydrated/certs/<a href="http://domain.com/fullchain.pem">domain.com/fullchain.pem</a><br>smtp_tls_key_file = /etc/dehydrated/certs/<a href="http://domain.com/privkey.pem">domain.com/privkey.pem</a><br>smtp_tls_security_level = may<br>smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache<br>smtp_use_tls = yes<br>smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)<br>smtpd_client_restrictions = cidr:/etc/postfix/cidr_client_access, permit<br>smtpd_delay_reject = yes<br>smtpd_discard_ehlo_keyword_address_maps = cidr:/etc/postfix/esmtp_access<br>smtpd_helo_required = yes<br>smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated,<br>    check_helo_access hash:/etc/postfix/helo_checks, permit<br>smtpd_milters = unix:/var/run/rspamd/milter.sock<br>smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,<br>    reject_unauth_destination, check_helo_access hash:/etc/postfix/helo_checks,<br>    check_sender_access hash:/etc/postfix/helo_checks, check_recipient_access<br>    pcre:/etc/postfix/recipient_checks.pcre, reject_invalid_hostname,<br>    reject_unverified_recipient, reject_unauth_pipelining,<br>    reject_unknown_sender_domain, reject_unknown_recipient_domain,<br>    reject_unlisted_sender, reject_unauth_destination, reject_non_fqdn_hostname,<br>    reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_rbl_client<br>    <a href="http://cbl.abuseat.org">cbl.abuseat.org</a>, reject_rbl_client <a href="http://dnsbl-1.uceprotect.net">dnsbl-1.uceprotect.net</a>, reject_rbl_client<br>    <a href="http://bl.spamcop.net">bl.spamcop.net</a>, reject_rbl_client <a href="http://iadb.isipp.com">iadb.isipp.com</a>, reject_rbl_client<br>    <a href="http://dnsbl.sorbs.net">dnsbl.sorbs.net</a>, reject_rbl_client <a href="http://plus.bondedsender.org">plus.bondedsender.org</a>, permit<br>smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated<br>    defer_unauth_destination<br>smtpd_sasl_auth_enable = yes<br>smtpd_sasl_authenticated_header = yes<br>smtpd_sasl_exceptions_networks = !<a href="http://127.0.0.0/8">127.0.0.0/8</a> ![::ffff:127.0.0.0]/104 ![::1]/128<br>smtpd_sasl_path = private/auth<br>smtpd_sasl_security_options = noanonymous<br>smtpd_sasl_tls_security_options = noanonymous<br>smtpd_sasl_type = dovecot<br>smtpd_tls_auth_only = yes<br>smtpd_tls_cert_file = /etc/dehydrated/certs/<a href="http://domain.com/fullchain.pem">domain.com/fullchain.pem</a><br>smtpd_tls_dh1024_param_file = /etc/postfix/ssl/dhparams.pem<br>smtpd_tls_key_file = /etc/dehydrated/certs/<a href="http://domain.com/privkey.pem">domain.com/privkey.pem</a><br>smtpd_tls_loglevel = 1<br>smtpd_tls_mandatory_ciphers = medium<br>smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1<br>smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1<br>smtpd_tls_received_header = yes<br>smtpd_tls_security_level = may<br>smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache<br>smtpd_use_tls = yes<br>strict_rfc821_envelopes = yes<br>tls_medium_cipherlist =<br>    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<br>tls_preempt_cipherlist = no<br>virtual_alias_maps = proxy:mysql:/etc/postfix/<a href="http://mysql_virtual_alias_maps.cf">mysql_virtual_alias_maps.cf</a><br>virtual_gid_maps = static:1001<br>virtual_mailbox_base = /var/spool/postmail<br>virtual_mailbox_domains = proxy:mysql:/etc/postfix/<a href="http://mysql_virtual_domains_maps.cf">mysql_virtual_domains_maps.cf</a><br>virtual_mailbox_maps = proxy:mysql:/etc/postfix/<a href="http://mysql_virtual_mailbox_maps.cf">mysql_virtual_mailbox_maps.cf</a><br>virtual_transport = lmtp:unix:private/dovecot-lmtp<br>virtual_uid_maps = static:1002</div><div><br></div><div>and aslo here alias conf <span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><a href="http://mysql_virtual_alias_maps.cf">mysql_virtual_alias_maps.cf</a>
</span></span>:<span style="font-family:monospace"><br>user = postfix
<br>password = postfix<br>hosts = localhost
<br>dbname = postfix
<br>query = SELECT goto FROM alias WHERE address='%s' AND active = '1'<br>
<br></span></div><div><span style="font-family:monospace">and here is the test:</span></div><div><span style="font-family:monospace"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">$ postmap -q <a href="mailto:to_alias@domain.com">to_alias@domain.com</a> mysql:/etc/postfix/<a href="http://mysql_virtual_alias_maps.cf">mysql_virtual_alias_maps.cf</a>
</span><br>to@<span style="font-family:monospace"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><a href="http://domain.com">domain.com</a></span></span></span><br><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:monospace">Have a great weekend,</span></span></div><div><span style="font-family:monospace"><span style="font-family:monospace">Chris<br></span></span></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">На сб, 9.04.2022 г. в 17:42 ч. Benny Pedersen <<a href="mailto:me@junc.eu">me@junc.eu</a>> написа:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2022-04-09 16:20, John Doe wrote:<br>
<br>
> I have the problem with aliases. The emails did not delivery to<br>
> correct email. I send email to email: <a href="mailto:to_alias@domain.com" target="_blank">to_alias@domain.com</a> that is<br>
> valid alias and email should be sent to real email folder:<br>
> <a href="mailto:to@domain.com" target="_blank">to@domain.com</a>. Dovecot creating to_alias folder and deliver the emails<br>
> there. Here is the email log: / did not see <a href="mailto:to@domain.com" target="_blank">to@domain.com</a> below /<br>
<br>
its not a dovecot problem, problem is solved in postfix to expand alias <br>
before sending to dovecot<br>
<br>
postconf -nf for more help here or on postfix-maillist<br>
<br>
#me2too aswell mis that dovecot could expand alias on its own, specially <br>
usefull for dovecot quotas<br>
</blockquote></div>