What do we expect from a secondary mail server?

Discussion in 'General' started by TonyG, Nov 30, 2020.

  1. TonyG

    TonyG Active Member

    My secondary server supports only DNS and mail. The secondary has its own /var/vmail tree and backup of mail* folders. There are mail items in the secondary that are unique to that system. That is, in the Maildir tree there are items with ID " '160...secondary.domain.tld...' ". These mail items appear to be notifications sent by [email protected] to [email protected]. But they were (sent and) received by the secondary system, the primary isn't getting them.

    Is there information somewhere about what we should expect in the secondary, what it should do and what it will not do, and how it should be working as a client in its own environment? I don't know what ISPConfig should be doing for us in this area. So I don't know if there is a configuration issue, or if it's expected that we should be doing something that I haven't found yet in any docs.

    Side note: The primary mail server saves backups as .zip. The secondary mail backups are .tar.gz. Bug or feature? :)

    Thanks!
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Ispconfig doesn't manage the mail content at all, look at using dsync if you want the two to be kept in sync.
     
  3. TonyG

    TonyG Active Member

    OK, but as I described, it's doing a backup. And when I upgraded there was a prompt to configure the mail component. So, what IS it supposed to be doing?
     
  4. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    what is it supposed to be doing? that depends on what you want it to do.
    you have two choices for a secondary (backup) mail server.
    1. it's a full mailserver, it has copies of all the mailboxes, so it's usually accessible to end users for mail retrieval (pop/imap). you'll need to configure a way (dsync / unison / shared storage etc) to keep the mailbox folders in sync between mailservers.
    2. it's a store and forward. it receives mail when the primary mail servers smtp service is offline, and stores that mail, it then forwards that mail to the primary mail server when it's smtp service comes back online. it does not provide pop/imap access for users to retrieve mail.

    in your case, it would appear to be 1. but your issue is that the secondary server is trying to send mail to a domain and it's not being sent to the primary server. well, why would it? if both mail servers are configured as responsible for domain.tld, then when the secondary has mail to send to [email protected] it'll deliver it to the local mailbox it believes it is responsible for, it has no reason to send that mail to any other server.
     
  5. TonyG

    TonyG Active Member

    When I say secondary/backup mail server, I thought it was clear that this is not a "full" and accessible server.
    It matches 100% your #2 description. This is purely intended to be store & forward, no direct POP/IMAP, no dsync. All SMTP should be to the primary server, and any SMTP to the secondary should be passed without other processing to the primary.

    So what do we do with ISPConfig to ensure that functionality?
    What can I check to understand why the mailboxes in the secondary system have not been forwarded to the primary?
    And ... if I'm missing existing documentation about this, please try to direct me to that documentation. If it doesn't exist, I'm happy to create it.

    Again, what happens when we update the secondary and tell it to configure the mail server? Maybe this is what broke it - the secondary is set to link to the main/primary, but perhaps in telling it to configure the mailserver I mistakenly instructed it to configure it as a primary mail server. OK, how might I reverse that? Another update.php?

    Thanks.
     
  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Ok, that clarifies, I also thought you meant it was a mirrored server (scenario #1). Forget dsync, then. :)

    Use `Email Routing` and `Relay Recipients` to configure the secondary, see section 4.7.6.4 in the manual for some explanation.
     
    TonyG likes this.

Share This Page