Friday, August 31, 2018

Re: Block TLD senders with opensmtpd

Hello,

complists@risei.net (Scott Seekamp), 2018.08.31 (Fri) 00:55 (CEST):
> Looking at the manpage for smtpd.conf it's possible to block a domain
> with:
> reject sender <table>
> and put:
> @domain.tld
> Is it possible to block entire tld's and if so what would the syntax be?
> I'd like to filter out high spam content senders ".bid, .date, .us"
> that I"m seeing and avoid spam processing altogether.

I think you cannot match on the "From:" in the mail header.

Remember config syntax and structure in 6.4 will be different from 6.3,
you did not tell what you use...

What I *would* try for -current:

table denydomains { "*.bid", "*.data" }
match mail-from <denydomains> reject
match helo <denydomains> reject

"smtpd -n -v -f" says that's OK, I'm not going to test it live.
And it's only for "MAIL FROM:" and "HELO", easy to forge.

I think with 6.3 (or earlier) this is *not* going to work, unless
someone sends with "MAIL FROM:<me@biz>":

table badsenders { "@biz", "@date" }
reject from any sender <badsenders>

Marcus

No comments:

Post a Comment