>>>> what is the best way to disable remote mail to user root@sitename on
>>>> a cbq system? i'd like to reject everything to root@whateversite
>>>> that does not originate from localhost.
>>>
>>> no ideas on this? ;)
well .. you could run this everytime to change someting in the gui...
perl -pi -e "s|root@|# root@|" /etc/mail/virtusertable
Ok I must admit this way is pretty cheesy... keep reading
> > Just create an "alias" (outside the Cobalt/Bluequartz part) named
> > "discard"
> > the sends things to /dev/null. Then create a .forward (through the GUI)
> > for
> > root or whatever account you want to "discard" mail for and direct it
> > to "discard". Been doing this for years on various servers and it works
> > great...
This sounds like a good idea for accounts that are not the user root and
that you don't want to get mail to... which makes me wonder why you have
the account anyway... you should delete it and make it bounce since there
is no reason to process it throught spamassassin, Clamav, or Wordassassin or
anything else if your just going to delete it. So... Change the username!
>> If you want to automatically discard ALL messages to root, then edit
>> /etc/mail/aliases and change ...
>> # Person who should get root's mail
>> root: admin
>> ... to ...
>> # Person who should get root's mail
>> root: /dev/null
>>
>> This is insofar more efficient as /etc/mail/aliases is rather static
>> and doesn't get overwritten by the GUI. The only negative side effect
>> that I see there is that those emails still get accepted and
>> processed before they're being trash-binned, which may be
>> undesireable.
>>
>
> but that would also discard local mail to user root, so i'll have to
> figure
> out a spamassassin rule.
as Michael mentions, root mail will still be processed... however the
problem with this is that you loose all your root mail and in this case I
mean things like system messages.... as far as a spamassassin rule... I
don't want to process a ton of spam when I really don't need to...
So, What to do?
First fix the gui so it stops adding this in...
edit /usr/sausalito/handlers/base/vsite/Vsite.pm
and on line 53 you will find this section
# Mail
%DefaultAliases = (
"MAILER-DAEMON", 1,
"postmaster", 1,
"sys", 1,
"nobody", 1,
"root", 1,
'admin', 1
);
Here you can just delete the root line... HOWEVER I would suggest you change
it to abuse to comply as needed to the RFC's... see
http://www.rfc-ignorant.org/ NOT that I enjoy all the spam I get form
this... If you do this you will need to add abuse to your /etc/mail/aliases
file or to a site in the gui that you will be checking and send the mail
there... in the aliases file something like...
abuse: admin
should do it... (make sure to run newaliases and restart sendmail)
(admin mail speach excluded :)
anyway.. after it's changed you can get rid of all the root redirects in
the virtusertable doing something like...
[root /root]# grep -vE "^root@" /etc/mail/virtusertable > /tmp/something
[root /root]# cat /tmp/something > /etc/mail/virtusertable
[root mail]# makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
[root mail]# /etc/rc.d/init.d/sendmail stop
[root mail]# killall -9 sendmail
[root mail]# /etc/rc.d/init.d/sendmail start
and your done...
--
Zeffie...
http://www.zeffie.com/
Now I build it and You surf it!
Cobalt RaQ Repairs, Development, and Maintenance.
Home of the Worlds Largest Collection of RaQ Updates!
Cobalt Spam Filter, Security, Firewall, Anti Virus Products.
Yahoo: wwwZeffie ... Aim: wwZeffie ... Msn wwZeffie (at mark) hotmail.com ...
US 734-446-0350 734-454-9117 US Toll Free 800-231-4459 UK 0208-150-6860