Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am looking into setting up sieve mail filters on dovecot 1.1.4. I have been trying to find a good guide online that will talk me through it but they all seem a bit old. Does anyone have experience of doing this as I'm a bit scared of doing it on the live mail server where I work but I am being pressured into getting this done.
I have been looking at the dovecot.conf file and trying to work out what I need to do. So far I think I need to install the sieve plugin but I have seen in various places people saying that I will need to install 'deliver'. I was hoping someone could help me with this. I would be eternally grateful.
deliver should have been part of the dovecot install. It's essential, since deliver is the thing that executes the sieve scripts at delivery time. Configuration is trivial: you just need to add a single line in the protocol lda portion of the config file, as documented here under "Configuring".
You mention having to install the sieve plugin. The link above mentions this:
Quote:
In Ubuntu, starting from version 7.10 Gutsy, the CMU Sieve plugin already comes with Dovecot regular install. In this case you do not have to download additional packages. Simply skip "Compiling" section and proceed to "Configuring". This is also true for Debian Etch.
I have done the steps mentioned in the link you sent but I can not get my sieve scripts to work so far. I have added the line to the protocol lda section:
mail_plugins = cmusieve
The link mentions that the default location checked for sieve scripts is on a file called .dovecot.sieve in the users home directory so I have created a file at:
/home/USERNAME/.dovecot.sieve
and put the following lines into it:
require "fileinto";
if header :contains "Subject" "test" {
fileinto "testing";
stop;
}
I also tried
require "fileinto";
if header :contains ["Subject"] ["test"] {
fileinto "testing";
}
I have created a folder called 'testing' using thunderbird but still any mails I send with subject 'test' go straight into the inbox. Should I be creating the folders somewhere special rather than in Thunderbird?
I tried doing this and my mail gets bounced back. I assume you meant create a file called .forward in my home directory and put '| "/usr/local/libexec/dovecot/deliver"' in it? I did that and made it executable but no luck.
When I do a locate deliver, that is the path that gets returned, thats why I left out the 'libexec'. I have also tried manually compiling my sieve script (.dovecot.sieve) with sievec but that didn't work either. I appreciate your help with this. I am a bit of a noob when it comes to configuring mail servers.
my dovecot.conf file contains the following in the protocol lda section:
protocol lda {
# Address to use when sending rejection mails.
#postmaster_address = postmaster@example.com
# Hostname to use in various parts of sent mails, eg. in Message-Id.
# Default is the system's real hostname.
#hostname =
# Support for dynamically loadable plugins. mail_plugins is a space separated
# list of plugins to load.
mail_plugins = cmusieve
mail_plugin_dir = /usr/lib/dovecot/modules/lda
# If user is over quota, return with temporary failure instead of
# bouncing the mail.
#quota_full_tempfail = no
# Format to use for logging mail deliveries. You can use variables:
# %$ - Delivery status message (e.g. "saved to INBOX")
# %m - Message-ID
# %s - Subject
# %f - From address
#deliver_log_format = msgid=%m: %$
# Binary to use for sending mails.
#sendmail_path = /usr/lib/sendmail
# Human readable error message for rejection mails. Use can use variables:
# %n = CRLF, %r = reason, %s = subject, %t = recipient
#rejection_reason = Your message to <%t> was automatically rejected:%n%r
# UNIX socket path to master authentication server to find users.
#auth_socket_path = /var/run/dovecot/auth-master
}
I tihnk I need to uncomment some more lines maybe but not sure which as I have no problems sending and receiving mails at the moment.
I'm trying to configure Dovecot to automatically forward mail to another account without the virtual user having to log-in first to Roundcube web mail.
These are virtual users with no log-in to the server only Roundcube's web interface
Exim handles regular domain email and would rather leave it as it is, since it handles email forwarding for a bunch of virtual sites.
The situation is that I have two domains who want to receive email at their domains, get a forwarded copy at their hotmail account, then log-in to Roundcube to reply.
A Sieve script running in Dovecot seems the way to go, but te finer points of configuration have failed me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.