Postfix settings for Office365?

Locked
mistvan91
Posts: 16
Joined: Tue 28. Sep 2021, 17:41

Postfix settings for Office365?

Post by mistvan91 »

Hello!

Please help guys!

I wanna use Office 365 on my one domain.

The domain, where I wanne use Office, already moved to Office 365, and e-mail accounts on local server deleted. So i got error: "unknown user in virtual mailbox table"

I want to disable local lookup in postfix, but transport_maps didn't work.

I got this error:

Code: Select all

Sep 28 17:22:19 server postfix/trivial-rewrite[6199]: warning: hash:/etc/postfix/transport is unavailable. open database /etc/postfix/transport.db: No such file or directory
Sep 28 17:22:19 server postfix/trivial-rewrite[6199]: warning: hash:/etc/postfix/transport lookup error for "mail@example.com"
Sep 28 17:22:19 server postfix/trivial-rewrite[6199]: warning: transport_maps lookup failure
Sep 28 17:22:19 server postfix/trivial-rewrite[6199]: warning: hash:/etc/postfix/transport is unavailable. open database /etc/postfix/transport.db: No such file or directory
Sep 28 17:22:19 server postfix/trivial-rewrite[6199]: warning: hash:/etc/postfix/transport lookup error for "mail_to@example.com"
Sep 28 17:22:19 server postfix/trivial-rewrite[6199]: warning: transport_maps lookup failure
Sep 28 17:22:19 server postfix/smtpd[6217]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.0 <mail_to@example.com>: Temporary lookup failure; from=<mail@example.com> to=<mail_to@example.com> proto=ESMTP helo=<example.com>
Sep 28 17:22:19 server postfix/smtpd[6217]: disconnect from localhost[127.0.0.1] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 quit=1 commands=6/7
Any ideas how to solve this issue?

postconf -n:

Code: Select all

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
content_filter = amavis:127.0.0.1:10024
header_checks = regexp:/etc/postfix/header_checks
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 0
mailbox_transport = dovecot
message_size_limit = 36700160
milter_default_action = accept
milter_protocol = 6
mydestination = localhost, $myhostname
myhostname = xyzserver.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
non_smtpd_milters = inet:127.0.0.1:12345
readme_directory = no
recipient_delimiter = +
relay_domains =
relayhost =
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_ciphers = medium
smtp_tls_exclude_ciphers = RC4, 3DES, aNULL
smtp_tls_mandatory_ciphers = high
smtp_tls_mandatory_protocols = !SSLv2 !SSLv3 !TLSv1 !TLSv1.1
smtp_tls_protocols = !SSLv2 !SSLv3 !TLSv1 !TLSv1.1
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_multi_recipient_bounce, reject_unauth_destination
smtpd_error_sleep_time = 10s
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_non_fqdn_hostname
smtpd_milters = inet:127.0.0.1:12345
smtpd_recipient_limit = 50
smtpd_recipient_overshoot_limit = 50
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unauth_pipelining, reject_non_fqdn_recipient, check_policy_service unix:private/policy
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unauth_destination, reject_unknown_sender_domain, reject_unknown_client, reject_non_fqdn_hostname
smtpd_soft_error_limit = 5
smtpd_tls_CAfile = /etc/ssl/keyhelp/mail-ca.crt
smtpd_tls_CApath = /etc/ssl/certs
smtpd_tls_cert_file = /etc/ssl/keyhelp/mail.pem
smtpd_tls_ciphers = medium
smtpd_tls_dh1024_param_file = /etc/postfix/dh2048.pem
smtpd_tls_dh512_param_file = /etc/postfix/dh512.pem
smtpd_tls_eecdh_grade = ultra
smtpd_tls_exclude_ciphers = RC4, 3DES, aNULL
smtpd_tls_key_file = /etc/ssl/keyhelp/mail.pem
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = !SSLv2 !SSLv3 !TLSv1 !TLSv1.1
smtpd_tls_protocols = !SSLv2 !SSLv3 !TLSv1 !TLSv1.1
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_eecdh_strong_curve = prime256v1
tls_eecdh_ultra_curve = secp384r1
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 = no
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
- Istvan
User avatar
Tobi
Community Moderator
Posts: 2812
Joined: Thu 5. Jan 2017, 13:24

Re: Postfix settings for Office365?

Post by Tobi »

There is a switch for „disable local DNS“ in the domain details.
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
User avatar
Florian
Keyweb AG
Posts: 1243
Joined: Wed 20. Jan 2016, 02:28

Re: Postfix settings for Office365?

Post by Florian »

Hallo,

you must also disable the mail services for this domain in Keyhelp
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
mistvan91
Posts: 16
Joined: Tue 28. Sep 2021, 17:41

Re: Postfix settings for Office365?

Post by mistvan91 »

I missed that, thank you. I never changed domain details with super admin account, this is why I didn't see that.
Locked