Jump to content
Froxlor Forum
  • 0

Autoresponder


Datenfalke

Question

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.

 

>>

 

http://forum.froxlor.org/index.php/topic/12578-solved-spam-im-spamordner-verschieben/

 

>>

 

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

First, you have to install the dovecot sieve plugin:

apt-get install dovecot-managesieved dovecot-sieve

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 config.inc.php:

$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=127.0.0.1, lip=127.0.0.1, mpid=3892, secured, session=<oQxwqVP6cgB/AAAB>
May 26 22:45:40 vps005 dovecot: managesieve(xxx@yyy.zz): Disconnected: Logged out bytes=234/620

It looks like it is working :-)

 

Unfortunately you need dovecot for it - need to migrate two server with 100 customers each :-(

Link to comment
Share on other sites

I hope the migration will be without problems.

 

http://wiki2.dovecot.org/Migration/Courier

The --recursive option goes through only one level down in directory hierarchies. This means that if you have some kind of a directory hashing scheme (or even domain/username/), it won't convert all of the files.

 

 

I think that this is quite bad regarding Froxlor :-(

Link to comment
Share on other sites

Postfixadmin does not seem like a good solution, because its functionality overlaps a lot with froxlor's! It manages mail accounts in a database (e.g. mysql) db just like froxlor does. I guess it will be big pain to setup both systems so they don't break each other.

And it is overkill just for the autoresponder.

 

So there is no official way of how to restore autoresponders if using courier? "Courier is bullshit, don't use it" cannot be the official answer as long as Froxlor officially  supports Courier!

 

Edit: I just found this one:

http://eugenesklyar.com/roundcube-autoresponder-goldfish-autoreply-plugin

So this should work with Roundcube, Courier and Postfix.

A bit old maybe. I will need to have a closer look at it.

Link to comment
Share on other sites

no there is no official way - the problem is the way on how the autoresponder worked and how autoresponders should work.

 

If you want a correct handled autorespondern you should use dovecot with the sieve-plugin 'vacation' because every delivered mail correctly triggers the action AND remembers it.

 

Old implementations are just cron-scripts that scan Maildir-formatted directories for new mails and try to respond to the detected mail. There are many and huge problems with that.

 

an alternative implementation - but not so user friedly as sieve - would be something like maildrop in postfix.

Link to comment
Share on other sites

Does anybody has experience in migrating a huge pile of emails stored in many different user folders and subfolders from courier to dovecot?

 

It is not possible to just change the programms and try if dovecot can read the existing mail folders? I understood that changiung UIDs can be a problem leading to a resynchronisation of all folders to the local imap user client, correct?

 

Are there other things that can happen if you do not use http://www.dovecot.org/tools/courier-dovecot-migrate.pl ?

 

What about "star" or "flag" markings a user can use to flag an email? Are these informations stored courier specific? If yes, I suspect we have to use the migration script :-(

Link to comment
Share on other sites

There is no difference in the Maildir-format for courier or dovecot. Only two things are stored differntly depending on your imap-server:

 

- imap subscriptions

The file in which the folders are stored which your client has subscribed to. Remember do adjust the subscriptions to your namespace if you choose another.

 

- message index

Just some internal data for the imap server - no problem if missing - it will be rebuild

Link to comment
Share on other sites

Your autoresponder solution doesn't help me and my customers as we don't use roundcube but normal mail clients like thunderbird. Therefore, we absolutely need an autoresponder function inside froxlor. There isn't any alternative. Any solutions?

Link to comment
Share on other sites

i am using thunderbird, too. roundcube is used for setting filter rules which are used for filtering on the server. you can use your email clients as you do it now. there is even a thunderbird sieve addon if you do not want to use roundcube for managing rules: https://addons.mozilla.org/de/thunderbird/addon/sieve/

 

if you have dovecot installed it is really easy - i tried it on a debian wheezy. install the dovecot-sieve-packages, install roundcube and activate the manage-sieve-plugin (or use the thunderbird sieve-addon instead of roundcube).

 

it is quite a nice feature to have server-side-filtering.

 

unfortunately i still need to migrate to dovecot :-/

Link to comment
Share on other sites

I also use sieve + rouncube + thunderbird-sieve-plugin. So the customers who don't want to use webmail still have a chance to use whatever they want.

Datenfalke: I once migrated a bit "more" from courier to dovecot. I simply ran the migrate script, no customers were complaining (i could not check for recursive-depth prior to running the script, you will go crazy). But it seems to have worked out fine.

Link to comment
Share on other sites

Just did a first migration test: I have missed the Namespace which is "INBOX" in courier resulting in:

  • all subscriptions have been lost -> the user sees only the inbox without any subfolders without resubscribing (abonnieren in German Tunderbird)
  • all emails are downloaded again
Courier by default uses "INBOX." as the IMAP namespace for private mailboxes. If you want a transparent migration, you'll need to configure Dovecot to use a namespace with "INBOX." prefix as well.

 

mail_location = maildir:~/Maildir

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

I will try it again :-)

Link to comment
Share on other sites

Unfortunately that dovecot config does not work:

# /etc/init.d/dovecot restart
Restarting IMAP/POP3 mail server: dovecotError: Error in configuration file /etc/dovecot/dovecot.conf line 89: Unknown namespace type (section changed in /etc/dovecot/dovecot.conf at line 87)

line 89 is "namespace {"

Link to comment
Share on other sites

The server has still a Debian Squeeze installed.
 
# dovecot --version
1.2.15
 
I have seen that Dovecot 2 is available in Backports:
https://packages.debian.org/de/squeeze-backports/dovecot-common
 
I will try to install this to be on the updated side which will be easier when upgrading to Wheezy.
 
 
Add to /etc/apt/sources.list:

https://packages.debian.org/de/squeeze-backports/dovecot-common

(Uninstall the old dovecot)* and Install dovecot 2 from backports:

apt-get update
apt-get -t squeeze-backports install "dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-managesieve"

* I had some problems while installing with uninstalling everything from the old dovecot. Perhaps it is easier to do a complete dovecot unistall before installing teh new version. I had to uninstall the following packages:

apt-get purge dovecot-common dovecot-ldap dovecot-core
rm /etc/dovecot -rfv

Next you have to do the configuration of dovecot by doing the things Froxlor tells you if you choose "Debian Wheezy->IMAP/POP3->Dovecot".

 

And now my Thunderbird cannot connect anymore - there is even now line in the logfile except the daemon start:

May 31 10:28:36 xxxx dovecot: master: Dovecot v2.1.7 starting up (core dumps disabled)
May 31 10:28:43 xxxx postfix/master[2315]: daemon started -- version 2.7.1, configuration /etc/postfix

Perhaps I should stay with Dovecot 1.x?

What is the correct syntax for the namespace configuration in Dovecot 1.x?

Link to comment
Share on other sites

it is now possible to subscribe because of the working namespace.

 

but no luck - migrating to dovecot 1 on debian squeeze does not save the subscription and the synchronization. i have to resubscribe in thunderbird and all emails have to be downloaded again.

 

i checked in depth and i can find the dovecot "subscriptions" file in most mail directories but not in the one i tried ti use...

 

after deleting every dovecot* in the maildir and reapplying the migration script on this folder, i get my subscriptions file and thunderbird magicly knows about  all folders :-)

Link to comment
Share on other sites

I restarted again with a snapshop before starting the migration script the first time.

 

Again nearly in every mail folder you will find the subscriptions file.

 

I debugged deeper and it looks like there is a bug in the migration script.

 

As soon as you have a mixture of mail folder types the script migrates only one type. I have the following two mail folder at /var/kunden/mail/datenfalke/:

drwx------  3 vmail vmail 4096 22. Jan 10:29 datenfalke.biz
drwx------ 29 vmail vmail 4096 31. Mai 12:58 fk@datenfalke.de

The script will only migrate the first leaving the other without subscriptions or any other dovecot file. If I delete the first folder and start the script again on /var/kunden/mail/datenfalke/ the migration is successful. I confirmed this with a different customer folder with the same problem.

 

How can I find these mixed folders? Or perhaps fix the migration script.

Link to comment
Share on other sites

for i in `mysql -Bs --database=syscp -e "select maildir from mail_users"`; do
    echo path/to/convert/bla /var/customers/mail$i
done

Why dont read the correct Maildirs from the database and execute the convert script for every single Maildir?

Link to comment
Share on other sites

for i in `mysql -Bs --database=syscp -e "select maildir from mail_users"`; do
    echo path/to/convert/bla /var/customers/mail$i
done

Why dont read the correct Maildirs from the database and execute the convert script for every single Maildir?

 

I was about to write exact same thing :) I did it that way

Link to comment
Share on other sites

Can anybody describe the main steps for migrating from courier to dovecot in froxlors field of view? My steps (i have to do them live *urgh*):

 

  1. Block IMAP/SMTP/POP in Firewall
  2. backup /etc/courier*
  3. backup /etc/postfix*
  4. Froxlor -> Configuration -> IMAP/POP3 Dovecot and SMTP Postfix/Dovecot, find differences, include certifcates etc
  5. Convert Maildirs
  6. Go live?
  7. Install this sieve-stuff when everything else is working

Do I forget anything?

 

Haven't used dovecot until now ;) I'm on Debian squeeze atm

Link to comment
Share on other sites

Archived

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



×
×
  • Create New...