From dave at jonesol.com Tue Aug 1 07:32:28 2023 From: dave at jonesol.com (Dave Jones) Date: Tue, 1 Aug 2023 02:32:28 -0500 Subject: block outgoing mail In-Reply-To: References: Message-ID: I use swatch to monitor the mail log and trigger the adding of MTA discard entries based on rate thresholds. watchfor / postfix\/cleanup.* hold: header Received: .*; from=<(.*)> / mail addresses=mailadmin\@example.com,subject=[swatch] Excessive sender $1 threshold type=both,count=500,seconds=60,track_by=$1 exec /usr/local/bin/blockSender.sh $2 On Wed, Jun 21, 2023 at 9:18?PM Rick Gutierrez wrote: > hi list, I need a little help, I have some users who are sending > emails as lists, and a lot of them cause the server to blacklist due > to the amount of email they send, some of those emails bounce because > they don't exist, is there a way for mailscanner to deny the out to > those addresses that bounce a lot. > > I found this thread, but it is not very clear and I tried to do it but > without success. > > > https://mailscanner.mailscanner.narkive.com/GmR6FwNu/block-outgoing-mail-with-rules > > Mailscanner.conf add: > > Block Outgoing To = /etc/MailScanner/rules/block.outgoing.rules > > inside rules make a file block.outgoing.rules > > block.outgoing.rules > From: ricardo at domainnew.com yes > > Any idea what I could be doing wrong? > > > -- > rickygm > > http://gnuforever.homelinux.com > > > -- > MailScanner mailing list > mailscanner at lists.mailscanner.info > http://lists.mailscanner.info/mailman/listinfo/mailscanner > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amartin at protected.ca Wed Aug 30 13:53:42 2023 From: amartin at protected.ca (Andrew Martin) Date: Wed, 30 Aug 2023 09:53:42 -0400 Subject: MSMilter Header Order Message-ID: <1301210f-6798-48c4-82d7-258d02b34b68@protected.ca> Greetings! Although new to this list, I've been using MailScanner for several years with great results - thank you Shawn and contributors! I've been testing MailScanner using the milter method and so far everything works well, with the exception of where milter headers are placed in the final message. My setup is: Postfix -> OpenDKIM Milter -> OpenDMARC Milter -> MailScanner Milter The (patched) OpenDKIM and OpenDMARC milters are configured to insert their Authentication-Results headers at index 0 using smfi_insheader(). This should theoretically insert these headers _above_ the Received header created by MSMilter (this works in non-milter mode where Postfix creates the Received header). Instead, they are appearing below the Received header created by MSMilter. I believe this leads SpamAssassin to ignore the Authentication-Results header (treated as not locally-generated/trusted headers). Am I missing a configuration option that fixes this? If not, is there a workaround to get the headers to show up above the Received header? - Andrew.