Re: Rejecting mail based on a Milter results
> On Jun 27, 2019, at 12:38 AM, post...@aptget.dk wrote: > > Wed, 26 Jun 2019 20:23:44 -0600 skrev "@lbutlr" : > >> The spamass-milter is not rejecting mail that scores above the number set in >> the -r flag for the milter (confirmed by other people this is a bug in >> spamass-milter). >> >> Is there something I can do in postfix to reject mails that the Milter logs >> like: >> >> spamd: result: Y 18 >> >> Where “18” is a something I set like “>=10”? >> >> Seems a long shot, but it is unlikely anyone is working on spamass-milter at >> this point. >> > > spamass-milter works fine here on FreeBSD current Possibly it is an 11.2 issue then. > in /etc/rc.conf > spamass_milter_localflags="-r 7 ... " Yep, that is what doesn’t work (though mine is 10). spamass_milter_enable="YES" spamass_milter_socket_owner="postfix" spamass_milter_localflags="-u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10 “
Re: Rejecting mail based on a Milter results
On 27 Jun 2019, at 19:57, @lbutlr wrote: > Possibly it is an 11.2 issue then. > > >> in /etc/rc.conf >> spamass_milter_localflags="-r 7 ... " > > > Yep, that is what doesn’t work (though mine is 10). > > spamass_milter_enable="YES" > spamass_milter_socket_owner="postfix" > spamass_milter_localflags="-u spamd -e -i 65.121.55.40/29 -i 127.0.0.1 -r 10 “ Jumping in the me too boat, also on 11.2 (as far as I can remember this used to works on FreeBSD 9…) -- matt [at] lv223.org GPG key ID: 7D91A8CA signature.asc Description: OpenPGP digital signature
How to validate alias/map files?
Hey all, I'm using procedurally-generated alias files from a database, and distributing them with puppet, and would like to have postalias check the files for duplicate entries and/or other errors before I install them. I'd like to use the same program used to install the DB, rather than hacking a validator together with perl or something. As an example, an empty left-hand foo: would be an error I want to catch. I want to catch duplicate items, as well. I'd rather not parse stderr for this. There seem to be two obvious missing features: First, the ability to not output a file, but just parse the existing one. Second, the abiity to generate errors (as in, exit code errors) rather than warnings. This could be added to postfix without changing existing behavior. Is there any good way that people would recommend parsing alias and map files? The closest I've come would be counting the number of lines of output to stderr, rather than looking at exit code, but that still seems contrived. Perhaps this is best for the manpage: what errors *will* cause actual non-zero exit codes? -Dan -- Dan Mahoney Techie, Sysadmin, WebGeek Gushi on efnet/undernet IRC FB: fb.com/DanielMahoneyIV LI: linkedin.com/in/gushi Site: http://www.gushi.org ---
Re: How to validate alias/map files?
On Thu, Jun 27, 2019 at 05:39:14PM -0700, Dan Mahoney (Gushi) wrote: > Is there any good way that people would recommend parsing alias and map > files? The closest I've come would be counting the number of lines of > output to stderr, rather than looking at exit code, but that still seems > contrived. One possible work-around is: ln -f foo foo.tmp postalias hash:foo.tmp gotkeys=$(postmap -s hash:foo.tmp | pcregrep -c '^[^\s#]') wanted=$( (cat foo.tmp; echo "@ @") | pcregrep -c '^[^\s#]' ) if [ "$gotkeys" -eq "$wanted" ]; then /bin/mv foo.tmp.db foo.db else # Error ... /bin/rm -f foo.tmp foo.tmp.db exit 1 fi -- Viktor.