Use Exchange to send emails from php sendmail

  • Currently I got an exchange server.
    The imscp server is allowed to access the exchange server without auth and is allowed to use the exchange as a smarthost.


    Currently no emails are sent.


    I found this listener file Configure Postfix to use existing company smarthost (not act as one)
    and used it.
    The rebuild appended the smarthost to the postfix main.cf


    relayhost = [exchange.domain.tld]:587
    The ping to the exchange.domain.tld works fine.


    The mail log says:

    Code
    1. May 10 13:19:04 servername postfix/pickup[1542]: 5777641DF8: uid=1017 from=<[email protected]>
    2. May 10 13:19:04 servername postfix/cleanup[1547]: 5777641DF8: message-id=<[email protected]>
    3. May 10 13:19:04 servername postfix/qmgr[1543]: 5777641DF8: from=<[email protected]>, size=389, nrcpt=1 (queue active)
    4. May 10 13:19:04 servername postfix/pipe[1549]: 5777641DF8: to=<[email protected]>, relay=dovecot, delay=0.05, delays=0.02/0/0/0.02, dsn=5.1.1, status=bounced (user unknown)
    5. May 10 13:19:04 servername postfix/cleanup[1547]: 606B241E14: message-id=<[email protected]>
    6. May 10 13:19:04 servername postfix/qmgr[1543]: 606B241E14: from=<>, size=2120, nrcpt=1 (queue active)
    7. May 10 13:19:04 servername postfix/bounce[1553]: 5777641DF8: sender non-delivery notification: 606B241E14
    8. May 10 13:19:04 servername postfix/qmgr[1543]: 5777641DF8: removed
    9. May 10 13:19:04 servername postfix/pipe[1549]: 606B241E14: to=<[email protected]>, relay=dovecot, delay=0.01, delays=0/0/0/0.01, dsn=5.1.1, status=bounced (user unknown)
    10. May 10 13:19:04 servername postfix/qmgr[1543]: 606B241E14: removed

    Any idea why the exchange server isnt called?



    Edit
    The cause seems to be, that he knows hisself with the customer domains.
    If i have a customer "domain.tld" and try to send as "[email protected]" he uses the relay "dovecot"
    when i try to send as "[email protected]" he uses the exchange smtp.

    Edited once, last by Levitas ().