[SOLVED] Install proxmox mail gateway on debian on an Azure VM

darksody

New Member
Jul 16, 2021
9
2
3
35
Hello,

I've been looking into proxmox mail gateway, and i noticed that beside the proxmox mail gateway iso, they also provide a guide on how to install it on top of Debian.

Now, i'm trying to do so in a virtual machine in Azure. The problem is, after going through the guide, setting up the repos and installing proxmox mail gateway, it brings down eth0 and i lose SSH connection, then i can never connect again to my VM.

Did anybody try to install proxmox mail gateway on an Azure VM?
Been searching the forums and can't find anything relevant.
 
Did anybody try to install proxmox mail gateway on an Azure VM?
Been searching the forums and can't find anything relevant.
have never tried this - could you post the output of the installation as far as possible?
(i.e. everything after hitting enter on `apt install proxmox-mailgateway`)

maybe we can see where the problem arises
 
Ok, just created a new VM. It gets stuck at this:

Code:
Setting up libgnutls30:amd64 (3.7.1-5) ...
(Reading database ... 21113 files and directories currently installed.)
Preparing to unpack .../libseccomp2_2.5.1-1_amd64.deb ...
Unpacking libseccomp2:amd64 (2.5.1-1) over (2.3.3-4) ...
Setting up libseccomp2:amd64 (2.5.1-1) ...
(Reading database ... 21113 files and directories currently installed.)
Preparing to unpack .../archives/apt_2.2.4_amd64.deb ...
Unpacking apt (2.2.4) over (1.8.2.3) ...
Setting up apt (2.2.4) ...
Installing new version of config file /etc/apt/apt.conf.d/01autoremove ...
Installing new version of config file /etc/kernel/postinst.d/apt-auto-removal ...
(Reading database ... 21120 files and directories currently installed.)
Preparing to unpack .../apt-utils_2.2.4_amd64.deb ...
Unpacking apt-utils (2.2.4) over (1.8.2.3) ...
Preparing to unpack .../libgpg-error0_1.38-2_amd64.deb ...
Unpacking libgpg-error0:amd64 (1.38-2) over (1.35-1) ...
Setting up libgpg-error0:amd64 (1.38-2) ...
(Reading database ... 21120 files and directories currently installed.)
Preparing to unpack .../gpgv_2.2.27-2_amd64.deb ...
Unpacking gpgv (2.2.27-2) over (2.2.12-1+deb10u1) ...
Setting up gpgv (2.2.27-2) ...
dpkg: ifupdown: dependency problems, but removing anyway as you requested:
 cloud-init depends on ifupdown.

(Reading database ... 21120 files and directories currently installed.)
Removing ifupdown (0.8.35) ...

