Re: qmail-qfilter script
Adrian Ho <[email protected]>
| Newsgroups | gmane.comp.sysutils.bgware |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 30, 2005 at 03:43:04PM -0400, Payal Rathod wrote: > On Thu, Jun 30, 2005 at 02:17:41PM -0500, Jeremy Kitchen wrote: > > with mailfront you would put in a tcprules rule for that IP to use > > MAILRULES="/some/file/somewhere" and that file would contain the rules > > for that user. > > Will qmail-qfilter be easier? Assuming you already have qmail-qfilter installed and ready to go, and have pretty solid scripting experience (your posting record suggests a weakness in this area) and a good understanding of how qmail-qfilter is used, then that would probably be easier than building, installing and mastering mailfront. When your filtering criteria get more complicated, though, you may find mailfront to be less of a pain to manage (unless they get so complicated that qmail-qfilter is still the only way to go). That said... > I mean just see the recipent, if present in say /etc/blocked ... exit > with exit code 31. That's pretty straightforward: #!/bin/bash # WARNING - UNTESTED! for RCPT in $QMAILRCPTS; do grep -q "$RCPT" /etc/blocked && exit 31 done exit 0 Read the qmail-qfilter man page for details. - Adrian