Email Filters and Global Email filters

chrismfz

Verified User
Joined
Jul 3, 2019
Messages
22
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 ?
 

chrismfz

Verified User
Joined
Jul 3, 2019
Messages
22
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.
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,936
Location
GMT +7.00
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.
 

chrismfz

Verified User
Joined
Jul 3, 2019
Messages
22
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
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,936
Location
GMT +7.00
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
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,936
Location
GMT +7.00
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.
 

mxroute

Verified User
Joined
Sep 24, 2019
Messages
18
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 user+string@domain.tld is desired to be delivered to user@domain.tld. If that's not desired ignore me :)
 

chrismfz

Verified User
Joined
Jul 3, 2019
Messages
22
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.
 
Top