Skocz do zawartości

KamilKrK

Użytkownicy
  • Zawartość

    2
  • Rejestracja

  • Ostatnio

Reputacja

0 Normalna

O KamilKrK

  • Ranga
    Nowy użytkownik
  1. Postfix relay do O365 i gmail

    The final configuration where accounts for gmail and O365 work on one posftix. /etc/posftix/main.cf # default relayhost setting relayhost = [smtp.gmail.com]:587 # sender-dependent sasl authentication smtp_sender_dependent_authentication = yes sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay # smtp authentication settings smtp_use_tls = yes smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_security_level = encrypt smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt smtp_generic_maps = hash:/etc/postfix/generic transport_maps = hash:/etc/postfix/transport /etc/postfix/sasl_passwd # default relayhost [smtp.gmail.com]:587 accountgmail@gmail.com:Password #Gmail per-sender authentication notification@gmail.local accountgmail@gmail.com:Password # O365 per-sender authentication AccountO365@o365.com AccountO365@o365.com:Password /etc/posftix/transport notification@gmail.local smtp:[smtp.gmail.com]:587 AccountO365@o365.com smtp:[smtp.office365.com]:587 /etc/postfix/sender relay notification@gmail.local [smtp.gmail.com]:587 AccountO365@o365.com [smtp.office365.com]:587
  2. Witam, Czy ktokolwiek próbował tak skonfigurować postfixa aby w zależności z jakiego adresu dostanie wiadomość to przesyła to do O365 lub Gmail. Próbowałem poniższe ustawienia ale nie działają. /etc/postfix/main . cf # default relayhost setting relayhost = [smtp . gmail . com]:587 # sender-dependent sasl authentication smtp_sender_dependent_authentication = yes sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay # smtp authentication settings smtp_use_tls = yes #smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_security_level = encrypt smtp_tls_CAfile = /etc/ssl/certs/ca-certificates . crt smtp_sasl_mechanism_filter = plain /etc/postfix/sasl_passwd # per-sender authentication vcenter@mydomain . local account2@gmail . com:password icinga@mydomain . local account1@gmail . com:password upc@mydomain . local account2@gmail . com:password apc@mydomain . local account3@gmail . com:password # default relayhost [smtp . gmail . com]:587 account1@gmail . com:password /etc/postfix/sender_relay #GMAIL account1@gmail . com [smtp . gmail . com]:587 account2@gmail . com [smtp . gmail . com]:587 account3@gmail . com [smtp . gmail . com]:587 Do tego momentu działa prawidłowo z gmail. Teraz dodaje wpisy dla O365 /etc/postfix/sasl_passwd O365@mydomain . local accountO365@mydomain . com:password /etc/postfix/sender_relay accountO365@mydomain . com [smtp . office365 . com]:587 /etc/postfix/generic O365@mydomain . local accountO365@mydomain . com /etc/postfix/main . cf # Configure for O365 smtp_generic_maps = hash:/etc/postfix/generic smtp_sasl_tls_security_options = noanonymous smtp_always_send_ehlo = yes # default relayhost setting relayhost = [smtp . gmail . com]: 587 relayhost = [smtp . office365 . com]: 587 Jak dodam powyższy wpis to dostaje taki komunikat : postfix: warning: /etc/postfix/main . cf, line 55: overriding earlier entry: relayhost = [smtp . gmail . com]: 587 Równocześnie nie mogę usunąć obydwu wpisów Natomiast zostawienie tylko wpisu dla gmail przekierowuje wszystko na niego
×