Jump to content
Froxlor Forum
  • 0




This is a moved thread from here: http://forum.froxlor.org/index.php/topic/12595-release-0932-lightweight-and-powerful/?p=26649



What can be done if I need the email autoresponder? I know that my customers will ask for them as soon as holiday time is coming.





Configure managesieve and your customers can set an autoresponder (and much more) e.g. in Roundcube.








Just found this one: https://github.com/p...a-autoresponder

If I got it right http://postfixadmin.sourceforge.net/ is an requirement for the roundcube plugin.


Anybody with experiences with this roundcube plugin?

Here is a tutorial with some information: http://www.debinux.d...-debian-wheezy/




@Datenfalke: Roundcube has already a managesieve plugin, which can create autoresponders. You only have to activate.




All new information regarding reimplementing the lost autoresponder should go here.








Link to comment
Share on other sites

Recommended Posts

Here is what I am doing on my test server running debian squeeze and courier:


Get the migrate script:

# wget http://www.dovecot.org/tools/courier-dovecot-migrate.pl

Create helper script do_migrate.sh - check if you have to use /var/kunden, /var/customer or anything else you have chosen:

for i in `mysql -Bs -p --database=syscp -e "select maildir from mail_users order by customerid"`; do
  echo $MAILDIR
  ## test only
  ./courier-dovecot-migrate.pl --to-dovecot --recursive $MAILDIR
  ## do the complete conversion
  #./courier-dovecot-migrate.pl --to-dovecot --recursive --convert $MAILDIR

Set execution right:

chmod 700 do_migrate.sh courier-dovecot-migrate.pl

Stop courier:

# find /etc/init.d/ -name "courier-*" -exec {} stop \;

Uninstall courier:

apt-get remove 'courier*'
Die folgenden Pakete werden ENTFERNT:
  courier-authdaemon courier-authlib courier-authlib-mysql courier-authlib-userdb courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl maildrop

Install dovecot and be sure that it is stopped:

# apt-get install dovecot-imapd dovecot-pop3d

# /etc/init.d/dovecot stop

Apply the froxlor changes shown on Configuration -> Debian Wheezy -> IMAP -> dovecot and add the following lines to /etc/dovecot/dovecot-sql.conf at the bottom:

mail_location = maildir:~/Maildir

namespace private {
  prefix = INBOX.
  separator = .
  inbox = yes

Install your SSL certificates into dovecot - there is a sample in /etc/dovecot/dovecot.conf.



Start the helper script in test mode:

# ./do_migrate.sh

If everything looks correct flip the commented and the uncommented lines in do_migrate.sh and start the script again.


Check if you can find the following dovecot files in folders with subfolders:


Start dovecot:

# /etc/init.d/dovecot start

Use Thunderbird to login and keep fingers crossed!


It worked for me without loosing subscriptions and without reloading the messages. Reloading the messages would have been a real pain with a customer having 50.000 emails in one mailfolder which he synchronizes with 10 desktops. This would have killed his DSL uplink for hours days.

I just done the migration on the production server... my own mailboxes look nice and Thunderbird didn't realize a thing :-)


And I have done it again on a second production server - also without problems. The complete migration has been done in 9 minutes and could have been done even faster :-)

Link to comment
Share on other sites

Next task is upgrading to dovecot 2 from the backports repository http://backports.debian.org/Instructions/


Add the following to /etc/apt/sources.list

deb http://ftp.de.debian.org/debian-backports squeeze-backports main

Uninstall the old dovecot 1.2:

# apt-get remove dovecot-imapd dovecot-pop3d dovecot-common

Update apt:

# apt-get update

Install the new dovecot from backoprts:

# apt-get -t squeeze-backports install dovecot-imapd dovecot-pop3d dovecot-mysql

Let the installation script create the new config files. You will change them when you apply the Froxlor configuration (Debian Wheezy -> IMAP -> Dovecot) changes now.


After the Froxlor configuration edit /etc/dovecot/conf.d/10-mail.conf and find the namespace lines and change seperator and prefix:

namespace inbox {
  # Namespace type: private, shared or public
  #type = private

