Search code examples
smtpubuntu-18.04mail-serverwebminvirtualmin

Virtualmin server send/receive mail via another Virtualmin server?


I have set up virtualmin (v6.12) on two separate servers (both Ubuntu 18.04) with the intention of separating the webserver from the mailserver.

Do I need to fiddle with the postfix/dovecot files or is there an inbuilt feature that tells a virtualmin webserver to send/receive all emails via an external virtualmin mailserver?

Some forums pointed out that this can be done via Webmin -> Postfix -> SMTP Authentication And Encryption > Send outgoing mail via host but I'm not sure what exactly should I add here.


Solution

  • One can send mail via another Virtualmin system by using SMTP using the following steps:

    SMTP server (The server to send mail from):

    • Go to Webmin > Postfix configuration.
    • Go to SMTP Server Options and make changes to Restrictions on recipient addresses based on your mailserver configuration.
    • Go to SMTP Authentication & Encryption and make changes to SMTP security options, SMTP recipient restrictions, etc based on your mailserver configuration.

    SMTP Client (The server connecting to the SMTP server):

    • Go to Webmin > Postfix configuration.
    • Go to SMTP Client Options and make changes to SASL security options and Use TLS for SMTP connections based on your mailserver configuration.
    • Go to SMTP Authentication & Encryption and add your SMTP server hostname (with port) in Send outgoing mail via host, choose the relevant option in Use SASL SMTP authentication? based on your mailserver configuration and finally add the login details in SMTP login to outgoing mail host.

    N.B. Most of the options that you need to set in the above steps will depend on how you configured your mailserver (Postfix, SASL, etc) hence the based on your mailserver configuration.