Autoresponder not using schedule

Discussion in 'ISPConfig 3 Priority Support' started by jon, Apr 27, 2016.

  1. jon

    jon Member

    I had a customer set up an autoresponder on their domain and set it to start a few hours later. They sent a test message and received an auto response before the autoresponder was supposed to start.

    I set up a test account on their domain and had the same problem.

    This problem does not appear to happen on other domains.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which ispconfig version?
    Does the server use dovecot or courier?
     
  3. jon

    jon Member

    ISPConfig version 3.0.5.4p9 and using Courier
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The autoresponder is stored in the file:

    /var/vmail/mailfilters/domain.tld/user/.autoresponder

    You should try to compare one with a working date setting with the one that don't works.
     
  5. jon

    jon Member

    Non-working:
    Code:
    `test -f /var/vmail/mailfilters/$HOST/$USER/.vacation.msg && exit 1 || exit 0`
    if ($RETURNCODE==1)
    {
           {
           if (!/^List-Unsubscribe:.*/:h )
           {
                   if (!/^X-Spam-Flag: YES/:h )
                   {
                      NOW=time
                      if (1461773400 lt $NOW && 1461888000 gt $NOW)
                      {
                          RESPOND="/var/vmail/mailfilters/$HOST/$USER/.vacation.msg"
                          RESPONDDB="/var/vmail/mailfilters/$HOST/$USER/.vacation.lst"
    
                          # The following must be one contiguous line
                          cc "| mailbot -t $RESPOND -d $RESPONDDB -c 'UTF-8' -D 1 \
                          -A 'From: $RECIPIENT' -s 'Auto Response: from $RECIPIENT' \
                          /usr/sbin/sendmail -t -f ''"
                      }
                   }
           }
           }
    }
    
    Working:
    Code:
    `test -f /var/vmail/mailfilters/$HOST/$USER/.vacation.msg && exit 1 || exit 0`
    if ($RETURNCODE==1)
    {
           {
           if (!/^List-Unsubscribe:.*/:h )
           {
                   if (!/^X-Spam-Flag: YES/:h )
                   {
                      NOW=time
                      if (1461765900 lt $NOW && 1461888000 gt $NOW)
                      {
                          RESPOND="/var/vmail/mailfilters/$HOST/$USER/.vacation.msg"
                          RESPONDDB="/var/vmail/mailfilters/$HOST/$USER/.vacation.lst"
    
                          # The following must be one contiguous line
                          cc "| mailbot -t $RESPOND -d $RESPONDDB -c 'UTF-8' -D 1 \
                          -A 'From: $RECIPIENT' -s 'Auto Response: from $RECIPIENT' \
                          /usr/sbin/sendmail -t -f ''"
                      }
                   }
           }
           }
    }
    
     
  6. jon

    jon Member

    Yikes, the working one just sent me any auto-reply. Earlier today it did not.
    I'll have to find one that is working and post again.
     
  7. jon

    jon Member

    So it turns out that none of the domains work. It takes a minute to create the . files (I guess that's why it tells you to wait a minute :) ) and I tried too fast earlier today.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you check the system time of your server (use the "date" command)? Often the system tie of the server is not your local time zone, but courier uses the date and time of the system for the begin and end date. This time difference between local and system time can lead to the impression that the autoresponder activates a few hours too late or too early, the solution in this case is to set system time to your local time zone.
     
  9. jon

    jon Member

    Checked time with the date command, it is exactly the same as my PC (both use NTPD).
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Then I've no idea why it is not working, maybe the maildrop version does not understand the time limitation. As far as I can see, the maildrop filter files look fine syntactically.
     
  11. jon

    jon Member

    Is there a way I can see what's going on from the logs?
     

Share This Page