Vacation custom subject ignored (dovecot siege)

Discussion in 'Developers' Forum' started by ispcomm, Jul 27, 2017.

  1. ispcomm

    ispcomm Member

    Hi,
    I noticed that the cistom vacation subject is ignored in the dovecot siege. The vacation subject is always "Out of office reply" regardless of the setting in ispconfig.
    Is this supposed to be working or is it a problem on my servers? I'm running a somewhat old install of ispconfig 3.1.1p1 on multiserver setup. It is not easy to upgrade atm.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Works fine here in ISPConfig 3.1.6.
     
  3. ispcomm

    ispcomm Member

    I updated the servers to 3.1.6 now. I still have the wrong sieve. In the mysql database, the autoresponder_subject and autoresponder_text are correct. It's the .sieve generation that fails.

    I dug a little, and found a template in /usr/local/ispconfig/server/conf/sieve_filter.master that looks like the generated sieve:
    Code:
    ...cut...
    #################################################################
    # Autoreply
    #################################################################
    
    # Move spam to spam folder
    if header :contains "X-Spam-Flag" "YES" {
      fileinto "Junk";
      # Stop here so that we do not reply on spams
      stop;
    }
    vacation  :days 1
      :subject "Out of office reply"
      # :addresses ["test@test.int", "till@test.int"]
      <tmpl_var name='addresses'>
      "<tmpl_var name='autoresponder_text'>";
    </tmpl_if>
    ~
    
    
    Seems an old template and is this the problem? The file date is of today (I updated ispconfig today).
    Perhaps because I do not "reconfigure services" during update ?

    UPDATE: There's a sieve_filter_1.2.master which actually looks better and contains:
    Code:
    vacation  :days 1
      :subject "<tmpl_var name='autoresponder_subject'>"
      <tmpl_var name='addresses'>
      "<tmpl_var name='autoresponder_text'>";
    
    <tmpl_if name="autoresponder_date_limit">
    }
    
     
    Last edited: Jul 28, 2017
  4. ispcomm

    ispcomm Member

    Till,
    I went ahead and found out why it's not working in my install.
    The "maildeliver_plugin.inc.php" code will try to determine the dovecot version using "dovecot --version".
    Code:
                            //* Select sieve filter file for dovecot version
                            exec('dovecot --version', $tmp);
    
    However, in my install I have a dovecot plugin for munin which is also "dovecot" and located earlier in the path (in /usr/local/bin/dovecot). When called it returns dovecot statistics and not the version of the installed dovecot.

    I'm not sure what is the correct way to "correct" this issue. I'm sure relying on the path is not ideal also from a security point of view.Perhaps calling with the full path would be better.

    If it was me, I would try a few known-good locations for dovecot like "/usr/sbin/dovecot" and "/usr/bin/dovecot" and missing which I'd rely on a config in the ispconfig main.

    thank you.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    In my opinion, you should never name a third party software with the same nake than a well known daemon on a system and then put this third party binary in the path. When it is a dovecot munin plugin, then a reasonable name would be dovecot_munin and not dovecot.

    Neverthelsee, I've added a note in the bug tracker:

    https://git.ispconfig.org/ispconfig/ispconfig3/issues/4737
     
  6. ispcomm

    ispcomm Member

    I agree with you. It's better to not have a setup like I had. I don't know when I did this and why (perhaps quick lazy thing from the past). I have since renamed the offending script and can confirm that dovecot version detection now works.

    But still, it's better to remove the path dependencies if possible. Thanks for opening the issue.
     

Share This Page