[BlueOnyx:04987] Re: disable all email

David Booth david at goulburn.net.au
Wed Jul 7 16:21:52 -05 2010


From: Bret Hughes 
Sent: Thursday, July 08, 2010 6:18 AM
To: BlueOnyx General Mailing List 
Subject: [BlueOnyx:04983] Re: disable all email




Michael Stauber wrote: 
Hi Bret,

  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 www.mydomain.com has  an  Email Server Alias of mydomain.com

There is an entry in /etc/mail/local-host-names for both
www.mydomain.com and mydomain.com

disabling email in the gui does not affect that
    
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 ###
www.site-in-question.com           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.

  
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:

A web form on www.mydomain.com generates an email for someone at mydomain.com
PHP calls sendmail on the local box 
sendmail looks in its config to see if it is supposed to handle mail for mydomain.com
if it is it delivers the mail locally
if it is not it does a dns call to find the mx record for mydomain.com and sends the mail to that ipaddress

It is the latter that I need to have happen.  
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.

Where are the records stored for the email aliases for the sites so I can at least remove them programatically.
Does anyone know?

Thanks for the response,

Bret




So you want mail for that domain to be sent to a different ip address w.x.y.z?
You do that with a line in /etc/mail/access

mydomain.com    RELAY

and another line in /etc/mail/mailertable

mydomain.com    smtp:w.x.y.z

Then

cd  /etc/mail
make


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20100708/720cb44b/attachment.html>


More information about the Blueonyx mailing list