Use of .forward file

Post Reply
darden
Posts: 8
Joined: Wed May 05, 2021 3:38 pm

Hello there,

I'm checking the use of exim4 filters with the .forward file, under the user Maildir folder, p.e:

Code: Select all

/home/user/mail/domain.com/account/.forward
With no luck. The sample forward is:

Code: Select all

# Exim filter

if $header_From: contains "[email protected]"
then
  testprint "from=$header_From to=$h_To"
  save /home/user/mail/domain.com/account/.Test/
  finish
endif
The Test folder exists, and contain {new, cur, etc} subfolders.

Code: Select all

sudo -u user /usr/sbin/sendmail -bf /home/user/mail/domain.com/account/.forward -f [email protected] < test-email.eml 
Seems Ok, as it says test-email would be moved to the desired folder.

But when i try to check the filter with a mail, nothing happens. Am I missing something?

Edit: Debian 11 with Exim 4.94.2
Last edited by darden on Mon Sep 01, 2025 6:11 pm, edited 1 time in total.
darden
Posts: 8
Joined: Wed May 05, 2021 3:38 pm

Ok, a more in depth check about this.

Code: Select all

sudo exim -d -bt "[email protected]" 2>&1
Will throw the userforward router with:

Code: Select all

userforward router skipped: account is not a local user
I guess .forward filtering won't work with virtual accounts, just for system accounts.
Post Reply