This is the model;
Office365 (Internal relay) <--> Debian with one domain
I have finaly got it working apart from this;
When sendning mail from Debian --> Office365 I get the following error;
Code: Select all
failed
Status: 5.1.1
Diagnostic-Code: x-unix; user unknown
Sendning mail from Office365 --> Debian
Sending and receive to external mail adress work from both Office 365 and Debian.
My postconf;
Code: Select all
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
dovecot_destination_recipient_limit = 1
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination =
myhostname = myhostname.mydomain.com
mynetworks =
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = mydomain.com
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks , permit_sasl_authenticated , reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/mailserver.pem
smtpd_tls_key_file = /etc/ssl/private/mailserver.pem
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
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 = dovecot
I have googled a lot over this, and I think that this is the key;
Code: Select all
mydestination = $myhostname, localhost.$mydomain $mydomain
Tried several different combinations, but I get the same NDR as above each time.
Please let me known if you want more information regardning the configuration.
Thanks in advance and for reading.
Regards, Peter