Disable mail, but keep postfix?


I have a special case that I can’t configure properly, if you could show me a solution, you would save my life!

I installed a virtualhost for a domain, on which I installed a CMS (which needs to send emails).

Particularity: I have a mail server outside my dedicated server (basically the pro mail service of a provider).

To do this I have configured the MX of the domain, it works well:

  • The mails are well received by the third party service.
  • My dedicated server is perfectly able to send mails.

EXCEPT if the mails are sent from my dedicated server to the third party server.

I guess postfix sees a local address and doesn’t try to read the bind MX fields…

This is very, very problematic because I absolutely need to send mail to this MX provider.

Anyone have an idea how to configure all this?

Thanks in advance.

Just disable mail for the domain. Am I missing something special about your circumstance that makes that not do the right thing?

I had thought about it, but if I disconnect the emails on the domain (which I’ve never done), what are the implications?
Which services are impacted? pop/imap? postfix?
Knowing that I absolutely must keep postfix.

I don’t know if I understand the question. If you disable mail for the domain, there would be no mail to retrieve for users in that domain. But, if you have domains that have mail, then they’ll be able to retrieve it via POP/IMAP.

Again, I’m not understanding, I don’t think. Disabling mail for a domain just disables mail for the domain. Postfix is a service that runs for the whole server, shared across all domains.

When you disable mail for a domain, it removes the entries for that domain in the Postfix virtual map file, which means no mail for the domain will be accepted. That’s pretty much all it does.

Domains are mostly independent entities. Disabling a service on a domain’s Edit Virtual Server page will not effect any other domains on the system. (But, if you modify settings on Features and Plugins, it will effect the whole system. Or, if you stop Postfix or Dovecot services, they obviously won’t work anymore.)

1 Like