Re[2]: [Exim] procmail with .forward

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Jason Ostrom
日付:  
To: exim-users
題目: Re[2]: [Exim] procmail with .forward
Thanks David S./Dan E./Walt R. You were all correct. The original question I
asked was how to run .procmailrc with .forward and localuser, and not
have duplicate mail delivered locally OR mail forwarded to external
hosts that has been marked as spam. And have all of this work on a
per-user basis. I was not thinking of the proper way to design mail
delivery, forwarding, and filtering, and you guys helped me see this.

I decided to take your advise and remove .forward and the userforward
router from everything. Now, the localuser transport delivers mail by
default for everyone. For anyone who wants special forwarding and
filtering, procmail is used by the user dropping in .procmailrc in
their home directory. SpamBouncer procmail recipes will filter the
mail, and procmail does the post-filtered mail forwarding, if
necessary.

Here is what everything looks like now:
# Routers
vacation:
driver = accept
check_local_user
require_files = $home/.vacation.msg
transport = vacation_transport
unseen

### procmail spam filter
### .procmailrc has to exist in homedir
### procmail handles spam filtering and all
### mail forwarding post-filtered
procmail:
driver = accept
check_local_user
require_files = ${home}/.procmailrc
transport = procmail_pipe

# This director matches local user mailboxes.
localuser:
driver = accept
check_local_user
transport = local_delivery

#Transports
local_delivery:
driver = appendfile
delivery_date_add
envelope_to_add
file = /var/mail/$local_part
group = mail
mode = 0660
return_path_add

#procmail
procmail_pipe:
driver = pipe
delivery_date_add = true
envelope_to_add = true
return_path_add = true
command = /usr/bin/procmail -f
user = ${local_part}
group = mail

vacation_transport:
driver = pipe
command = /usr/bin/vacation -a $original_local_part -t1 $local_part




David Stone> If your users can create a .procmailrc, they ought to know enough about it
David Stone> to forward mail from there instead of a .forward file.

David Stone> If your users are creaing .procmailrc files and can't figure out how to
David Stone> do this, well, broken forwards are probably the LEAST they have to worry
David Stone> about!!

David Stone> Cheers,

David Stone> Dave Stone