Table of Contents

NAS Installation - Synology DSM 7.4

Upgrade from DSM 6.4

KMIP for key management

Encrypted shared folders

Setup rescue login

Migrate MailPlus Server to new NAS

  1. Backup full system configuration on your source NAS in Control Panel –> Backup & Restore –> Configuration Backup –> Export and save it to your local drive
  2. Restore the configuation backup on your target NAS in Control Panel –> Backup & Restore –> Configuration Backup –> Restore, select only Users and Groups from Users, Groups, Shared Folders, Application Privileges, leave everything else unchecked
  3. Install Hyper Backup on your source NAS
  4. Install Hyper Backup and Hyper Backup Vault on your target NAS
  5. Run a Hyper Backup task for application Synology MailPlus Server with your target NAS as destination
  6. Enable rsync service on your target NAS in Control Panel –> File Services –> rsync on default port 22
  7. Go to Control Panel –> File Services –> Advanced –> Shared Folder Sync on your source NAS, click Task List and create a manual full sync task with the (internal) IP address of your target NAS as destination
  8. Do the sync before you intend to switch to the target NAS. Once everything else is setup, come back to Shared Folder Sync and do another full sync. The initial sync takes a while, but the follow up sync executes fast as rsync only copies files which were added or changed in the meantime.
  9. Update all port forwards in your firewall to your target NAS
  10. If you have a web server running on a different machine you probably keep your taget NAS behind a reverse proxy. In this case you need to update the reverse proxy settings to reach your target NAS.
  11. Check your mail server by sending mail and receiving mail
  12. Remove the sync task you created from your source NAS (see above) in Control Panel –> File Services –> Advanced –> Shared Folder Sync click Task List
  13. Set the login portal for the mail client in Control Panel –> Login Portal –> Applications
  14. Use traceroute to find connectivity issues to your mail server from another computer:
    sudo traceroute -T -p 5001 your.mailserver.tld
  15. Set up regular backups to safeguard your MailPlus data on the new NAS using Shared Folder Sync and Hyper Backup.
  16. Create a scheduled task on your target NAS to copy renewed certificates (e.g. using Let's encrypt) if your NAS is behind a reverse proxy:
    #!/bin/sh
    #
    # Copy certificates from web server to NAS, must be run nas root
    # (c) Bernard Condrau, 2026-08-25: adapted to DSM 7.4
    #
    SERVER="your_webserver_generating_certificates"
    PORT=22
    IDENTITY="/volume1/homes/user/.ssh/id_rsa"
    # make sure your user can run rsync and cksum as root without password (check visudo)
    SERVER_RSYNC="sudo rsync"
    SERVER_CKSUM="sudo cksum"
    SERVER_CERTDIR="/etc/letsencrypt/live/cloud.condrau.com"
    # CERTDIR must be hardcoded and is different in every server instance
    CERTDIR="_archive/"$(sudo cat /usr/syno/etc/certificate/_archive/DEFAULT)
    CERTROOTDIR="/usr/syno/etc/certificate"
    PACKAGECERTROOTDIR="/usr/local/etc/certificate"
    
    # compare cksums first to decide whether certificates need to be copied
    REM_PRIV=$(ssh -i $IDENTITY -p $PORT user@$SERVER $SERVER_CKSUM $SERVER_CERTDIR/privkey.pem | cut -d' ' -f 1)
    LOC_PRIV=$(cksum $CERTROOTDIR/$CERTDIR/privkey.pem | cut -d' ' -f 1)
    
    if [[ $LOC_PRIV -ne $REM_PRIV ]]; then
    
    	# copy certificates from web server
    	sudo rsync -aPLe "ssh -i $IDENTITY -p $PORT" --rsync-path="$SERVER_RSYNC" user@$SERVER:$SERVER_CERTDIR/cert.pem $CERTROOTDIR/$CERTDIR/cert.pem
    	sudo rsync -aPLe "ssh -i $IDENTITY -p $PORT" --rsync-path="$SERVER_RSYNC" user@$SERVER:$SERVER_CERTDIR/fullchain.pem $CERTROOTDIR/$CERTDIR/fullchain.pem
    	sudo rsync -aPLe "ssh -i $IDENTITY -p $PORT" --rsync-path="$SERVER_RSYNC" user@$SERVER:$SERVER_CERTDIR/privkey.pem $CERTROOTDIR/$CERTDIR/privkey.pem
    	sudo rsync -aPLe "ssh -i $IDENTITY -p $PORT" --rsync-path="$SERVER_RSYNC" user@$SERVER:$SERVER_CERTDIR/chain.pem $CERTROOTDIR/$CERTDIR/chain.pem
    
    	# push the updated archive certificates to the system and restart web services
    	sudo /usr/syno/bin/synow3tool --gen-all
    	sudo /usr/syno/bin/synosystemctl restart nginx
    
    	echo "certificates updated"
    else
    	echo "nothing to update"
    fi
    
    exit 0
  17. Check basic TCP connectivity:
    telnet [smtp_host] [port] (e.g., telnet smtp.gmail.com 587)
  18. Check certificate assignment in Synology DSM
    openssl s_client -connect mail.yourdomain.tld:465 -showcerts
    openssl s_client -connect mail.yourdomain.tld:993 -showcerts
    openssl s_client -connect mail.yourdomain.tld:587 -starttls smtp -showcerts
  19. If the verify return code: 0 is not 0 but 1 or another number, your DSM most likely does not serve the intermediate certifiate. In this case you need to do the following:
    1. Go to Control Panel –> Security –> Certificate –> Settings and assign Synology's default certificate to MailPlus-Server-dovcot and MailPlus-Server-postfix. Click OK and wait 30 seconds, then set the certifiates back to your Letsencrypt certificate and hit OK.
    2. Go to Control Panel –> Security –> Advanced –> Custom Settings and set MailPlus-Server-dovcot and MailPlus-Server-postfix to Intermediate compatibility.
    3. Stop and restart Synology MailPlus Server and Synology MailPlus (Client).
  20. You can also enter cat /var/packages/MailPlus-Server/target/etc/main.cf | grep .pem and check whether fullchain.pem is referenced.
  21. Re-check the certificate assignment.
  22. Open MailPlus Server and go to Mail Delivery –> General. Enable SMTP authentication and disable external postmaster in External Postmaster.
  23. Disable SMTP-SSL/TLS (port 465) in Synology MailPlus Server –> Service