Mailing List Archive

system filter using procmail?
Hello folks...

Is there anyone using procmail for filtering all the incoming messages
instead of using exim's builtin system message filter facility?

I actually searched through the web site but only found that
the built-in exim system filter and procmail can be used simultaneously
but no details. (http://www.exim.org/FAQ.html#TOC302)

I am using debian GNU/Linux woody with exim 3.35.

Any comment will be greatly appreciated.

Thanks very much...
--
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
(o_ **WTFM**
(o_ (o_ //\
(/)_ (/)_ V_/_ http://kldp.org
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Re: system filter using procmail? [ In reply to ]
At 12:05 +0900 Soon-Son Kwon wrote:

>Is there anyone using procmail for filtering all the incoming messages
>instead of using exim's builtin system message filter facility?
>
>I actually searched through the web site but only found that
>the built-in exim system filter and procmail can be used simultaneously
>but no details. (http://www.exim.org/FAQ.html#TOC302)

If you mean FAQ 5033, it makes no specific mention of a system filter. You
can pipe messages through procmail using a pipe transport, but the system
filter runs before routing or directing time, ie it is run once per
message, rather than per recipient.
Re: system filter using procmail? [ In reply to ]
--
On Tue, Jul 23, 2002 at 12:05:13PM +0900, Soon-Son Kwon wrote:
| Hello folks...
|
| Is there anyone using procmail for filtering all the incoming messages
| instead of using exim's builtin system message filter facility?

Not me. It is possible to do, however, following the same (general)
technique as my spamassassin docs or as drweb instructs you to do.
(Note: I don't use drweb either, I'm assuming based on what I saw of
someone else's config)

-D

--
Your mouse has moved.
You must restart Windows for your changes to take effect.

http://dman.ddts.net/~dman/
--
[ Content of type application/pgp-signature deleted ]
--
Re: system filter using procmail? [ In reply to ]
On Tue, 23 Jul 2002, Soon-Son Kwon wrote:

> Hello folks...
>
> Is there anyone using procmail for filtering all the incoming messages
> instead of using exim's builtin system message filter facility?
>
> I actually searched through the web site but only found that
> the built-in exim system filter and procmail can be used simultaneously
> but no details. (http://www.exim.org/FAQ.html#TOC302)
>
> I am using debian GNU/Linux woody with exim 3.35.
>
> Any comment will be greatly appreciated.
>

Er exims filtering concept and the way procmail works are entirely
seperate beasts.

procmail is more a user-end agent, for sorting messages into different
folders based on whatever criteria one wants to setup.

procmail actually expects the message to appear on stdin, and then it
sends it wherever it needs to go. It can be used standalone, or can be
invoked in place of normal delivery by an MTA (exim, sendmail, etc),
either by the sysadmin setting it up system wide, or individually by
users on a system which supports piping from a user .forward file

exim's filtering specifically does NOT work like a pipe - its just a
language specifying what is to be done. Nothing actually happens until
after the entire filter file has been processed. exim's filtering
language does NOT work seperate of exim.

The 'user' filter concepts can function in a similar (but not identical)
capacity to what procmail does, but there is no procmail equivalent for
the 'system' filter capability of exim.


> Thanks very much...
> --
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> (o_ **WTFM**
> (o_ (o_ //\
> (/)_ (/)_ V_/_ http://kldp.org
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>
Re: Re: system filter using procmail? [ In reply to ]
Hello...I have been trying to apply procmail to exim but still a long way.

I followed your technique as following(based on your homepage) :-)
I added comment where I changed anything.

With this configuration, every incoming message were added to
/var/spool/mail/mail.

I think this has something to do with the following

user = mail

Does anyone know how to modify it so that it can be delivered to
the proper user's mbox or forwarded to the specified address
defined in the /etc/aliases?

And any option needed when invoking procmail in the spamcheck part?

Thanks very much.

---
Edit /etc/exim/exim.conf to include scanning (filtering) by spamassassin
in the delivery of a message.
In the Transports section add the following (order is irrelevant) :


# Spam Assassin
spamcheck:
driver = pipe

command = /usr/sbin/exim -oMr procmail-scanned -bS # changed here
transport_filter = /usr/bin/procmail #changed here

bsmtp = all

home_directory = "/tmp"
current_directory = "/tmp"

# must use a privileged user to set $received_protocol on the way back in!
user = mail
group = mail

return_path_add = false

log_output = true
return_fail_output = true

prefix =
suffix =

Insert the following at the top of the Directors section :


# Spam Assassin
spamcheck_director:

# do not use this director when verifying a local-part at SMTP-time
no_verify

# When to scan a message :
# - it isn't already flagged as spam
# - it isn't already scanned
# - it didn't originate locally (as long as I don't harbor spammers :-))
condition = "${if and { {!eq {$received_protocol}{procmail-scanned}} {!eq {$received_protocol}{local}} } {1}{0}}" #changed here
driver = smartuser
transport = spamcheck




On Tue, Jul 23, 2002 at 09:51:55AM -0500, Derrick 'dman' Hudson wrote:
> --
> On Tue, Jul 23, 2002 at 12:05:13PM +0900, Soon-Son Kwon wrote:
> | Hello folks...
> |
> | Is there anyone using procmail for filtering all the incoming messages
> | instead of using exim's builtin system message filter facility?
>
> Not me. It is possible to do, however, following the same (general)
> technique as my spamassassin docs or as drweb instructs you to do.
> (Note: I don't use drweb either, I'm assuming based on what I saw of
> someone else's config)

I am really curious to see that config... :-)
--
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
(o_ **WTFM**
(o_ (o_ //\
(/)_ (/)_ V_/_ http://kldp.org
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*