[BlueOnyx:04989] Re: disable all email

Bret Hughes bhughes at elevating.com
Wed Jul 7 16:53:22 -05 2010



David Booth wrote:
> *From:* Bret Hughes <mailto:bhughes at elevating.com>
> *Sent:* Thursday, July 08, 2010 6:18 AM
> *To:* BlueOnyx General Mailing List <mailto:blueonyx at blueonyx.it>
> *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
>
That is helpful David I did not know you could do that.  It is not as 
clean as just not handing mail at all for that domain though.  I suspect 
that the access file will get overwritten and have no idea if BX does 
anything with mailertable.

I am looking at the code now.   I got as far as the ccephp_set call and 
am now installing svn locally so I can checkout the C code and see where 
all this is stored.  I had hoped that the separation of services was 
built into the design but I guess it is not and I will need a work 
around until I get the underlying stuff figured out.  I am leaning 
toward cron overwriting the file and restarting sendmail when the 
local-host-name file changes at this point. At least that will not get 
lost with a software update to the BX code as it would if I dink with 
either the php or the c code.  I am not really a C coder by any means 
and as such am hesitant to really get into it but am curious how it all 
fits together now.  I have never looked at code that adds functions to 
php so it is interesting to me.
<https://devel.blueonyx.it/repos/trunk/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20100707/57a81021/attachment.html>


More information about the Blueonyx mailing list