Current time: 04-25-2024, 11:02 PM Hello There, Guest! (LoginRegister)


Post Reply 
Disable mail for one domain
Author Message
acaiger Offline
Newbie
*

Posts: 5
Joined: Sep 2009
Reputation: 0
Post: #1
Disable mail for one domain
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
09-22-2009 01:41 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: Disable mail for one domain
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
09-22-2009 03:00 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #3
RE: Disable mail for one domain
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
09-22-2009 06:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #4
RE: Disable mail for one domain
This could be a nice Feature for ispCP Smile
09-22-2009 06:23 PM
Visit this user's website Find all posts by this user Quote this message in a reply
acaiger Offline
Newbie
*

Posts: 5
Joined: Sep 2009
Reputation: 0
Post: #5
RE: Disable mail for one domain
(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?
(This post was last modified: 10-09-2009 06:31 PM by acaiger.)
10-09-2009 06:27 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Kika Offline
Member
***

Posts: 293
Joined: Feb 2007
Reputation: 8
Post: #6
RE: Disable mail for one domain
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.
01-09-2010 08:23 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #7
RE: Disable mail for one domain
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.
01-09-2010 12:25 PM
Visit this user's website Find all posts by this user Quote this message in a reply
acaiger Offline
Newbie
*

Posts: 5
Joined: Sep 2009
Reputation: 0
Post: #8
RE: Disable mail for one domain
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.
(This post was last modified: 02-03-2011 09:31 PM by acaiger.)
02-03-2011 09:09 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #9
RE: Disable mail for one domain
(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...
(This post was last modified: 02-05-2011 08:43 PM by kilburn.)
02-05-2011 08:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)