SMTP Only Domain sending to itself

Discussion in 'Installation/Configuration' started by kukurutz, Aug 11, 2017.

  1. kukurutz

    kukurutz New Member

    Hello!
    I couldn't find any working solution for my problem online, but please don't yell at me if this question has been asked before.
    I'm using ISPConfig 3.1.1p1 on Debian 8 with Dovecot as IMAP server.

    I have configured a domain "xy . com" with a mailbox "foo@xy . com" and "bar@xy . com", the hostname of my server is "mail01 . foobar . com". Both mailboxes are only allowed to send emails, so "Enable receiving" is off for both of them, IMAP and POP3 are disabled.
    There is another (MS Exchange) mailserver configured for receiving emails, let's name it "mx01 . bigcompany . com".

    There is no MX record configured for mail01 . foobar . com. There is an MX record pointing to mx01 . bigcompany . com.

    When I send an email from "foo@xy . com" to "bar@xy . com" postfix replies with
    550 5.1.1 <bar@xy . com>: Recipient address rejected: User unknown in virtual mailbox table; from=<foo@xy . com> to=<bar@xy . com> proto=ESMTP helo=<[...]>​

    How can I tell postfix to disable local delivery for this domain?

    Sorry for the weird hostnames and email addresses, the forum thinks they are links and doesn't allow me to post links.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    When you add an email domain in postfix, then postfix will always deliver locally to that domain, no matter where the MX record is pointing to.

    When you need an email account for sending only, then use a different domain name, even a non-existing, to create these smtp out accounts. Ensure that you do not enable "Reject sender and login mismatch" in server config.
     
  3. kukurutz

    kukurutz New Member

    Thank you for your reply and your suggested workaround! I didn't think of something so simple...
     

Share This Page