Email issue when IMAP server is remote

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

  1. justinsane

    justinsane New Member

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

    Let's say the domain is

    I have ISPConfig3 on Debian 7 with roundcube 1.1.3 installed as an individual site at

    I set up roundcube on the local ISPConfig3 server as (DNS set for local sever) and I set the roundcube configuration file to use the IMAP server at (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
    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 tries to email another user at

    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 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 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 "" is not used as hostname of the server and that this domain is not listed in /etc/postfix/ and /etc/mailname. The hostname of your server should be a subdomain like but not without the subdomain part.
  3. justinsane

    justinsane New Member

    Thanks for your reply Till.

    The server is not

    The hosts file has something like s1

    And hostname contains just s1

    the hostname command says

    /etc/postfix/ has the following lines

    myhostname =
    mydestination =, localhost, localhost.localdomain

    But it does not contain

    /etc/mailname has just

    This file also does not mention

    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 there are no email boxes for however I've just noticed that the domain example com has been added to Email Domain with server

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

    Do you think if I remove the email domain 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 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