[AktiviX-discuss] mail filters

Paul M tallpaul at ml1.net
Thu Jun 7 18:59:10 UTC 2007


On Thu, 2007-06-07 at 18:56 +0100, echo wrote:
> Hi Folks,
> 
> I'm trying to set up a filter on the From: header of an email, so that I
> can avoid seeing emails from particular members of a list. However, I
> don't seem to be able to work out how.
> 
> I've tried using the web-interface in horde, but it doesn't seem to have
> any effect. And when I tried adding to my (otherwise empty) .forward
> file the lines
> 
> if $h_From: contains "undesired at listmember.org" then
>         seen finish
> endif
This looks like an exim spam filter. While these work in a .forward file
on an exim based system the mail server for aktivix.org claims* to be
running Sendmail.

In that case a .forward is either a comma separated list of email
address
or a pipe command, most often to procmail.

Procmail would be the usual way of doing something like this.

In your .forward file you probably need something like this:

"|IFS=' ' && exec /usr/local/bin/procmail || exit 75 #echo"

Be warned that procmail might not be installed in /usr/local/bin. To
find out where procmail is installed, type which procmail or ask someone
that knows. Actually I cut and pasted the last bit and its
probably /usr/bin/procmail at a guess.

(see http://pegasus.rutgers.edu/~elflord/unix/procmail.html#forward  &
http://www.faqs.org/faqs/mail/filtering-faq/section-18.html)

Then in your .procmailrc file you need something like this.

# If the sender is in the killfile then drop the mail into killfile
:0:
# grep for it in the killfile
* ? grep -i `formail -rtzxTo:` $HOME/.procmail_killfile
/dev/null

This is something I found with a quick google, you might find something
more sophisticated with a bit more digging but it looks like it will do
the job. The syntax for procmail recipes is not the easiest thing to get
your head round at first, but its well documented and there are plenty
of examples around (including the  procmailex man page).

Hopefully someone will pipe up with the specifics of this specific
system as this is general advice, I'm kind of assuming you can edit all
these files for starters.

> 
> I found that I didn't receive any mails at all. From anyone.
> 
> Any advice?

HTH 

Paul  M

> /echo
> 

*It might be a sensible** MTA claiming to be something else, but
normally they say so.

** Standard dig at Sendmail/plug for Postix (or Exim, or even, FSM
forbid Qmail) 

-- 
      "There are no innocent bystanders,
what were they doing there in the first place?"
             William S. Burroughs





More information about the AktiviX-discuss mailing list