proxmox-mail-gateway

Proxmox Mail Gateway – Reject Unknown Senders

Back in April 2021 I made a change to the method in which email is received and processed by installing Proxmox Mail Gateway. Prior to then I ran Postfix for handling various transports with Dovecot taking care of IMAP. That configuration had served me well for the previous two years.

Overall, my experience with Proxmox Mail Gateway and Proxmox virtualisation has been very good. I should have gone down this path much sooner.

Why did I install a Mail Gateway

While Postfix was running perfectly and doing the job for which it was employed, I wanted more information than was provided from browsing through logs. Given I was already deep down the “Virtualisation Rabbit Hole” and currently using Proxmox it seemed like a natural progression. The decision was made; Proxmox Mail Gateway was installed as a test-bed where I could fiddle and play until I understood what I was doing.

Given my low intelligence and lack of Linux experience I struggled getting my head around a few things. For example; what was a damned gateway? I understood what a gateway was in other facets of life, but in the context of email I was confused. I stumbled around for a few hours trying to figure out where I configured individual email addresses for my users – what a stupid moron I am. I was wasting all that time based on a complete misunderstanding of how the process worked. I DO NOT configure individual emails for users at all. Proxmox sends and receives all email and processes it for validity, virus checks, junk status etc. before sending it onto my real mail server, which is my original Postfix box.

Ultimately my goal was gaining knowledge about email being received by my mail servers. Like you, I had many thousands of attempts by suspicious characters trying to use my legitimate server to send their bogus email to unsuspecting boof-heads across the internet. I wanted more statistics on what was going on and Proxmox Mail Gateway gave me those statistics.

Some useful statistics

The image below shows how many emails were processed during the month of May 2021. The numbers to pay attention to are the “Total Mails” and “Incoming Mails” and the staggering numbers. I say staggering because I have five or six very small domains here. In the overall scheme of things the services I provide are meaningless yet the baddies out there take every opportunity to use me for no-good. Those bastards!

email-proxmox

Total Mails is 164,776, for the less educated, let me spell that out; one hundred and sixty four thousand seven hundred and seventy six. In my books, considering I am a nobody in the world, that is a f#%king large number.

I had setup Proxmox Mail Gateway using the default options, mostly. I might have changed a few options but at the end of the day it was pretty much an out of the box configuration. Roll forward a few months and it is now June 2021 and I’ve made some changes to my setup.

16th of June 2021; time for change

While examining my Options (found under Configuration | Mail Proxy) I spotted this value; Reject Unknown Senders. By default it was turned off so I decided it should be turned on. All of the options here do nothing more than add or remove configuration settings within the Postfix config, generally main.cf or master.cf.

After activating Reject Unknown Senders I performed a few well crafted tests such as sending myself an email from my Gmail account as well as sending an internal message. Both of these worked, so I was happy. A few days later I examined the statistics page again and was blown away by the difference in the numbers.

The image below clearly shows and incredible drop in the number of mail items being processed. email2-proxmox

Now I recognise that the first image showed statistics for a full month and the above is a single day, but surely you can see there is going to be a big difference when a full months stats is available.

If my understand is correct, the Reject Unknown Senders is effectively ignoring connections coming from mailers without proper MX records. Either the records are malformed, wrong or don’t exist. I really wish I had activated this option earlier.

Proxmox Mail Gateway still performed brilliantly prior to this option being changed. The amount of junk email I received in my accounts was reduced drastically when compared to Postfix alone.

I will monitor the situation over the next month or two and decide if turning this option on was the right thing to do, but for now it’s looking good.

I encourage you to let me know if my understanding of what’s going in here is wrong. But for the moment legitimate email is getting through and dodgy attempts are being successfully thwarted.

Yay for me!