Hi all. Here is my postfix config.....of course with domains and ip changed.
I had a look also on the ldap section and given what are the reccommandation here (http://www.postfix.org/LDAP_README.html#config) it seems to be that ldap queries when we received an unknow user with a different domain from our main we don\t get an email back. Any thoughts? POSTFINGER output //////////////////////////////////// --System Parameters-- mail_version = 2.10.1 hostname = dovecot uname = Linux dovecot 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux --Packaging information-- looks like this postfix comes from RPM package: postfix-2.10.1-6.el7.x86_64 --main.cf non-default parameters-- alias_maps = hash:/etc/aliases debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 maildrop_destination_recipient_limit = 1 mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man message_size_limit = 26214400 mydomain = mydomain1.com myhostname = smtp.mydomain1.com mynetworks = 127.0.0.0/8 10.10.10.251/32 [::1]/128 [fe80::]/64 10.20.20.20/32 <------------------ IP CHANGED myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES relayhost = [mx2.mydomain1.com] remote_header_rewrite_domain = $mydomain sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix smtpd_banner = mail.mydomain1.com smtpd_client_connection_count_limit = 10 smtpd_client_connection_rate_limit = 60 smtpd_recipient_restrictions = permit_mynetworks,reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject_unauth_destination,check_policy_service inet:localhost:12340 smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_tls_CAfile = $config_directory/ssl/DigiCertCA.crt smtpd_tls_CApath = $config_directory/ssl smtpd_tls_cert_file = $config_directory/ssl/star_mydomain1.com.crt smtpd_tls_key_file = $config_directory/ssl/star_mydomain1.com.key smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_use_tls = yes smtp_fallback_relay = [mx.mydomain1.com] virtual_alias_domains = mydomain1.com pro-mydomain3.com pro-mydomain3.it virtual_alias_maps = regexp:$config_directory/domain_rewriting ldap:$config_directory/ldap-virtual-aliases.cf virtual_mailbox_domains = $config_directory/vdomains.txt virtual_mailbox_maps = regexp:$config_directory/domain_rewriting ldap:$config_directory/ldap-virtual-maps.cf virtual_transport = maildrop --master.cf-- smtp inet n - n - - smtpd 465 inet n - n - - smtpd -o syslog_name=postfix/smtps -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes pickup unix n - n 60 1 pickup cleanup unix n - n - 0 cleanup qmgr unix n - n 300 1 qmgr 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 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 maildrop unix - n n - - pipe flags=ODRhu user=vmail argv=/usr/local/bin/maildrop /etc/maildroprc -d ${user}@${domain} ${extension} ${recipient} ${user} ${nexthop} ${sender} ${mailbox} /////////////////////////////////// On Wed, Apr 18, 2018 at 5:11 PM, Alfredo De Luca <alfredo.del...@gmail.com> wrote: > Thanks guys. I ll provide more info later. > I checked on my configuration and we have the following for the > virtual_mailbox_maps: > > virtual_mailbox_maps = regexp:$config_directory/domain_rewriting > ldap:$config_directory/ldap-virtual-maps.cf > > *<domain_rewriting>* > /^(.*)@mydomain1.com$/ ${1}@mydomain2.it > *</domain_rewriting>* > > > *<ldap-virtual-maps.cf <http://ldap-virtual-maps.cf>>* > server_host = ldap.mydomain2.it > search_base = dc=mydomain2,dc=it > version = 3 > query_filter = mail=%s > result_attribute = homeDirectory > bind_pw = xxxxxxxx > bind_dn = cn=admin,dc=mydomain2,dc=it > *</ldap-virtual-maps.cf <http://ldap-virtual-maps.cf>>* > > > > To me seems to be ok. So if I send an email to not existing user on > mydomain2.it I got an email back, instead if I send one to mydomain1.com > ....nothing. > > Thanks > > > > > On Wed, Apr 18, 2018 at 4:44 PM, /dev/rob0 <r...@gmx.co.uk> wrote: > >> On Wed, Apr 18, 2018 at 04:15:19PM +0200, Alfredo De Luca wrote: >> > We have 2 domain managed by postfix. >> > >> > When I send an email to an not existing user in the first donain I >> > got back an email user unknown... >> >> "User unknown in virtual mailbox table" means the domain was found in >> virtual_mailbox_domains, but the user@domain was NOT found in >> virtual_mailbox_maps. >> >> > ..while if I send it to the second domain I don't >> > receive anything. >> > >> > Any issue/clue on this? >> >> See your logs, and see Angelo's post if you need help with it. >> -- >> http://rob0.nodns4.us/ >> Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: >> > > > > -- > *Alfredo* > > -- *Alfredo*