How to use Exim filters to forward to external email addresses?

phillcoxon

Verified User
Joined
Oct 17, 2015
Messages
27
For my hosting server, let's call it example.com, I want to forward various email addresses to external addresses.

This is so I can send scans from my printer direct to various cloud storage providers.

* [email protected] would be forwarded to my evernote inbox email address
* [email protected] would be forwarded to another external address etc.

I don't want to set up new email accounts in the Direct Admin and have them collect the email - all I want is to be able to use my server as the STMP gateway and immediately forward.

I tried setting up Exim filters in /etc/system_filter.exim and in .forward in the domain hosting account using the following but no luck - the messages get rejected with a 550 No such recipient here.

#Exim filter
if "$h_to:, $h_cc:" contains [email protected] then
unseen deliver [email protected]

Can anyone guide me with how to get this working?

Thank you!

Phill Coxon
 
Back
Top