I'm using Exim with Cpanel. I created email forwarding from 'email@example.com' to 'forward@example.com' and 'email2@example.com' to 'forward2@example.com'.
I want to filter only emails that are forwarded so if a user sends an email to 'email@example.com' no thing would happen but on forwarding this email to 'forward@example.com' I want to filter it.
I can't do that:
if ("$h_to:, $h_reply_to:" contains "forward@example.com")
because I don't want to target emails sent directly to 'forward@example.com'.
I tried to create .forward
file in /home/
and in /home/user/
but it's not doing anything.
I created a filter file:
touch /usr/local/cpanel/etc/exim/sysfilter/options/forward_filter
and enabled it I just need the condition to target the forwarded emails only.