[exim] Issues sending mail from system/transport filters

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Blough, William A
日付:  
To: 'exim-users@exim.org'
題目: [exim] Issues sending mail from system/transport filters

Hi folks -

It seems that I've gotten stuck trying to implement a filter.

I'm trying set things up to automatically send a notification message to a
remote address when mail is received at specific local addresses (the actual
mail has to stay on the local system for security reasons, otherwise we'd
just forward it).

Currently, I'm trying to do this with a system filter. Testing with -bF
passes and shows the expected output, but when live, the behavior of the
mail command is different from what I expect. I'm not sure if it's a syntax
issue, something undocumented, or a misunderstanding on my part. Any
insight (including a better way to do this, if there is one) would be
appreciated.


I'm using Exim 4.63 (Debian Etch). The system filter looks like this -


### Start filter code ###

#(conditional tests omitted for brevity)

mail
    to "recipient@???" # <-- this will eventually be
replaced with a lookup
    from "notifier@@local-domain.example"
    reply_to "bounces@???"
    subject "You have received a message"
    text "\nYou can retrieve it at http://local-domain.example\n"



finish

### End filter code ###


>From what I can tell from reading the filter spec, this should send an email

with the desired headers/body to the remote address, and also allow a local
delivery of the original message (since the mail command is not considered a
significant delivery).

The local delivery is occurring fine, and an email is being sent to the
remote address. However, only the recipient is being changed - the from,
subject, reply-to, subject, and message body are all copied from the
original mail message (the one for local delivery).

As I mentioned earlier, testing with -bF seems fine (notification message
headers/body are correct) -

Return-path taken from "Return-path:" header line
Return-path = test.user.2@???
Sender      = root@???
Recipient   = test.user.1@???
Testing Exim filter file "notify_filter.exim"


Mail to: recipient@???
from: notifier@@local-domain.example
reply_to: bounces@???
subject: You have received a message
text: \nYou can retrieve it at http://local-domain.example\n
Finish
Filtering did not set up a significant delivery.
Normal delivery will occur.


Can anyone shed some light on this problem for me? I'm stumped.

Thanks,

Bill