Email Filters and Global Email filters

chrismfz

Verified User
Joined
Jul 3, 2019
Messages
34
We have several users (cPanel users) that use both
"Email Filters" and "Global Email Filters" to filter mail before their inboxes to folders or to forward / deny them.

DirectAdmin has a similar functionality but for Spam only. (Dashboard >E-mail Filters)

------------------------------------------
"Block by" (word / mail / domain / size) -- Value .

Actions: Drop or Send to spambox.
------------------------------------------

I didn't see any functionality like cPanel's except blocking or dropping. How about if I want to forward every mail from "server.xxx" or any subject containing "directadmin" to a folder or another mail or something like that ?


And any customers that already have multiple filters what will they become if I migrate them to DA ?
They are "transferred" with the account ? If they want to edit them where are they ? Or they don't migrate at all ?
 
Thank you Alex. But it's not about "me" or how we gonna do it for us (I will take a look personally), but the existing customers (were they are hosted in cpanel now).

They used a specific way, and either there is a menu or not, what will happen to existing
filters that already exists if I migrate such accounts over DA.

for global filtering for example there is /etc/vfilter/ in cPanel
and /home/user/etc/domain/username for user's filters.

Is there an alternative for DA ?

Even if there is no plans for GUI like spamassasin in DA (which is basically the same interface but with a few more options - like where to deliver the mail or if it forward it or deny it) - What will happen to accounts with filters when they get migrated ?
Filters will vanish ?

Imagine for example 50 host accounts (50 domains), with 50+ filters each, 50+ mailboxes with user filtering (+ global) etc.. We can't cope / manage this kind of migration and redo everything.
 
DirectAdmin does not support conditional forwarding. It can still forward all incoming emails from one mail box to another destination. The very basic and simple forwarding.

So if you want to use advanced filtering and assign different actions on emails depending on their subject, sender, and other mail headers then you should take a look at Dovecot+Sieve+RoundCube. Probably there is a 3rd party plugin for DirectAdmin that will allow to manage Sieve rules from DirectAdmin interface, I haven't seen any.

And still as close to your question as possible, I believe your forwarders will be lost (or at least not shown in DirectAdmin), when migrating to DirectAdmin. I don't know how cPanel does the filtering, so I might assume they use Pigeonhole (Sieve) with Dovecot, i.e. the same solution. And if this is the case, then rules might be migrated between the panels.
 
For the record cpanel does it in exim, creating files for every domain (global filters) and for every inbox (user filters) like that:

Bash:
# pwd
/home/user/etc/domain.tld/chris


[root@earth chris]# cat  filter
# Exim filter - auto-generated by cPanel.
#
# Do not manually edit this file; instead, use cPanel APIs to manipulate
# email filters. MANUAL CHANGES TO THIS FILE WILL BE OVERWRITTEN.
#

headers charset "UTF-8"

if not first_delivery and error_message then finish endif

#Billing
if
 $header_subject: contains "Billing"
 or $header_subject: begins "Billing"
then
 deliver "\"$local_part+BILLING\"@$domain"
 finish
endif

#servers logs from root@
if
 $header_from: contains "root@"
then
 deliver "\"$local_part+Servers\"@$domain"
endif

#cpanel@servers
if
 $header_from: contains "cpanel@"
then
 deliver "\"$local_part+CPServers\"@$domain"
endif


And global same style:
Bash:
[root@earth vfilters]# cat domain.tld
# Exim filter - auto-generated by cPanel.
#
# Do not manually edit this file; instead, use cPanel APIs to manipulate
# email filters. MANUAL CHANGES TO THIS FILE WILL BE OVERWRITTEN.
#

headers charset "UTF-8"

if not first_delivery and error_message then finish endif

#Spammers
if
 $header_from: contains "spam1"
 or $header_from: contains "spam2"

then
 if error_message then save "/dev/null" 660 else fail "spammer" endif
endif
 
Thanks for the information. Directadmin will also create the /etc/virtual/domain.com/filter file with similar syntax, and the file will be overwritten by Directadmin. Thus no custom modification can be manually added into the file. A global file can be customized and it's located under /etc/system_filter.exim.

I did not try and still just an idea, Exim config might be customized to check /etc/virtual/domain.com/filter.custom which could be populated manually with custom rules (no GUI for it unfortunately).

Meanwhile if nothing has slipped out of my attention DirectAdmin does not still support sub-addressing, also known as plus addressing
 
Create your own feature request on the forums and via tickets, if they see the feature is much wanted, it will be for sure added.
 
Meanwhile if nothing has slipped out of my attention DirectAdmin does not still support sub-addressing, also known as plus addressing

To note this can be added though, within the supported parameters for adding custom exim code.

In /etc/exim/local_part_suffix.conf add:

Code:
local_part_suffix = +*
local_part_suffix_optional

If [email protected] is desired to be delivered to [email protected]. If that's not desired ignore me :)
 
Tried Sieve, work as intended without problems. But still I would like one day to see exim level filtering.
Migrating accounts having filters already is an issue.
 
Wen the email filters will be installed by default like cpanel or others panels?

Please add this to next version!

Regards
 
I second the need for exim level filtering because "Sieve" filtering as an issue. "Sieve" changes the message envelope so emails from providers like HOTMAIL will not get forwarded to GMAIL if you have forward rule. This is because Hotmail's SPF record will block it and "Sieve" tries to foward as hotmail.com and not your hosted domain.

Cpanel Filter rules do not suffer from this issue.
 
We have several users (cPanel users) that use both
"Email Filters" and "Global Email Filters" to filter mail before their inboxes to folders or to forward / deny them.

DirectAdmin has a similar functionality but for Spam only. (Dashboard >E-mail Filters)

------------------------------------------
"Block by" (word / mail / domain / size) -- Value .

Actions: Drop or Send to spambox.
------------------------------------------

I didn't see any functionality like cPanel's except blocking or dropping. How about if I want to forward every mail from "server.xxx" or any subject containing "directadmin" to a folder or another mail or something like that ?


And any customers that already have multiple filters what will they become if I migrate them to DA ?
They are "transferred" with the account ? If they want to edit them where are they ? Or they don't migrate at all ?
Hi, apparently DA has not implemented the Global Filter function from cPanel yet, after 4 years we are still waiting, a headache for users who migrate from a cPanel account it is unfeasible to import the Global filter.
Since cPanel increased its license prices I see massive migration to DA, by now that feature should be implemented.
 
We stopped migrating servers because of this. Got hundreds of accounts, mostly businesses that uses exim filters.
At least since noone considered this option - integrating exim filtering- , directadmin should at least consider a migration script
from exim to sieve....
 
Back
Top