<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<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" 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" 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>
</body>
</html>