ispCP - Board - Support
Disable mail for one domain - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: Disable mail for one domain (/thread-7925.html)



Disable mail for one domain - acaiger - 09-22-2009 01:41 PM

How can I disable the mail service for one domain only?

For one of our sites the e-mail service is provided elsewhere, and the DNS points to that IP address. That works fine. No external e-mails come to the webserver. But when our webserver sends an e-mail (for example feedback from a form) to a local e-mail address it is handled locally. How can we make e-mails addressed to the local domain sent externally just as e-mails with an external address are sent externally?

We want to do this on a per-domain basis, not for all domains.

Hope this makes sense!

Andy


RE: Disable mail for one domain - kilburn - 09-22-2009 03:00 PM

Yeah, it does. You have to comment the domain in both /etc/ispcp/postfix/working/domains and /etc/postfix/ispcp/domains. After that, execute "postmap /etc/postfix/ispcp/domains" and "/etc/init.d/postfix reload" to enable the change Smile


RE: Disable mail for one domain - joximu - 09-22-2009 06:04 PM

Theres another way: change the transfer volume to a number (eg. 1234) then delete all mail accounts and disable mail by setting number of mail accounts to -1 and then reset the transfer volume to the value it was... - I think with this, the domain should be removed from the postfix config... - maybe it depends on the release...

Otherwise: the solution of kilburn is good and always working. :-)

/J


RE: Disable mail for one domain - gOOvER - 09-22-2009 06:23 PM

This could be a nice Feature for ispCP Smile


RE: Disable mail for one domain - acaiger - 10-09-2009 06:27 PM

(09-22-2009 06:04 PM)joximu Wrote:  Theres another way: change the transfer volume to a number (eg. 1234) then delete all mail accounts and disable mail by setting number of mail accounts to -1 and then reset the transfer volume to the value it was... - I think with this, the domain should be removed from the postfix config... - maybe it depends on the release...

Otherwise: the solution of kilburn is good and always working. :-)

/J

Thanks for this advice, so far I haven't got it to work. What do you mean by "reset the transfer volume to the value it was", I'm afraid I don't understand that what the "transfer volume" is at all!
(09-22-2009 03:00 PM)kilburn Wrote:  Yeah, it does. You have to comment the domain in both /etc/ispcp/postfix/working/domains and /etc/postfix/ispcp/domains. After that, execute "postmap /etc/postfix/ispcp/domains" and "/etc/init.d/postfix reload" to enable the change Smile

I've tried this, but it doesn't seem to work Sad

The emails just disappear into a black hole, how can I find out what's going on?


RE: Disable mail for one domain - Kika - 01-09-2010 08:23 AM

Have somebody a solution for this problem? I need to do this too when i will replace the server.

If there is no solution for this than i will try to modify the DNS management to edit all DNS data not only the additionals.


RE: Disable mail for one domain - kilburn - 01-09-2010 12:25 PM

My solution is tested and working for many people, so it must be something wrong in your setup, but we can't further diagnose if you don't provide -at least- the postfix logs.


RE: Disable mail for one domain - acaiger - 02-03-2011 09:09 PM

I'm trying to do the same thing on another domain and it's not working. After following the instructions above (I also disabled e-mail for that domain in the control panel), I get the following error in /var/log/maillog:

Code:
Feb  3 10:43:36 myserver postfix/smtp[11521]: B28CD15D981: to=<some.one@example.com>, relay=none, delay=0.21, delays=0.21/0/0/0, dsn=5.4.6, status=bounced (mail for example.com loops back to myself)

Any idea what might be the reason for this?

I solved the problem myself! Big Grin
It was because this domain also had a domain alias.

Changing postfix settings didn't seem to work. I needed to change the IP address of the mail host in the DNS, and do it for both the domain and its alias.


RE: Disable mail for one domain - kilburn - 02-05-2011 08:43 PM

(02-03-2011 09:09 PM)acaiger Wrote:  I solved the problem myself! Big Grin
It was because this domain also had a domain alias.

Changing postfix settings didn't seem to work. I needed to change the IP address of the mail host in the DNS, and do it for both the domain and its alias.

Changing postfix settings did the work that the original poster asked, where he explicitly said:
Quote:For one of our sites the e-mail service is provided elsewhere, and the DNS points to that IP address.
So yep, you *also* have to change the DNS settings, but the guy already did it before asking so I didn't say this explicitly when answering him...