Incoming emails are not in the right place

Discussion in 'Installation/Configuration' started by Shyciii, Apr 22, 2022.

  1. Shyciii

    Shyciii New Member

    I ran into a problem installing a Debian server (11.3) with the latest ISPConfig (autoinstaller) on it, which will run a mail server (postfix + dovecot + amavis). I had already done such a test and it worked without any problems when a direct MX record pointed to the external Ip.
    However, the new lineup is that no MX record points to the server I create, but another server filters the mail and forwards the emails to us for certain email addresses. In this case, however, the e-mails are not created under /var/vmail in the Maildir format, but under /var/mail as 1 file with the user's name, and append the e-mails for this, even though. This problem only occurs if the mail is forwarded to our server from another email server (on which exim4 is running anyway).

    What could be the problem?
  2. Shyciii

    Shyciii New Member

    The lineup is as follows:

    The main email server that forwards the emails of certain users to us is and is in a completely different network, locally elsewhere.
    The name of our server is, but we receive the mail at

    Our server hosts file: localhost valami.prx.local something (this is an internal proxmox network)
    external ip isp mx2

    The "essential" content of is:

    myhostname =
    myorigin =
    mydestination =, localhost, localhost.localdomain
    relayhost =
    mynetworks = [:: 1] / 128
    inet_interfaces = all
    inet_protocols = all
    virtual_mailbox_base = /var/vmail

    In the log I noticed that it differs in 2 lines:

    When an mx record points to the server, so we receive the mail directly, the following appears:

    Apr 21 14:26:05 isp postfix / lmtp [158380]: 6527D101CA0: to = <[email protected]>, relay = []: 10024, delay = 0.55, delays = 0.26 / 0.01 / 0.01 / 0.27, dsn = 2.0.0, status = sent (250 2.0.0 from MTA (smtp: []: 10025): 250 2.0.0 Ok: queued as 948EF101CA1)
    Apr 21 14:26:05 isp postfix / qmgr [3726755]: 6527D101CA0: removed
    Apr 21 14:26:05 isp dovecot: lmtp ([email protected]) <158386> <[email protected]>, relay = [private / dovecot-lmtp], delay = 0.28, delays = 0.08 / 0.01 / 0.01 / 0.18, dsn = 2.0.0, status = sent (250 2.0.0 <[email protected]> jbHqKV1NYWKyagIAbwWYLQ Saved)

    When they are forwarded to us, this will include:

    Apr 22 09:11:47 isp postfix / lmtp [211790]: 21BE2C40DCB: to = <[email protected]>, relay = []: 10026, delay = 4.1, delays = 0.2 / 0.01 / 0 / 3.8, dsn = 2.0.0, status = sent (250 2.0.0 from MTA (smtp: []: 10027): 250 2.0.0 Reason: queued as 1B1F1C40DD2)
    Apr 22 09:11:47 isp postfix / qmgr [211782]: 21BE2C40DCB: removed
    Apr 22 09:11:47 isp postfix / local [211794]: 1B1F1C40DD2: to = <[email protected]>, relay = local, delay = 0.11, delays = 0.05 / 0.01 / 0 / 0.05, dsn = 2.0 .0, status = sent (delivered to mailbox)

    It can be seen that if it is forwarded to us, it does not come as [email protected], but as [email protected], and then it does not process dovecat, but postfix, and so at realy local is listed and not the server name.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You probably have a Linux user with the name shyciii on that system and as your other server does not forward emails to the correct address, he uses [email protected] instead of [email protected] (he sends to the server hostname and not a virtual email domain on this server), the emails must end up in the mailbox of the Linux user shyciii.
  4. Shyciii

    Shyciii New Member

    SOLVED: add on Domain ear, and make domain alias to Then create new mailbox, and working like a charm.

Share This Page