[TriLUG] sendmail issue

Matt Flyer via TriLUG trilug at trilug.org
Thu Jan 23 13:22:17 EST 2020


I am by no means an expert on sendmail, but my first thought was that
it may be like Postfix in that it uses an access DB file for filtering.
 In short, you can put domains, addresses, etc and then designate them
as accept or reject. 

Maybe this will work.

See these two pages, especially post #13 in the second one which has
designations for FROM: and TO:

http://www.faqs.org/docs/securing/chap22sec178.html
and
https://www.linuxquestions.org/questions/linux-software-2/help-with-sen
dmail-filters-for-outgoing-mail-by-sender-recipient-77695/

Edit here is a third - a little more than halfway down it has some more
examples: 
https://www.linuxweblog.com/sendmail-accessdb-example

basically, create a text mapping file that has
To:undesireable.domain        REJECT

Be sure to run makemap hash command as having the .db file is not
enough.  Whether or not you need to adjust the configuration files to
utilize the access hash, I am not certain.


On Thu, 2020-01-23 at 12:53 -0500, Shannon Mecklenburg via TriLUG
wrote:
> We run sendmail on our debian mail servers and we have an unusual 
> request.  We would like to take any emails sent to a certain
> external 
> address and instead of attempting to deliver the email we would like
> to 
> send it to /dev/null.  This address is in the BCC line of the
> emails.  
> We will eventually edit all of the scripts to remove it, but in the
> mean 
> time is there a quick method to have sendmail drop those emails?
> 
> Thanks.
> 


More information about the TriLUG mailing list