  # Hierarchy separator to use. You should use the same separator for all
  # namespaces or some clients get confused. '/' is usually a good one.
  # The default however depends on the underlying mail storage format.
  separator = .

  # Prefix required to access this namespace. This needs to be different for
  # all namespaces. For example "Public/".
  prefix = INBOX.

Set the correct SSL certificate in /etc/dovecot/conf.d/10-ssl.conf.


Now you can start the new dovecot:

# /etc/init.d/dovecot restart

On my first production server I had the problem that I could not connect with Thunderbird.


Only after installing the sieve addons I could get back to work. It looks like some dovecot configs (imap for example) wanted to be overwritten with the package version - I said yes to use the new version and suddenly it worked. Before Thunderbird said he could not connect - I was getting nervous.

# apt-get install dovecot-managesieved dovecot-sieve

Next steps are copied from the beginning of this thread for installing the roundcube manage-sieve plugin:


To make it work with Froxlor edit /etc/dovecot/conf.d/90-sieve.conf and add before the last } these two lines:

sieve = /var/customers/mail/sieve/%d/%n/.dovecot.sieve
sieve_dir = /var/customers/mail/sieve/%d/%n

You have to create the folder and give it to the user vmail:

mkdir /var/customers/mail/sieve
chown vmail.vmail /var/customers/mail/sieve

You also have to edit and add "sieve" at the end of /etc/dovecot/conf.d/15-lda.conf:

protocol lda {
  # Space separated list of plugins to load (default is global mail_plugins).
  mail_plugins = $mail_plugins quota sieve

You have to restart dovecot:

/etc/init.d/dovecot restart

If you look into the Roundcube plugin folder you will find the "managesieve" plugin. To activate it edit roundcube/config/main.inc.php:

// List of active plugins (in plugins/ directory)
$rcmail_config['plugins'] = array('managesieve');

Now you will find the Plugoin in Roundcube -> Settings -> Filters. To create an "out of house" or "Vacation" notifictaion you have to add a filter with the action "Reply with message".



You will see the following in /var/log/mail.log if you save the filter in Roundcube:

May 26 22:45:38 vps005 dovecot: managesieve-login: Login: user=<xxx@yyy.zz>, method=PLAIN, rip=, lip=, mpid=3892, secured, session=<oQxwqVP6cgB/AAAB>
May 26 22:45:40 vps005 dovecot: managesieve(xxx@yyy.zz): Disconnected: Logged out bytes=234/620

Now I can create new filter in roundcube.


To make the rules work, you have to edit /etc/postfix/main.cf:

## Dovecot Settings for deliver, SASL Auth and virtual transport
## uncomment those line to use Dovecot
mailbox_command = /usr/lib/dovecot/deliver
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

And also /etc/postfix/master.cf:

# Add this lines to be able to use dovecot as delivery agent
# Dovecot LDA
dovecot   unix  -       n       n       -       -       pipe
        flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}

I am not sure why there is a parameter mailbox_command in main.cf. I changed it to the existing deliver binary.


Restart postifx:

# /etc/init.d/postfix restart
Link to comment
Share on other sites

The Thunderbird sieve plugin you will find through the addon search will deliver a broken sieve client which will not work with my new dovecot-managesieve. You have to install a nightly build - I have installed sieve-0.2.3d.xpi


Have a look here:




I think the addon is not worth a try. You can see and have to edit the filters as source code. Creating filters through roundcube is much more convenient!

Link to comment
Share on other sites

Sorry, but Courier is bullshit. Migrate to Dovecot!


Who says that?


You know, Dovecot has also it's problems... ;-)

(in details, can't check vchkpw (Qmail) and other external programs; file-locking; has potential problems with it's index (parallel access); quotas and index need to be rebuild; oh, yes, and not to forget: NFS ...)


I miss this feature too, because it forces me as server admin to not freely chose which software to use.

In my case, i have to migrate not many users, but pretty much subfolders...

Link to comment
Share on other sites

Why do you use %Ld/%Ln/ , what does L mean?


I use it without L and it looks like it is working:


sieve = /var/kunden/mail/sieve/%d/%n/.dovecot.sieve   
sieve_dir = /var/customers/mail/sieve/%d/%n


Ups - i missed reading you first line :-) Thank you very much for this important information!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...