[sork] about Horde vacation with LDAP

Cheng Bruce itlist at gmail.com
Mon Sep 4 11:18:07 PDT 2006


Dear Christian,

Thank you so much.
At first, I think that my configuration files are almost the same as yours.
But finally I found something wrong in postfix

It is so clear that I can understand what you advised.

I know there are some people like me is looking up the solution, your
soon reply is very good for us.

By the way, do you know how to set the schedule of autoreply ?
For example, if USER A will be out of office from Sep 1st to Sep 11th,
he/she can set the schedule on Vacation of Horde, when the time goes
by, the system will disable the autoreply at Sep 12th AM00:00.

I know this function should be set/configured in MTA/MDA, but I check
that GNARWL seems not have this options and there is no other fields
on Vacation for users to set the schedule. If you have any
sugguestion, please advise me.

I appreciate you in teaching me.
Thank you again.

Best Regards,
Bruce

2006/9/4, Christian Affolter <caffolter at purplehaze.ch>:
> Hi Bruce,
>
> I'm going to reply to the sork mailing list for this one, I hope you
> don't mind... Please keep replying via the list, as it could be useful
> to other people as well (as it was to you ;))
>
> > I am Bruce. I am working the vaction function with LDAP in Horde, but
> > it still can't work.
> > I am looking for the solution, and read some message from lists.
> Actually, "the solution" doesn't exists, it really depends on your MTA,
> LDAP DIT/schema setup.
>
> > I would like to know how you did it sucessfully, would you please
> > teach me how to do ?
> > Thank you in advance.
> >
> > MTA: postfix
> > vacation program: gnarwl
> > Horde: 3.1.3
> > Vacation: 3.0
> > openldap: 2.2.13-4
> As I don't know what exactly your problem is, here are some general
> advices/steps which are hopefully useful to you:
>
> First, define a postfix transport map for your specific internal
> autoreply domain.
> For example /etc/postfix/transport:
> autoreply.example.com    gnarwl:
>
> create the database:
> postmap hash:transport # this should create the transport.db file
>
>
> Add the transport to the postfix main.cf:
> <snip>
> # TRANSPORT MAPS
> #
> transport_maps = hash:/etc/postfix/transport
> </snip>
>
> Add a new service to /etc/postfix/master.cf:
> </snip>
> # gnarwl autoresponder
> gnarwl    unix  -       n       n       -       -       pipe
>   flags=F  user=gnarwl argv=/usr/bin/gnarwl -a $user
> </snip>
>
>
> Add a vacation alias map (ldap-virtual_alias_maps-vacation.cf):
> <snip>
> server_host = ldap://ldap.example.com
> version = 3
> server_port = 389
> search_base = ou=mail,...
> query_filter =
> (&(objectClass=MailAccount)(objectClass=Vacation)(mail=%s)(accountActive=TRUE)(vacationActive=TRUE))
> result_attribute = mail
> result_filter = %s,%s at autoreply.example.com
> bind = no
> </snip>
>
> Of course, the above needs to reflect your ldap environment...
>
>
> Append the alias map to main.cf (make sure it's the first map):
> <snip>
> virtual_alias_maps =
> ldap:/etc/postfix/ldap-virtual_alias_maps-vacation.cf,
> ldap:/etc/postfix/ldap-virtual_alias_maps.cf
> </snip>
>
> after those changes, reload postfix:
> postfix reload
>
>
> Extend your ldap with the vacation schema and setup a test account,
> example ldif:
> <snip>>
> dn:mail=vacationtest at example.com,...
> objectClass: top
> objectClass: Vacation
> mail: vacationtest at example.com
> accountActive: TRUE
> [... other mail specific attributes ...]
> vacationActive: TRUE
> vacationInfo:: [vacation message has to be utf-8 encoded and also base64
> if necessary]
> </snip>
>
>
> After loading the above ldif, test your postfix alias vacation lookup map:
>
> postmap -v -q vacationtest at example.com
> ldap:/etc/postfix/ldap-virtual_alias_maps-vacation.cf
>
> This should return the following if the vacation has been enabled,
> otherwise nothing.
> <snip>
> vacationtest at example.com,vacationtest at example.com@autoreply.example.com
> </snip>
>
> If this works so far, configure gnawrl to suit your needs (only the ldap
> part and the header config is included):
> gnarwl.cfg
>
>
> edit gnarwl.cfg and change the following lines:
> <snip>
> server ldap.example.com
> protocol 3
> base ou=mail...
> queryfilter
> (&(objectClass=MailAccount)(objectClass=Vacation)(mail=$recepient)(accountActive=TRUE)(vacationActive=TRUE))
> mta /usr/sbin/sendmail $sender
> charset
> forceheader /var/lib/gnarwl/header-utf8.txt
> loglevel 3
> </snip>
>
> Create the file /var/lib/gnarwl/header-utf8.txt and add the content
> shown below:
> <snip>
> From: $fullname <$recepient>
> To: $sender
> X-mailer: GNARWL
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8; format=flowed
> Content-Transfer-Encoding: 8bit
> Subject: Re: $subject
> </snip>
>
>
> 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.
>
>
> regards,
> Chris
>
>


More information about the sork mailing list