[TriLUG] sendmail issue

Shannon Mecklenburg via TriLUG trilug at trilug.org
Thu Jan 23 15:37:48 EST 2020


Thanks Matt.  Adding an entry to the access file to REJECT the address 
and then adding the blacklist option to sendmail.mc appears to be doing 
what we want.

On 1/23/2020 1:22 PM, Matt Flyer wrote:
> 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