#70 use vacation.pl for multiple choice of reply

closed-accepted
nobody
Vacation (23)
5
2014-08-16
2009-03-29
J.Kruis
No

adding choice of reply
-type of reply is store in table vacation in new record type
-delay between reply is store in table vacation in new record delay

choice of reply
-once
-autoreply
- interval reply

Choice can be set by admin or user ( only by pfa not by squirrelmail)
option is controle by config.inc.php

Discussion

  • J.Kruis

    J.Kruis - 2009-03-29

    edit-vacation.php and user/vacation.php use the new template/vacation.php

    BTW
    is it a idea to change the extensie to tpl for the template file ( we noe have two vacation.php file ??)

    regrades Jan Kruis

     
  • Charles

    Charles - 2009-03-30

    Hmmm... I'm confused.

    I know I recall discussion a while back about some new functionality, that would not only allow the user to set the frequency, but would allow the Admin from PREVENTING users from doing this, if the Site had a certain policy they wanted to enforce site-wide.

    Did this get lost?

    Also, I think in the same discussion, we talked about the possibility of setting Start/Stop dates, so you could actually schedule your vacation message ahead of time and have it auto-start/end at the desired times.

    Or am I just crazy?

     
  • GingerDog

    GingerDog - 2009-03-30

    libertytrek - yes, I vaguely remember such conversations; I'm happy to merge such features once 2.3 is out.

    (Speaking of which it's probably time for another rc release)

     
  • Charles

    Charles - 2009-03-30

    Ok, thanks, good to know I'm not going senile! ;)

    I'll see if I can find the discussion(s), and create a formal enhancement request to track it.

    Thanks!

     
  • J.Kruis

    J.Kruis - 2009-03-30

    Hi Guys,

    Hmmm... I'm confused too

    I know I recall discussion a while back about some new functionality, that
    would not only allow the user to set the frequency, but would allow the
    Admin from PREVENTING users from doing this, if the Site had a certain
    policy they wanted to enforce site-wide. ===> See function vacation & use of config.inc.php

    Did this get lost?

    Also, I think in the same discussion, we talked about the possibility of
    setting Start/Stop dates, so you could actually schedule your vacation
    message ahead of time and have it auto-start/end at the desired times.

    what has this to do with this patch

    the vacation.php template file can by used by edit-vacation and user-vacation so only have to modifed one file.
    In the config.inc.php file i added some value which give contole over vacation.php if a user can change type of replay and the time delay.

    Regards Jan

     
  • J.Kruis

    J.Kruis - 2009-04-07

    hi,

    I have a question ? Because in your earlier replay you have told

    I'll see if I can find the discussion\(s\), and create a formal enhancement
    request to track it.
    

    What happens with this modification ?

    Will it be used or ... ?

    These are actually two modifications:

    modification 1

    To reduce the two templates for setting the vacation edit-vacation.php and user-vacation.php to only one vacation.php which checks from which module ( admin or user) it is called. Because the two older templates did use a lot of same code.

    modification 2

    Adding the option to make a choice of reply.
    If the choice is once it act as vacation normale should work.
    If the choice is autoreply there is a value in config.inc.php which set the delay time between two emails from one sender to prevent the vacation.pl from replaying from a possible autoreplay email.

    The admin as well as the user can make the choice of replay. Depending on the settings in the config file.

    in the table vacation i add two records type and delay and in the table vacation-notification i add the record notified_at.

    In the config.inc.php file you can set these options

    allow or not the multiple-choice or reply
    allow or not the multiple-choice or reply for users

     
  • Christian Boltz

    Christian Boltz - 2009-04-13

    I only had a very quick look on your changes. Some notes:

    Making the reply-interval configurable per user is a good feature and will be merged after the 2.3 release.

    Merging the vacation template for users and admins into one file is also a good idea.

    Vacation start and stop date is indeed a different feature. I'd say it should be implemented after merging your changes (to avoid merge conflicts).

    We once used *.tpl for the template files and switched to *.php to make the PHP code inaccessible from the outside. (*.tpl can usually be downloaded as plain text.)

    Finally a question: Which version (or SVN revision) of postfixadmin did you use as base for your changes?
    Knowing this would make merging easier - however if you don't remember, I can reconstruct it from the $Id lines in the files. (It would be even better if you can provide a patch instead of the changed files. If you did your changes against a SVN checkout, just run "svn diff".)

     
  • Charles

    Charles - 2009-04-13

    > Making the reply-interval configurable per user is a good feature and will
    > be merged after the 2.3 release.

    Will there be an Admin option to disallow Users from setting/changing this interval if desired?

    Many sites (mine for one) will want to set this policy site-wide...

     
  • J.Kruis

    J.Kruis - 2009-04-13

    I will try to implement this request

     
  • J.Kruis

    J.Kruis - 2009-04-18

    Hi guys,

    I think it ready. I will test it for two more days.

    A question.

    I have given the command svn diff > diff_file to generate a path file
    but can I edit this file, to leave out my config.inc.php stuff out.
    and who must i send the new 2 php to your which i added to this project. (just a patchs)
    which are edit-userscontrol-domain.php and templates/vacation.php

    also what kind of file do you need for de modifaction in the database table.

    my svn version is 629 at this moment.

    Regrads Jan Kruis

     
  • GingerDog

    GingerDog - 2009-04-18

    Hi Jan,

    Yes - you can edit diff/patch files - just try and make sure it remains valid.
    Your diff file _should_ contain the new files as well - if it doesn't, try doing 'svn add file.php' and try and re-create the diff then.

    Thanks for the hard work :)
    David.

     
  • J.Kruis

    J.Kruis - 2009-04-18

    Hi David

    Thx for the info.

    But how abaut the records i add to the table in the database

    Jan

     
  • Christian Boltz

    Christian Boltz - 2009-04-18

    For the database changes, you have two options:

    a) perfect:
    add an upgrade function to upgrade.php that does the needed ALTER TABLE queries (upgrade.php has enough examples ;-) (you can use any function number you want - I'll set it to the correct value on commit)

    b) easy:
    describe what database changes are needed, for example:
    # additional fields for vacation table:
    # `vacation_interval` int(10) NOT NULL default '0',
    You can take these lines from a sql dump. GingerDog or I can then write the needed function in upgrade.php.

    If you add fields containing text, please choose the charset carefully:
    - latin1 (aka iso-8859-1) if the field is guaranteed to contain ascii chars only (like mail adresses)
    - utf-8 if the field can contain any text (like user comments, vacation message etc.)

    BTW: please don't modify the lines containing $Id manually. They are automatically maintained by svn.

     
  • J.Kruis

    J.Kruis - 2009-04-19

    database stuctuur of mine postfixadmin used for choice of reply

     
  • J.Kruis

    J.Kruis - 2009-04-19

    Hi David,

    I have uploaded two files

    - pfa-diff-090419.php
    - postfix_mysql_dump

    the first file is the patch file
    the seconfd file is mine database postfixadmin (mysql style)

    BTW saw you note to late about $Id
    please also check my engilsh if you could

    regardes
    Jan Kruis

     
  • J.Kruis

    J.Kruis - 2009-04-20

    Hi Guys,

    Oops !
    There was a bug in the pfa-diff-090419 file.
    hereby a new pathfle pfa-diff-090420

    Jan Kruis

     
  • J.Kruis

    J.Kruis - 2009-04-20

    patch file for choice of reply with userscontrol

     
  • J.Kruis

    J.Kruis - 2009-07-01

    hi Guys

    if i want to use the diff file on a other system how do i use it (because i want to test is on two other live systems).

    and will it also change the config file

    Regards Jan

     
  • GingerDog

    GingerDog - 2009-07-02

    "patch -p0 whatever.diff " should be all you need.

    Sometimes you need to strip the leading directories off the file paths, if this is the case you might need e.g. patch -p1 or something.

     
  • Christian Boltz

    Christian Boltz - 2013-12-28

    In the meantime, the option to set the vacation reply interval (which is part of your patch) is included in svn trunk.

    What does the remaining part of your patch do?

     
  • J.Kruis

    J.Kruis - 2013-12-28

    Hi Christian,

    The remaining part gives the admin the option to allow or disable the users of a domain to change the type of reply.

    I like the way you apply me setup for the patch into the svn (Tnkx).

    BTW   autoreply = 1 will not work properly because most other autoreply device will not respond within 1 second
    but the admin can put his own responetime at "1 => 'reply_every_mail'" in the config.inc.php file. Note might be appropriate in the context.

    Question:
    Is it necessary that we do need to check on "Active From:" and "Active Until:" at reply_ever_mail ?

    I am working on the remaining part using the the new svn so you may close is one

    I am also working on a check on date with error flash.
    please have a look at the patch checkdate because i have a problem.
    Checking on "Active Until" is not in front today works, but checking
    if "Active Until" is front of "Active From" is not working.

    can your also have a look at patch realname which replace pfa@domain.com to

    Jan Kruis pfa@domain.com

    Regards Jan

     
  • J.Kruis

    J.Kruis - 2014-08-15

    Hi Christian,

    as it is to me you can close ticket # 70
    autoreply is working and the rest are new patches.

    Regrades Jan Kruis

     
  • Christian Boltz

    Christian Boltz - 2014-08-16
    • status: open --> closed-accepted
    • Group: --> SVN (please specify revision!)
     
  • Christian Boltz

    Christian Boltz - 2014-08-16

    OK, closing this ticket - it's long enough already ;-)

    Thanks again for your patches!

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks