Autoresponder trick

Discussion in 'Tips/Tricks/Mods' started by manarak, Feb 3, 2011.

  1. manarak

    manarak Member

    I would like the autoresponder message to be dynamic, i.e. how can I program the autoresponder message to send back a password that changes every day or similar?

    It would be great if the autoresponder text could be replaced by the output of a given script for example.
  2. manarak

    manarak Member


    where is the autoresponder message stored?
    in the database?
    can I make a cron job that changes the message every day?
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    That depends on the lda that you use. For courier, it is tored in a file in the /var/vmail/mailfilters/..... folder. For dovecot the message is stored in the .sieve file in the root of the maildir folder.

    You can change the autoresponder text with the ispconfig remote API withe the mail user update function.
  4. manarak

    manarak Member

    found it in mailfilters, thank you!

    will try to use a script to change it every day.
  5. manarak

    manarak Member

    can't get it to work.

    I chmodded .vacation.msg to 777 and added
    to the openbasedir...

    and I try
    $fh = fopen('/var/vmail/mailfilters/', 'w')
    (passwords is the email alias)

    but I still get

    ideas anyone?
    Last edited: Feb 4, 2011
  6. manarak

    manarak Member

    what else than file permissions and openbasedir is denying access here please?
  7. manarak

    manarak Member

    still stumped by this problem.

    .vacation.msg has 777 permissions, as well as the directory containing the file.

    I added the path to PHP openbasedir.

    I still get

    Warning: fopen(/var/vmail/mailfilters/ [function.fopen]: failed to open stream: Permission denied in /var/www/clients/client2/web7/web/change_autoresponder.php on line 3

    Can someone help me or tell me why I can't open the file for writing?
  8. falko

    falko Super Moderator ISPConfig Developer

    Did you check the permissions/ownerships of all directories in the path to /var/vmail/mailfilters/
  9. manarak

    manarak Member

    thank you Falko

    that is the probable cause why it doesn't work, but I don't want to potentially mess up my system by changing the groups on the directories

    instead, I try to copy files there, but it doesn't work either:

    the script works fine when started manually, but not with the cron job...

Share This Page