This HowTo is from adapted from an e-mail exchange on the Sork mailing list. It is a discussion of setting up Sork's vacation modulefor use with an ldap based system, using gnarwl as the server-side vacation program. The software used is:MTA: postfixvacation program: gnarwlLDAP: openldap 2.2.13-4Horde version: 3.1.3vacation version: 3.0(For those who don't want to use gnarwl, a "traditional" vacation program for ldap is available at http://www.etc.msys.ch/sources/ldapvacation/).Note forNote - sork's vacation may be replaced by Ingo in the future. - freebsd user. Downloaded gnarwl package does not support openldap, build from port instead.First, define a postfix transport map for your specific internal autoreply domain.If your domain is "example.com" and your autoreply domain is to be "autoreply.example.com", then you would add the following to/etc/postfix/transport:<code>autoreply.example.com gnarwl:example.com </code></code> Next,Next, create the database files from the above file. The following command should create the appropriate transport.db file:<code><code> postmap hash:transport</code>Next add the transport to the postfix main.cf file in the "TRANSPORT MAPS" section:<code><snip># TRANSPORT MAPS# transport_maps = hash:/etc/postfix/transport </snip> </code>transport_maps = hash:/etc/postfix/transport </snip> </code> NowNow add a new service to the /etc/postfix/master.cf file:<code> </snip><code> </snip> # gnarwl autorespondergnarwl unix - n n - - pipeflags=F user=gnarwl argv=/usr/bin/gnarwl -a ${user}@${nexthop} -s ${sender}</snip></code>CreateCreate an LDAP vacation alias map called ldap-virtual_alias_maps-vacation.cf:<code><snip>server_host = ldap://ldap.example.comversion = 3server_port = 389search_base = ou=mail,...query_filter = (&(objectClass=MailAccount)(objectClass=Vacation)(mail=%s)(accountActive=TRUE)(vacationActive=TRUE))result_attribute = mailresult_filter = %s,%u@autoreply.example.combind = no</snip></code>Of course, the above needs to reflect your ldap environment...Append the alias map to LDAP's main.cf file (make sure it's the first map listed):<code><snip>virtual_alias_maps =ldap:/etc/postfix/ldap-virtual_alias_maps-vacation.cf,ldap:/etc/postfix/ldap-virtual_alias_maps.cf </snip> </code></snip> </code> afterafter those changes, reload postfix:<code>postfix reload</code>ExtendExtend your LDAP with the vacation schema and setup a test account. An example ldif follows:<code><snip>dn:mail=vacationtest@example.com,...objectClass: topobjectClass: Vacationmail: vacationtest@example.comaccountActive: TRUE[... other mail specific attributes ...]vacationActive: TRUEvacationInfo:: [vacation message has to be utf-8 encoded and also base64 if necessary]</snip></code> After</code> After loading the above ldif, test your postfix alias vacation lookup map:<code><code> postmap -v -q vacationtest@example.comldap:/etc/postfix/ldap-virtual_alias_maps-vacation.cf</code>This should return the following if the vacation has been enabled, otherwise nothing.<code><snip>vacationtest@example.com,vacationtest@autoreply.example.com</snip> </code></snip> </code> If this works so far, configure gnawrl to suit your needs (only the ldap part and the header config is included):Edit gnarwl.cfg and change the following lines:<code><snip>server ldap.example.comprotocol 3base ou=mail...queryfilter(&(objectClass=MailAccount)(objectClass=Vacation)(mail=$recepient)(accountActive=TRUE)(vacationActive=TRUE))mta /usr/sbin/sendmail $sendercharsetforceheader /var/lib/gnarwl/header-utf8.txtloglevel 3 </snip> </code></snip> </code> CreateCreate the file /var/lib/gnarwl/header-utf8.txt and add the content shown below:<code><snip>From: $fullname <$recepient>To: $senderX-mailer: GNARWLMIME-Version: 1.0Content-Type: text/plain; charset=UTF-8; format=flowedContent-Transfer-Encoding: 8bitSubject: Re: $subject</snip></code>Finally you will have to configure the sork vacation app with the ldap driver. This should be an easy task now ;)Remember, that you have to configure/specify the vacation related attributes.