In order to follow the guidelines, here's the postconf -n output: alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes default_destination_concurrency_limit = 10 default_destination_recipient_limit = 100 default_process_limit = 50 inet_protocols = ipv4 insiders_bind = yes insiders_bind_dn = cn=admin,dc=domain,dc=root insiders_bind_pw = ****** insiders_query_filter = (|(&(mail=%s)(externalmail=local_only))(&(uid=%u)(externalmail=local_only))) insiders_result_attribute = externalmail insiders_search_base = dc=root insiders_server_host = ldap.domain.com local_destination_concurrency_limit = 1 local_only = check_recipient_access hash:/etc/postfix/local_domains, reject local_recipient_maps = mailbox_command = /usr/bin/procmail -a "$EXTENSION" mailbox_size_limit = 10000000000 message_size_limit = 20971520 mydestination = localhost mydomain = domain.com myhostname = mailbackend1 mynetworks = 127.0.0.0/8 192.168.2.0/24 myorigin = domain.com readme_directory = no recipient_delimiter = + smtp_helo_name = mail.domain.com smtp_host_lookup = dns, native smtp_sasl_auth_enable = no smtp_tls_security_level = may smtpd_banner = mailbackend1 smtpd_hard_error_limit = ${stress?5}${stress:20} smtpd_junk_command_limit = ${stress?1}${stress:100} smtpd_recipient_restrictions = check_sender_access ldap:insiders, check_client_access hash:/etc/postfix/frontends, reject_unauth_destination, reject smtpd_restriction_classes = local_only smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_soft_error_limit = ${stress?2}${stress:10} smtpd_timeout = ${stress?60}${stress:300} uiduser_bind = yes uiduser_bind_dn = cn=admin,dc=domain,dc=root uiduser_bind_pw = ****** uiduser_query_filter = (uid=%u) uiduser_result_attribute = uidNumber uiduser_search_base = dc=root uiduser_server_host = ldap.domain.com uiduser_server_port = 389 valiases_bind = yes valiases_bind_dn = cn=admin,dc=domain,dc=root valiases_bind_pw = ****** valiases_query_filter = (&(mail=%s)(!(mail=pendiente))) valiases_result_attribute = uid valiases_search_base = dc=root valiases_server_host = ldap.domain.com valiases_server_port = 389 valiases_version = 3 virtual_alias_maps = ldap:valiases virtual_gid_maps = static:10000 virtual_mailbox_base = /home/vmail virtual_mailbox_domains = domain.com virtual_mailbox_maps = ldap:vmailbox virtual_minimum_uid = 10000 virtual_transport = local virtual_uid_maps = ldap:uiduser vmailbox_bind = yes vmailbox_bind_dn = cn=admin,dc=domain,dc=root vmailbox_bind_pw = ****** vmailbox_query_filter = (uid=%u) vmailbox_result_attribute = uid vmailbox_result_format = %s/Maildir/ vmailbox_search_base = dc=root vmailbox_server_host = ldap.domain.com vmailbox_server_port = 389
On Wed, Apr 6, 2022 at 8:34 AM Tan Mientras <tanimient...@gmail.com> wrote: > Hi > > We are migrating an old Debian 6 Postfix smarthost/relay server to a new > one, just copying the configuration files and some other files to a fresh > Ubuntu 20.04 system. > > For some reason, in the new environment, *mail is being delivered to > /var/mail/user instead of Maildir (/home/vmail/user/Maildir).*(While > debian 6 is working correctly) > Any suggestion or fix for the config file would be much appreciated. > > Here's the main.cf: > myorigin = domain.com > myhostname= mailbackend1 > mydomain = domain.com > smtpd_banner = mailbackend1 > > 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 > > #TLS parameters > smtp_tls_security_level = may > #smtp_tls_wrappermode = yes > > inet_protocols = ipv4 > > readme_directory = no > smtp_helo_name = mail.domain.com > smtp_host_lookup = dns, native > # smtp_bind_address = 192.168.2.111 > > alias_maps = hash:/etc/aliases > alias_database = hash:/etc/aliases > > virtual_alias_maps = ldap:valiases > valiases_server_host = ldap.domain.com > valiases_server_port = 389 > valiases_bind = yes > valiases_bind_dn = cn=admin,dc=domain,dc=root > valiases_bind_pw = ****** > valiases_search_base = dc=root > valiases_query_filter = (&(mail=%s)(!(mail=pendiente))) > valiases_result_attribute = uid > valiases_version = 3 > > ##virtual_mailbox_domains = domain.es, domain.com > virtual_mailbox_domains = domain.com > virtual_mailbox_base = /home/vmail > > virtual_transport = local > ##mailbox_transport = local > > # local_transport = > mailbox_command = /usr/bin/procmail -a "$EXTENSION" > #mailbox_command = /usr/bin/ionice -c 2 -n 7 /usr/bin/procmail -a > "$EXTENSION" > > > virtual_minimum_uid = 10000 > virtual_uid_maps = ldap:uiduser > # virtual_uid_maps = static:10000 > virtual_gid_maps = static:10000 > # maildrop_destination_recipient_limit = 1 > # maildrop_destination_concurrency_limit = 2 > virtual_mailbox_maps = ldap:vmailbox > > # Cuotas > #limite_server_host = localhost > #limite_server_port = 389 > #limite_bind = yes > #limite_bind_dn = cn=admin,dc=domain,dc=root > #limite_bind_pw = ****** > #limite_search_base = dc=root > #limite_query_filter = (uid=%u) > #limite_result_attribute = quota > > #virtual_mailbox_limit_maps = ldap:limite > #virtual_mailbox_limit_inbox = no > #virtual_create_maildirsize = yes > #virtual_maildir_extended = yes > #virtual_mailbox_limit_override = yes > #virtual_maildir_limit_message = "Quota exceeded." > #virtual_overquota_bounce = yes > > > > vmailbox_server_host = ldap.domain.com > vmailbox_server_port = 389 > vmailbox_bind = yes > vmailbox_bind_dn = cn=admin,dc=domain,dc=root > vmailbox_bind_pw = ****** > vmailbox_search_base = dc=root > vmailbox_query_filter = (uid=%u) > vmailbox_result_attribute = uid > vmailbox_result_format = %s/Maildir/ > > uiduser_server_host = ldap.domain.com > uiduser_server_port = 389 > uiduser_bind = yes > uiduser_bind_dn = cn=admin,dc=domain,dc=root > uiduser_bind_pw = ****** > uiduser_search_base = dc=root > uiduser_query_filter = (uid=%u) > uiduser_result_attribute = uidNumber > > > #procmail > #local_recipient_maps = $virtual_mailbox_maps unix:passwd.byname > $alias_maps > local_recipient_maps = > > local_destination_concurrency_limit = 1 > default_destination_concurrency_limit = 10 > default_destination_recipient_limit = 100 > > # Tunning > default_process_limit = 50 > #local_destination_rate_limit= 2s > #local_destination_concurrency_limit = 1 > #local_destination_recipient_limit = 5 > > > smtpd_timeout = ${stress?60}${stress:300} > smtpd_hard_error_limit = ${stress?5}${stress:20} > smtpd_junk_command_limit = ${stress?1}${stress:100} > # smtpd_client_event_limit_exceptions = 192.168.2.0/24 > smtpd_soft_error_limit = ${stress?2}${stress:10} > > > message_size_limit = 20971520 > mailbox_size_limit = 10000000000 > recipient_delimiter = + > append_dot_mydomain = no > biff = no > > > mynetworks = 127.0.0.0/8 192.168.2.0/24 > > mydestination = localhost > > > insiders_server_host = ldap.domain.com > insiders_search_base = dc=root > insiders_query_filter = > (|(&(mail=%s)(externalmail=local_only))(&(uid=%u)(externalmail=local_only))) > insiders_result_attribute = externalmail > insiders_bind = yes > insiders_bind_dn = cn=admin,dc=domain,dc=root > insiders_bind_pw = ****** > > > # auth > smtp_sasl_auth_enable = no > > smtpd_sasl_auth_enable = yes > broken_sasl_auth_clients = yes > smtpd_sasl_security_options = noanonymous > > smtpd_recipient_restrictions = > check_sender_access ldap:insiders, > check_client_access hash:/etc/postfix/frontends, > reject_unauth_destination, > reject > > > smtpd_restriction_classes = local_only > local_only = check_recipient_access hash:/etc/postfix/local_domains, reject > > > > link: > https://serverfault.com/questions/1097754/mail-is-being-delivered-to-var-mail-user-instead-of-maildir >