On Mar 9, 2020 1:34 AM, Martijn van Duren <opensm...@list.imperialat.at> wrote: > > On 3/6/20 5:00 PM, epektasis wrote: > > Greetings. I have my own blacklist file of email addresses > > (some in the format microcen...@microcenter.com and some in > > the format *@squaredeals.com), one per line. I would like to > > filter each incoming email so that a mail-from address > > that matches any line in the blacklist file will go to a > > junk file. In the smtpd.conf I have tried > > > > table blksender file:/etc/blksender > > filter mail-from <blksender> junk > > match filter mail-from <blksender> junk > > > > but get syntax errors on both of the last two lines when > > checking the configuration. There's something I'm not > > understanding and am asking for advice. > > epektasis > > > Have another look at the manpage: > filter filter-name phase phase-name match conditions decision > Register a filter filter-name. A decision about what to do > with the mail is taken at phase phase-name when matching > conditions. Phases, matching conditions, and decisions are > described in MAIL FILTERING, below. > > So without testing (you should do that yourself anyway) I think what you > want would be: > > table blksender file:/etc/blksender > filter blksender phase mail-from match mail-from <blksender> junk > listen on <interface> <options> filter blksender >
Also look at table(5) '*' is only allowed on the domain side of the '@'. Edgar