Sieve on Direct Admin with Dovecot

scotts

Verified User
Joined
Dec 20, 2007
Messages
8
Is there an easy and supported method of installing server side mail filters on a direct admin system.

It looks like Sieve should be an easy bolt on feature, but I figured I should check if someone has done it before or has some pointers on how to do it. I have found references to in it the forums but no direct information on its use within direct admin.

The intended use is for IMAP users to filter mailing list mail to its own IMAP directories. A GUI would be nice, but if not doing it via wildcards or by hand will be good for now.
 
DirectAdmin has server-side Email Filters available on a per-domain basis.

Jeff
 
DirectAdmin has server-side Email Filters available on a per-domain basis.

Jeff

Are you talking for things like domain wide spam filters or for things like mailing and distribution lists to IMAP sub-directories, and where can I access the settings?
 
Last edited:
For anything that goes through exim. The code for them is in exim.pl.

They're on the main login page for the domain.

Jeff
 
For anything that goes through exim. The code for them is in exim.pl.

They're on the main login page for the domain.

Jeff

Checked that out, does not look promising. Looking more for a procmail replacement with a per user filter or rule set when it hits the mbox/maildir.
 
Last edited:
As I wrote, there's a per-user filter on the main page of the DirectAdmin user level login.

Jeff
 
As I wrote, there's a per-user filter on the main page of the DirectAdmin user level login.

Jeff

I think the problem is that I was not clear I'm looking for this for virtual users mail accounts.

Are you talking about the SPAM Filters on the main page; that will be applied to the entire domain.

What I'm looking for is the ability to filter an email accounts mail.

Like this http://wiki.dovecot.org/LDA/Sieve or http://www.unixgeeks.org/security/newbie/unix/procmail/procmail-example.html

An example would be if a user wanted all mail that contained X-Beenthere: [email protected] to go to MailDir/Lists/asterisk-users or all mail from *@example.com to go to MailDir/Clients/Example_Inc.
 
Last edited:
Nope, DA doesn't do that. You can probably figure out a way to customize the exim.conf file to use procmail if you want, or to customize it to run specific mail to specific users through specific custom filters.

Either way once you've left the standard DirectAdmin exim.conf file configurations you're on your own.

Jeff
 
You don't need to do anything with procmail or exim to do this. Dovecot already has this functionality built in using Sieve. There's just no GUI in DA for it. It would be really nice if the DA team added IMAP level filtering.

People could then do things like this:

[email protected] would go directly to IMAP folder Inbox.SalesLeads or something.
 
Hello,

Hmm... That would actually be an excellent job for a plugin, assuming the script per user can be placed into a location where it can be written.
Example use the domain_create_post.sh to create /etc/virtual/$domain/sieve, and chown the sieve directroy to mail:$username, chmod 770. Then the plugin can write to that directory with whatever it likes.

John
 
How can I get sieve working under DA using CustomBuild? I have compiled Dovecot Sieve and added the lines to /etc/dovecot.conf:

Code:
protocol lda {

  # If there is no user-specific Sieve-script, global Sieve script is
  # executed if set. (v1.0.1 and older used "global_script_path")
  # (e.g. /etc/dovecot/default.sieve)
  #sieve_global_path =
  # Support for dynamically loadable plugins. mail_plugins is a space separated
  # list of plugins to load.
  #mail_plugins = cmusieve # ... other plugins like quota
  mail_plugins = sieve
}

Only I don't think it's using the .dovecot.sieve script file I have made in the home directory of my domain.
 
Sieve could also replace whatever is being used to put spamassassin tagged messaged into the spam folders and whatever is controlling vacation messages.
 
I am not using Sieve, but I changed exim to parse a .filter in the domain owners home dir. In that I personally have around 25 filter files (exim filter definitions) that server sides delivers to the directory I want it to be delivered to. That said it got a grey hair here and there, if people are interested i can share the info ofcourse. Keep in mind though that it does not seem possible (with this setup) to do user@domain filters.

Rgrds,
Remko
 
Back
Top