# Postfix and vacation



## Sigfrido (Dec 23, 2010)

Hi!

I've got a question about Postfix as MTA and how it organises the vacation (I've already read the addon section).

Mailserver Conf:

- Postfix (vdomains on MySQL)
- Postfixadmin
- Dovecot
- Roundcube

and of course MySQL/Php/Apache; antispam features only with major spamlists and grey/block/whitelisting.

Is there any vacation manager that works natively with postfixadmin? In fact I'd like to setup same autoresponders features as qmailadmin grants. Any suggestion?

Thanks in advance

Regards


----------



## r_t_f_m (Dec 23, 2010)

There is a native solution :

dovecot + sieve + roundcube

Use dovecot as LDA (Dovecot LDA) with sieve support 

Finally, activate managesieve plugin in roundcube.

All your users will have the posibility to manage rule based mail filtering on the server, vacation included.

Hope it helps.


----------



## Sigfrido (Dec 25, 2010)

Well, thanks for your reply.

Is there any extensive howto on postfix+dovecot lda+sieve+roundecube?

Dovecot is already installed with managesieve support and the configuration is like purplehat suggested one.

So, according to my infos, I need to:

- add dovecot service in /etc/postfix/master.cf
- set virtual_transport to dovecot in /etc/postfix/main.cf
- edit dovecot.conf to enable sieve
- reload postfix and dovecot

Then dovecot local delivery agent takes mails from Postfix, checks MySQL backend and delivers e-mails to a user's mailbox.

- edit roundecube .conf to enable sieve plugin for end users

Is it all?


----------



## r_t_f_m (Dec 25, 2010)

Purplehat how-to is quite extensive, do you still have issues with your configuration ?

Looks like you already did all the config adjustement. There could be some differences between versions  
that purplehat suggested and current version of software (looking at dovecot, dovecot2 is out in the 
meantime) 

Enabling debug output in dovecot can be really usefull

```
dovecot.conf

auth_verbose = yes
auth_debug = yes
auth_debug_passwords= yes
mail_debug = yes
```


----------



## Sigfrido (Dec 26, 2010)

Nope, it's fine. I've done some changes skipping maia, sa, fuzzyocr, clamav, pear and using only rebel control; Purplehat doesn't use dovecot as lda, so my concernings are about the steps needed in order to have a fully functional setup starting from my configuration.

I've checked out freshport to find something about dovecot ports.

First, I'm supposing that I need to install dovecot-sieve:


```
cd /usr/ports/mail/dovecot-sieve/ && make install clean
```

Can I skip *dovecot-managesieve* because the managesieve option, installing dovecot 1.2x, is default selected?

Then, I need to add dovecot service in /etc/postfix/master.cf:


```
dovecot   unix  -       n       n       -       -       pipe
    flags=DRhu user=[B]postfix:postfix[/B] argv=/usr/lib/dovecot/deliver -d ${recipient}
```

(I've changed u:g according to my config)

after that, set virtual_transport to dovecot in /etc/postfix/main.cf:


```
dovecot_destination_recipient_limit = 1
virtual_transport = dovecot
```

_Fyi virtual_mailbox_domains directive is pointed to mysql_virtual_domains_maps.cf; virtual_transport is pointed to dovecot, and dovecot-sql.conf is configured to query MySQL backend where user's informations are stored._

Next, I need to edit dovecot.conf, checking for these settings uncommented/explicited:


```
protocols = imap imaps [B]managesieve[/B] pop3 pop3s
mail_location = maildir:/home/vmail/%d/%n/[B]Maildir[/B]
protocol lda {
    debug = yes
    postmaster_address = [I]postmaster@example.com[/I]
    mail_plugins = [B]sieve[/B]
    sendmail_path = /usr/sbin/sendmail
    auth_socket_path = /var/run/dovecot/auth-master
    log_path = /var/log/dovecot-deliver.log
    info_log_path = /var/log/dovecot-deliver.log
}
```

Then reload postfix and dovecot.

To enable managesieve plugin on roundecube I need to edit conf file:


```
$rcmail_config['plugins'] = array('managesieve');
```

Something clearly wrong?


----------



## osman (Dec 27, 2010)

I have used this howto many times for linux, the concept is same for BSD.

http://craigballinger.com/blog/2009/08/postfix-vacation-autoresponder/

This will let postfixamdin set any vacation settings.

And there is some roundcube plugin to work with postfixadmin to let any user change his own settings ( i have never tried this plugin )

http://nejc.skoberne.net/projects/rcpfa/


----------



## r_t_f_m (Dec 27, 2010)

Sigfrido, as this is probably a fresh installation from scratch, take a look at dovecot2 and dovecot2-pigeonhole

Most of developpement is done in dovecot2 branch, so starting with it would be more future-proof.


----------



## Sigfrido (Dec 27, 2010)

thanks all.


----------

