Email issue when IMAP server is remote

Discussion in 'Server Operation' started by justinsane, Nov 4, 2015.

  1. justinsane

    justinsane New Member

    Hi
    I'm having difficulty sending email between users on the same domain when the IMAP server is remote.

    Let's say the domain is example.com

    I have ISPConfig3 on Debian 7 with roundcube 1.1.3 installed as an individual site at webmail.example.com

    I set up roundcube on the local ISPConfig3 server as webmail.example.com (DNS set for local sever) and I set the roundcube configuration file to use the IMAP server at mail.example.com (MX record set for remote server).

    I did not add any mailboxes for this domain in ISPConfig3 because they are on the remote IMAP server.
    Email is received from remote senders by the remote SMTP server at mail.example.com
    I have no control of the remote servers.

    Outbound email from local roundcube users is sent locally so I didn't change any roundcube SMTP settings, I want local outbound email sent from the local server.

    Everything works fine for both sending and receiving except that I'm seeing this in the mail log when a user at example.com tries to email another user at example.com:

    to=<[email protected]>, relay=dovecot, delay=0.24, delays=0.13/0/0/0.11, dsn=5.1.1, status=bounced (user unknown)

    How do I tell the system to look up the MX record for example.com and send the message to the remote SMTP server instead of trying to deliver it to dovecot locally?

    I would need to do this only for the domain example.com because the ISPCconfig3 server has other domains which do have the mailboxes on the ISPConfig3 server.

    Thanks for any help.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check that "example.com" is not used as hostname of the server and that this domain is not listed in /etc/postfix/main.cf and /etc/mailname. The hostname of your server should be a subdomain like server1.example.com but not example.com without the subdomain part.
     
  3. justinsane

    justinsane New Member

    Thanks for your reply Till.

    The server is not example.com

    The hosts file has something like

    1.2.3.4 s1.somethingelse.com s1

    And hostname contains just s1

    the hostname command says s1.somethingelse.com

    /etc/postfix/main.cf has the following lines

    myhostname = s1.somethingelse.com
    mydestination = s1.somethingelse.com, localhost, localhost.localdomain

    But it does not contain example.com

    /etc/mailname has just

    s1.somethingelse.com

    This file also does not mention example.com

    The problem is that [email protected] cannot send email to [email protected] but both of them can send/receive anywhere else.
    The reason seems to be because it's trying to deliver to the local dovecot instead of sending to the external SMTP server. I'm not sure how to change this behaviour.

    If I log in as the client example.com there are no email boxes for example.com however I've just noticed that the domain example com has been added to Email Domain with server s1.somethingelse.com

    So now I'm thinking that should not be there.

    Do you think if I remove the email domain example.com from ispconfig3 it will fix the problem?
    This may have been added recently and I'm now thinking that's probably the reason for this problem. If that's the case then sorry for wasting anyone's time. I'll remove it and see if that fixes the problem.

    Looks like I may have found the reason for this problem myself.

    Is there a way to find the date/time when a record was added to Ispconfig3?
     
  4. justinsane

    justinsane New Member

    This issue is now fully resolved.
    I caused it myself by adding example.com as the email domain in Ispconfig3.
    It didn't cross my mind that this would cause a problem because I hadn't added any mailboxes.
     

Share This Page