The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to turn off mail for a domain, nothing in, nothing out

Discussion in 'E-mail Discussions' started by matt621, Jul 6, 2004.

  1. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    I have several accounts we don't want any email on. Nothing in, nothing out. How do I do that?

    thanks.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Remove their DNS MX record
    Remove their domain from /etc/localhosts
    Add their domain to /etc/remotehosts

    That should cover just about everything.
     
  3. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    tried removing the mx record. whm won't allow me to do so. Gives an error msg.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can just edit the zone file directly in /var/named/domain.com.db and remove the line with the MX record on it.
     
  5. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Matt,

    Would you, please, post a note telling us what you did to get this working.

    Thanks!;)
     
  6. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    So far, I have not been able to achieve what I needed.

    If I try to remove the MX record using "edit dns record" for the domain(s) in question, I cant'. I get an error msg.
     
  7. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Why don't you do it how chirpy suggested? He is telling you how to do it directly (without going through WHM).
     
  8. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Just to clarify,

    Is this the line I should be removing from domain.com.db:

    domain.com. 14400 IN MX 0 domain.com.

    and then restart Apache?

    Thanks
     
  9. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    I'm not that good at command line editing. That's the reason I use cpanel in the first place. Trying to use the 'edit' function does not work.
     
  10. jester.ro

    jester.ro Well-Known Member
    PartnerNOC

    Joined:
    Feb 6, 2004
    Messages:
    304
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bucharest, Romania
    cPanel Access Level:
    DataCenter Provider
    yes, that's the one.
    then ndc reload, or rndc reload, not apache.
     
  11. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    what's ndc/rndc?
     
  12. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    I believe they mean restart named :)

    Mickalo
     
  13. jester.ro

    jester.ro Well-Known Member
    PartnerNOC

    Joined:
    Feb 6, 2004
    Messages:
    304
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bucharest, Romania
    cPanel Access Level:
    DataCenter Provider
    it's not really restarting named, it's just reloading the zones.
    0 downtime.
    i don't know exactly how cpanel restarts named from the WHM.
     
  14. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    the WHM restarts BIND which I think is the same thing as restarting named, so the DNS zones are updated.

    Mickalo
     
  15. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    I removed the MX record in the DB and hope that turned off the email server. Now, my question is: know can I test it?
     
  16. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Do an nslookup on the MX record. You can do it directly from your client machine using a built in tool, or through a web based DNS report service. No MX = no mail delivery.

    If all you did was remove the MX record and did not follow the rest of chirpy's instructions, then you only fought half (incoming mail) the battle ;)
     
  17. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    I couldn't find/locate these files:
    /etc/localhosts
    /etc/remotehosts

    So, I am not sure what Chirpy is referring to?
     
  18. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    He meant to say

    /etc/localdomains
    /etc/remotedomains

    :D
     
  19. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Thank yo for your help.

    I found /etc/localdomains

    but couldn't locate/find not /etc/remotedomains

    andy idea?
     
  20. jester.ro

    jester.ro Well-Known Member
    PartnerNOC

    Joined:
    Feb 6, 2004
    Messages:
    304
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bucharest, Romania
    cPanel Access Level:
    DataCenter Provider
    if you're sore it's not there, create it

    touch /etc/remotedomains

    then edit /etc/remotedomains using your favourite editor, and type the name of the domain there. save the file, and restart exim (i don't know if it's necesarry, but it's better like that)
     
Loading...

Share This Page