Deliver SPAM too IMAP folder
Glenn Steen
glenn.steen at gmail.com
Mon Feb 5 17:34:12 CET 2007
On 05/02/07, uxbod <uxbod at splatnix.net> wrote:
> We are not using Exchange which is why I said about IMAP. I thought Postfix, which I use, would just deliver to the Maildir and it is down to the client software to either move automatically or via input to a folder.
>
> With respect to procmail then this surely would require a batch job to execute for each user, and I though procmail was used to pull mail from a remote source and distribute, not on the same server.
>
Eh. No. I think you have it confised with fetchmail;-). Procmail is
used to "process" mail in a variety of ways... Read the procmailex
manpage to see some nice examples.
You can use procmail to do the local mailbox delivery by way of the
mailbox_command. This is good, since you'll have procmail run for each
delivered mail without having to fiddle with any (fake) .forward file,
as you would if you only wanted procmail for _some_ users...
This is snipped from a main.cf.dist on one of my Mandriva systems...
Explains it better than I do:-):
----
# The mailbox_command parameter specifies the optional external
# command to use instead of mailbox delivery. The command is run as
# the recipient with proper HOME, SHELL and LOGNAME environment settings.
# Exception: delivery for root is done as $default_user.
#
# Other environment variables of interest: USER (recipient username),
# EXTENSION (address extension), DOMAIN (domain part of address),
# and LOCAL (the address localpart).
#
# Unlike other Postfix configuration parameters, the mailbox_command
# parameter is not subjected to $parameter substitutions. This is to
# make it easier to specify shell syntax (see example below).
#
# Avoid shell meta characters because they will force Postfix to run
# an expensive shell process. Procmail alone is expensive enough.
#
# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
#
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"
----
HtH
Cheers
--
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se
More information about the MailScanner
mailing list