Re: [exim] 'failed to lock' delivery deferral breaks system …

Top Page
Delete this message
Reply to this message
Author: kjohnson
Date:  
To: exim-users
Subject: Re: [exim] 'failed to lock' delivery deferral breaks system filter for me
Andreas, thanks for the suggestion.

if first_delivery then
...
endif

definitely improved things.

if $message_headers contains "\nX-old-from:" then

...

else

headers add "X-old-from: $header_from:"
headers remove "From"
headers add "From: <${address:$header_X-old-from:}>"

endif

is even better in my environment.

I considered adding a "headers_remove X-old-from" to the local delivery
transport, but was surprised (my ignorance) to discover that the system
filter executes first.

Also, a thank-you to the implementers of exim_lock, which made testing
easier.

Ken



-----Original Message-----
From: Exim-users [mailto:exim-users-bounces+kjohnson=eclypse.org@exim.org]
On Behalf Of exim-users@???
Sent: Friday, April 23, 2021 9:22 AM
To: exim-users@???
Subject: Re: [exim] 'failed to lock' delivery deferral breaks system filter
for me

On 2021-04-23 Ken via Exim-users <exim-users@???> wrote:
[...]
> I manage the email server for a small company in the US. Less than 1000
> received messages per day. A month or two ago I put in place a simple

exim
> system filter that removes the 'Friendly Name' from the From: header.


> headers add "X-old-from: $header_from:"
> headers remove "From"
> headers add "From: <${address:$header_X-old-from:}>"


> This works well most of the time and has had good acceptance from the user
> community as part of anti-phishing efforts.


> However, if delivery is deferred to one recipient because of a lock

failure
> (example follows) then the final line of the filter does not execute
> correctly, and more than one (perhaps all) recipients receive a message

with
> an empty From: header.


> ... defer (-9): failed to lock mailbox /var/mail/redacted (fcntl/flock)


> A pointer to a fix or workaround would be lovely; my current best
> alternative is to switch from mbox to maildir to reduce the frequency of
> delivery deferrals.


Hello,

try wrapping the whole thing in
if first_delivery then
endif

cu Andreas

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/