mail admin – deleting old accounts

I’m just beginning the CentOS installation on the HP server and, as is often the case with my mind, a sort-of-but-not-totally-related question pops up.

In all of the mailadmin documentation I’ve read in the last couple of weeks (electronic reams of the stuff), I haven’t read anything about deleting an entire email account in Postfix.

I don’t know if I’m going to use Postfix as my mailserver (there are a number of choices), but my point is, in admin terms, you’d want to be able to remove redundant email accounts, yes?

Well, yes, obv.

So I’m going to pause the server installation until I have a better handle on this (to me, fundamental) piece of mailadmin.

configuring email on a self-hosted domain

 Working environment:

Physical Server:
Synology Diskstation

Synology MailServer (PostFix)

  1. Reverse DNS implemented
  2. Account created as a NAS user
    1. Temporarily assigned read/write permissions to the account
    2. User home enabled
  3. MailServer installed
    1. imap enabled (actually, all protocols enabled, just in case)
    2. Domain enabled
    3. Port assigned
    4. Security enabled
    5. SpamAssassin enabled
  4. MX record created in DNS server (not an intuitive process!)
  5. Email account configured on my phone
    1. username
    2. password
    3. imap server (as per phone mail client default)
    4. message: Unable to connect to email server to verify this account. No response from server
  6. Create outgoing email
  7. Send outgoing email
  8. Sending outgoing email failed

It seems to me that either there’s a visibility problem (not an authentication issue), and the email app on my phone can’t see the mail server.

Or the MX record isn’t doing its stuff, but that could be the problem (if the MX record isn’t routing effectively). Do MX records need time to propagate?


I revisited the server settings in the phone’s email client, and noticed the phone had put and in, as default.

Although I have enabled those protocols in the MailServer, are they enabled to those addresses?

I edited out the smtp and imap prefixes. When I accept  the settings I still get the same “unable to connect to email server (etc)” error message *but* the error messages are not instantly received, any more. There is some kind of authentication process taking place that is eventually returning an error.

I shall leave the smtp and imap prefixes off the address ranges for now, and carry on with looking for another error.

Memo to self: Go back and reinstate the smtp and imap prefixes, when mail transfer has been effected


I set aside my phone and created the email account in Outlook Express – being more familiar with that email client, than the one on my phone.

I (re) created the email account in OE and tried to send a test outgoing email. It failed.

Then I did what I should have done an hour ago, I ran a port validation against my static IP.

The port validation reported that port 25 – the default email port – was closed.

I flipped over in to the router and opened port 25 on the internal firewall and tried to send the test message from OE again.

Success! (ever felt like a donkey? Because that’s how I felt – fancy forgetting a basic thing like checking the port was open on the router firewall! I knew the port was open in the NAS firewall, but not checking the router is a schoolboy error)

So I can now send email from the test account in OE. Can I send email from the same test account on my phone?


Right then, I need another cup of tea and then I’ll try to find out why the test account doesn’t receive email.


Learning from earlier, I have just checked the inbound email port settings in OE and found that port 110 is specified. Assuming that port 110 is standard (because why would OE be different to everyone else?) I checked the router firewall and yes, port 110 was closed.

Opened port 110 on the router, checked that port 110 is open on the NAS (it wasn’t, but it is now).

I activated ‘Send & Receive’ in OE and it processed without any authentication errors! Yay!

But no new email is received. Boo!

So where is the incoming email going to, if it isn’t being delivered to the mailbox?

Is this an addressing issue with regard to the MX?

The reverse DNS seems to be working fine, because outbound email hits my Gmail account.

But why isn’t inbound email working?

[after a good night’s sleep]

I sat here for a while looking at the components:

  • Physical server
  • DNS Server
  • MailServer
  • Outlook Express client

I flowcharted the interfaces between the components, to make sure I hadn’t missed anything. I hadn’t.

And yet outbound email worked, but inbound email doesn’t.

I realised that there was another component I had ignored so far, the domain registrar details over at

Everything in the control panel looked right.

I knew the nameserver, A, and C records worked, because this domain is viewable.

That left the MX record in the registrar control panel.

Pause for thought:
Yes, it really can be complicating having two of everything, one of everything in the domain registrar control panel, and one of everything on your physical server, but that’s the way it is.

Anyway, I decided to bite the bullet, so I deleted the MX record in the registrar control panel, made myself a cup of tea, and then recreated the MX record.

I opened Outlook Express, composed an outgoing email and sent it to my Gmail account.

I went to Gmail, retrieved the email I’d just sent from OE and replied to it.

And blow me down, the reply appeared in Outlook Express almost instantly.

So we have inbound and outbound email in Outlook Express.

Following the same logic I deleted the email account I had configured in my phone last night and manually (rather than using the phone’s config wizard) configured the email account *as a POP3 account* (see point 5c above) and…

it worked straight away!


Now for the big test.

I took my phone offline from the LAN/WiFi, so it would be an external, remotely attached (via the internet) device, and sent a test email to my Gmail account.

That worked.

Then I replied from Gmail to my phone and that worked too.

So I have successfully configured internet email for a self-hosted domain.

I have no interest in mucking about with webmail, so I will not get involved with RoundCube, SquirrelMail or any of the others.

It has been a fun 12 hours. I’ve learned a huge amount, which will help me when I migrate from the NAS to the HP server.

And if this helps anyone else, that’s even better.

hosting email – the reverse DNS thing

The more I read about hosting email for a self-hosted domain, the more it looks like a massive pile of complexity.

The websites that I’ve been reading are split, 50:50, on whether it is good to self-host email, or not. There seems to be no middle ground, it’s real Marmite territory.

I’m going to push ahead, but I’ll do it against this domain, not a busier one.

But one of the strongly-recommended pre-reqs to self-hosting email is to implement reverse DNS.

The battle for the ground of hosting email starts here, with reverse DNS.


In a couple of days I’m going to begin tackling how to install and configure domain-related email (ie: might have several related email accounts:,, etc).

My NAS (which currently hosts this website) requires each email address to have an account on the NAS itself.

That brings with it questions about security that need to be dealt with.

And sooner or later I need to get a firm grasp on FTP/SFTP, within the context of self-hosted websites, not as a server admin (that’s a piece of cake, obv).

But before I do anything else, I need to move house.

I’ve been promised fast broadband when I get there, so I’ll see you in about five or six days.