<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.17063" name=GENERATOR></HEAD>
<BODY id=MailContainerBody 
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" text=#000000 
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><B>From:</B> <A 
title="mailto:bhughes@elevating.com CTRL + Click to follow link" 
href="mailto:bhughes@elevating.com">Bret Hughes</A> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV style="BACKGROUND: #f5f5f5">
<DIV><B>Sent:</B> Thursday, July 08, 2010 6:18 AM</DIV>
<DIV><B>To:</B> <A title=blueonyx@blueonyx.it 
href="mailto:blueonyx@blueonyx.it">BlueOnyx General Mailing List</A> </DIV>
<DIV><B>Subject:</B> [BlueOnyx:04983] Re: disable all email</DIV></DIV></DIV>
<DIV><BR></DIV><BR><BR>Michael Stauber wrote: 
<BLOCKQUOTE cite=mid:201007071129.48432.mstauber@blueonyx.it type="cite"><PRE wrap="">Hi Bret,

  </PRE>
  <BLOCKQUOTE type="cite"><PRE wrap="">I have a client that has about 120 sites that are now only webservices
with no email.  Dns is working and all email outside the box works
fine.  The issue is that as they were setting stuff up they did not
disable the email for the sites and/or remove the localhostname
aliases.  I suspect I can remove all the entries in
/etc/mail/local-host-names that are troublesome but it appears that the
gui will not reflect that email is disabled and some (all?) of the
entries will be put back someone changes something email related.

For instance :

Site name <A class=moz-txt-link-abbreviated href="http://www.mydomain.com">www.mydomain.com</A> has  an  Email Server Alias of mydomain.com

There is an entry in /etc/mail/local-host-names for both
<A class=moz-txt-link-abbreviated href="http://www.mydomain.com">www.mydomain.com</A> and mydomain.com

disabling email in the gui does not affect that
    </PRE></BLOCKQUOTE><PRE wrap=""><!---->
Yes, because /etc/mail/local-host-names is the wrong place for that.

When you tick the box for "disable all email" for a site, then the following 
lines gets added to /etc/mail/access:

### Start Block Email for Virtual Site: site4.smd.net ###
<A class=moz-txt-link-abbreviated title="http://www.site-in-question.com CTRL + Click to follow link" href="http://www.site-in-question.com">www.site-in-question.com</A>           ERROR:5.1.1:550 User unknown
### END Block Email for Virtual Site: site4.smd.net ###

That'll then make sure that all email to that site is rejected with a "User 
unknown" message.

  </PRE></BLOCKQUOTE><BR>I don't think I need the user to be rejected. I need 
sendmail to not even try to deliver locally.  It feels like this is what is 
happening:<BR><BR>A web form on <A class=moz-txt-link-abbreviated 
title="http://www.mydomain.com CTRL + Click to follow link" 
href="http://www.mydomain.com">www.mydomain.com</A> generates an email for <A 
class=moz-txt-link-abbreviated 
href="mailto:someone@mydomain.com">someone@mydomain.com</A><BR>PHP calls 
sendmail on the local box <BR>sendmail looks in its config to see if it is 
supposed to handle mail for mydomain.com<BR>if it is it delivers the mail 
locally<BR>if it is not it does a dns call to find the mx record for 
mydomain.com and sends the mail to that ipaddress<BR><BR>It is the latter that I 
need to have happen.  <BR>I want mail to be sent to mydomain.com users just 
not on this box.  It sounds like I can get close by removing the entries in 
local-host-names and restarting sendmail.<BR><BR>Where are the records stored 
for the email aliases for the sites so I can at least remove them 
programatically.<BR>Does anyone know?<BR><BR>Thanks for the 
response,<BR><BR>Bret<BR><BR>
<P>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>So you want mail for that domain to be sent to a 
different ip address w.x.y.z?</FONT></DIV>
<DIV><FONT face=Arial size=2>You do that with a line in 
/etc/mail/access</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>mydomain.com    RELAY</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and another line in 
/etc/mail/mailertable</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>mydomain.com    smtp:w.x.y.z</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Then</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>cd  /etc/mail</FONT></DIV>
<DIV><FONT face=Arial size=2>make</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>