Нашёл
нужную инфу в факе екзима:
If you want to run pipes and examine their results, you need to set up a single delivery to a delivery agent such as procmail which provides this kind of facility
Нашёл в мане процмыла, как его вызывать, чтоб он не баунсил письмо в случае ошибки, а репортовал о "временной ошибке":
-t Make procmail fail softly, i.e., if procmail cannot deliver the
mail to any of the destinations you gave, the mail will not
bounce, but will return to the mailqueue. Another delivery-
attempt will be made at some time in the future.
Нашёл и
такое:
(Note: invoking procmail with the -t flag causes it to return EX_TEMPFAIL instead of EX_CANTCREAT. This would cause the message to be requeued. However, this is not generally recommended.)
Нашёл образцы, как это сделано:
тута и
здеся.
Сделал. Конфиги:
exim:
Код: Выделить всё
begin routers
...
procmail:
driver = accept
check_local_user
local_parts = my-user
transport = transport_pipe_procmail
require_files = ${local_part}:${home}:${home}/.procmailrc:/usr/local/bin/procmail
no_verify
begin transports
...
transport_pipe_procmail:
driver = pipe
command = "/usr/local/bin/procmail -t"
temp_errors = *
timeout_defer = true
timeout = 1h
procmailrc:
Код: Выделить всё
PATH=$HOME/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/local/bin:/usr/local/sbin
MAILDIR=$HOME/Mail/ # Youd better make sure it exists
LOGFILE=$HOME/log/procmail.log
LOGABSTRACT=all
LOCKTIMEOUT=600
VERBOSE=yes
YEARM=`/bin/date +%Y-%m`
:0 H
* ^From.*MAILER-DAEMON
/dev/null
:0 c
$YEARM
:0 H
* ^To.*my-user@myhost
$HOME/log/test
На $HOME/log/test установлены права, запрещающие пользователю процмыла писать в файл. В логе процмыла ошибка светится. А лог екзима говорит - успешно доставлен.

Куда ещё подскажете копать?