Progress: [  9%] [######################...................................................................................................................................................................................................................................]

And then SSH session gets terminated and i can't recover the VM anymore.
Looks like Azure's cloud-init depends on ifupdown, i assume that's the issue.
 
Last edited:
which version of ifupdown2 gets installed?
or rather - could you provide the complete output of the commands?

Two things I'd try:
* keep ifupdown installed - `apt install proxmox-mailgateway ifupdown` - make sure that the output says that ifupdown won't be removed
(PMG offers/will soon offer enhanced functionality like network reloads without reboot with ifupdown2, but currently still works fine with ifupdown)
* install ifupdown2 beforehand - the current version should make sure the network comes back up.

I hope this helps!
 
i have just successfully setup proxmox mail gateway 6 on AWS and works a treat so im thinkig azure must be similar...
docs helped me a lot - https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmg_package_repositories
1. i used a standard debian buster ami and upgrade apt-get dist-upgrade && reboot
2. sudo into root user and set a password! sudo su && passwd root
3. remove the 127.0.1.1 from hosts (not needed on azure it seems?) nano /etc/hosts
4. include the proxmox repo in apt from the docs - STEP 3.5.3 FROM DOCS BUT USE BUSTER INSTEAD OF BULLSEYE!
5. get the keys for the repo wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg;
6. update repo apt update
7. dist-upgrade the os to install the ifupdown module and reboot apt dist-upgrade && reboot
8. then install as a linux container and not a standard install - STEP 3.4 FROM DOCS - apt install proxmox-mailgateway-container
9. goto the webpanel https://IPOFSERVER:8006 and use root and the password you set during step 2
 
Last edited:
  • Like
Reactions: Stoiko Ivanov
8. away it went...
I read this as - it worked and everything is fine now? If yes please mark the thread as 'SOLVED' - this helps other users
If no please provide some more detail at what is not working as expected
 
this isnt my thread to mark it as solved sadly
sorry - just quickly skimmed through the answer - and did not take the time to check the complete thread!

In any case huge thanks for stepping in and sharing your instruction!
 
  • Like
Reactions: si458
Hello -> trying this as we speak, will revert with my results on Azure and will mark it as solved if my test is successful.
 
Just tried @si458's suggestion, however, i do get the same output regarding the ifupdown on azure. Giving it another shot with Stoiko's Ivanov suggestion to keep the ifupdown. (sorry it takes long, but i have to recreate the virtual machine).
 
Ok, i'm doing something wrong i think. I've created an AWS VM to reproduce your exact steps, and i get the same issue with ifupdown.
When i'm installing it, i do get the first prompt where i choose "internet site", then there's another prompt asking me if i want to restart the services, and there i choose "yes".

Also, i'm installing proxmox mailgateway 7, the latest one, and i noticed you said you tried with 6.

AWS got stuck at the same ifdown step:

Code:
(Reading database ... 25508 files and directories currently installed.)
Preparing to unpack .../apt-utils_2.2.4_amd64.deb ...
Unpacking apt-utils (2.2.4) over (1.8.2.2) ...
Preparing to unpack .../libgpg-error0_1.38-2_amd64.deb ...
Unpacking libgpg-error0:amd64 (1.38-2) over (1.35-1) ...
Setting up libgpg-error0:amd64 (1.38-2) ...
(Reading database ... 25508 files and directories currently installed.)
Preparing to unpack .../gpgv_2.2.27-2_amd64.deb ...
Unpacking gpgv (2.2.27-2) over (2.2.12-1+deb10u1) ...
Setting up gpgv (2.2.27-2) ...
dpkg: ifupdown: dependency problems, but removing anyway as you requested:
 cloud-init depends on ifupdown.

(Reading database ... 25508 files and directories currently installed.)
Removing ifupdown (0.8.35) ...

Session was closed

Progress: [  9%] [######################............
 
Last edited:
@darksody just tried it now and no issues at all,
i followed my own steps above,
just changed them slight (SHOULD BE 9 STEPS IN TOTAL)
you need to do another apt dist-upgrade BEFORE you install proxmox-mailgateway-container as that will install the ifupdown from the proxmox repo!? give that a go :)

Code:
azureuser@mailgateway:~$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  grub-common grub-efi-amd64-bin grub-pc-bin grub2-common ifupdown
5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 4663 kB of archives.
After this operation, 1475 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://download.proxmox.com/debian/pmg buster/pmg-no-subscription amd64 ifupdown amd64 0.8.35+pve1 [81.8 kB]
Get:2 http://download.proxmox.com/debian/pmg buster/pmg-no-subscription amd64 grub2-common amd64 2.02+dfsg1-18-pve1 [538 kB]
Get:3 http://download.proxmox.com/debian/pmg buster/pmg-no-subscription amd64 grub-pc-bin amd64 2.02+dfsg1-18-pve1 [901 kB]
Get:4 http://download.proxmox.com/debian/pmg buster/pmg-no-subscription amd64 grub-efi-amd64-bin amd64 2.02+dfsg1-18-pve1 [665 kB]
Get:5 http://download.proxmox.com/debian/pmg buster/pmg-no-subscription amd64 grub-common amd64 2.02+dfsg1-18-pve1 [2477 kB]
Fetched 4663 kB in 0s (23.4 MB/s)    
Reading changelogs... Done
(Reading database ... 20894 files and directories currently installed.)
Preparing to unpack .../ifupdown_0.8.35+pve1_amd64.deb ...
Unpacking ifupdown (0.8.35+pve1) over (0.8.35) ...
Preparing to unpack .../grub2-common_2.02+dfsg1-18-pve1_amd64.deb ...
Unpacking grub2-common (2.02+dfsg1-18-pve1) over (2.02+dfsg1-20+deb10u4) ...
Preparing to unpack .../grub-pc-bin_2.02+dfsg1-18-pve1_amd64.deb ...
Unpacking grub-pc-bin (2.02+dfsg1-18-pve1) over (2.02+dfsg1-20+deb10u4) ...
Preparing to unpack .../grub-efi-amd64-bin_2.02+dfsg1-18-pve1_amd64.deb ...
Unpacking grub-efi-amd64-bin (2.02+dfsg1-18-pve1) over (2.02+dfsg1-20+deb10u4) ...
Preparing to unpack .../grub-common_2.02+dfsg1-18-pve1_amd64.deb ...
Unpacking grub-common (2.02+dfsg1-18-pve1) over (2.02+dfsg1-20+deb10u4) ...
Setting up grub-common (2.02+dfsg1-18-pve1) ...
Setting up ifupdown (0.8.35+pve1) ...
Setting up grub-efi-amd64-bin (2.02+dfsg1-18-pve1) ...
Setting up grub2-common (2.02+dfsg1-18-pve1) ...
Setting up grub-pc-bin (2.02+dfsg1-18-pve1) ...
Processing triggers for systemd (241-7~deb10u8) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for grub-cloud-amd64 (0.0.4) ...
Installing for i386-pc platform.
Installation finished. No error reported.
Installing for x86_64-efi platform.
Installation finished. No error reported.
azureuser@mailgateway:~$ sudo reboot
Connection to 123.123.123.123 closed by remote host.
 
Last edited:
Got it working as well, thanks!
However, i got it to work by choosing "no" when it asked me to auto-restart services if needed, which is weird.

I'll do a fresh run with a dist-upgrade before installing it anyway.
 
Yup, the answer is to keep the ifdown. Going to bash my head now on how do i login in the web interface, since the installer didn't ask me for any kind of password.
 
Yup, the answer is to keep the ifdown. Going to bash my head now on how do i login in the web interface, since the installer didn't ask me for any kind of password.
it uses the root user password from the linux machine itself,
so im my case i had to login via ssh to the machine (on AWS the main user was 'admin' or AZURE was `azureuser`)
then login to the root user using sudo su
then change its password using passwd root
 
it uses the root user password from the linux machine itself,
so im my case i had to login via ssh to the machine (on AWS the main user was 'admin' or AZURE was `azureuser`)
then login to the root user using sudo su
then change its password using passwd root
Thank you very much, somehow missed it. All good, will proceed with experimenting it :)
 
  • Like
Reactions: si458
Hello friend, I'm trying to do the same thing, but it's with the PROXMOX BACKUP SERVER.

I can install on Debian on Azure, access the panel and everything, but when I restart the server, I lose access to the panel and SSH, I believe it is something related to ifupdown

Can you help me?
 
Hello friend, I'm trying to do the same thing, but it's with the PROXMOX BACKUP SERVER.

I can install on Debian on Azure, access the panel and everything, but when I restart the server, I lose access to the panel and SSH, I believe it is something related to ifupdown

Can you help me?
Guys, I got it here.
Very simple, after installing PBS, don't restart the server, just install ifupdown again and that's it, then restart and everything will be working in Azure.

I want to use Azure to do my backups and I'm going to schedule it to stay on only at dawn, so I spend less.

Enjoy.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!