Delete email starting with mail@, uucp@

Matt Kettler mkettler at evi-inc.com
Thu Mar 27 21:25:44 GMT 2008


David Jourard wrote:
> Matt Kettler wrote:
>> If you're just going to delete it, save your network the bandwidth of 
>> receiving it and just 550 it at the MTA layer.
> 
> This sounds like a wonderful solution.
>>
>> For example, in sendmail you'd edit /etc/mail/access and add:
>> root at clientdomain.com  REJECT
>> mail at clientdomain.com  REJECT
>> uucp at clientdomain.com  REJECT
>> info at clientdomain.com  REJECT
>>
>> Then run make in /etc/mail/ directory to rebuild access.db from the 
>> access text file.
> What command do I use.  Is it makemap hash (like I've been doing for 
> virtualusertable).

Yes, it's makemap hash if you want to do it explicitly. However, odds are 
there's a Makefile in your /etc/mail. If there is, you can just do:
	cd /etc/mail
	make

and it should automatically rebuild any db hash files that are older than their 
corresponding source file.

> 
> Do I need to restart MailScanner (which also restarts sendmail).

I don't believe so. I'm pretty sure sendmail reads changes to all of the .db 
files on the fly.

> 
>>
>> Poof, no more mail to or from that address will ever be accepted by 
>> your MTA.
>>
> This would be great.
> 
> David J.



More information about the MailScanner mailing list