Newline fails in Mailfilter now.

Discussion in 'Installation/Configuration' started by Rescue9, Sep 16, 2009.

  1. Rescue9

    Rescue9 Member

    Aaarrrrggghhh.....
    System: Perfect Server Ubuntu 9.04 setup Fully upgraded.

    When adding new mailfilters now the output isn't getting printed correctly. The \n isn't getting output correctly. Here's a sample:

    ### BEGIN FILTER_ID:35\n\n`test -e \"$DEFAULT/.Other\" && exit 1 || exit 0`\nif ( $RETURNCODE != 1 )\n{\n `maildirmake -f \"Other\" $DEFAULT`\n `chmod -R 0700 \"$DEFAULT/.Other\"`\n `echo \"INBOX.Other\" >> $DEFAULT/courierimapsubscribed`\n}\nif (/^Subject:.*WhoRU/:h)\n{\nexception {\nID35EndFolder = \"$DEFAULT/.Other/\"\nto $ID35EndFolder\n}\n}\n### END FILTER_ID:35\n

    As you can see... it's all on one line, which means that deleting the filter via the web page deletes it from the mail_user_filter table, but not the mail_user table. Naturally, it also outputs into the .mailfilter file like this, making it break.

    Just to be clear... it's not only showing up in the .mailfilter file as listed above. It's also showing up in the mail_user table the same way. It seems as if there is a problem in how the line gets put into the database, and this is what is causing it to be written incorrectly to the file.
     
    Last edited: Sep 17, 2009
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. Rescue9

    Rescue9 Member

    WOW... fixed. So cool. Thanks! Now all that needs to be done is a release of 3.0.1.5 :)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Or you get the changed files from svn.
     
  5. Rescue9

    Rescue9 Member

    True.... I've not played with svn a lot. How do I tell which changed files I need?

    EDIT:
    Nevermind... probably a bit more in depth than you want to go. :p I'll Google.
    I would like to ask something though. It would be really helpful if when you squashed a bug, you put what file was changed for the fix. This way we can look at the current file, the fixed file, and learn from it. This would help those of us who are trying to help squash bugs.
     
    Last edited: Sep 17, 2009
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    We do this already in SVN. Download a SVN client of your choice e.g. tortoisesvn if you work on windows, then you can see in the SVN log which files had been changed and also which lines in which files had been modified to fix a bug.
     
  7. Rescue9

    Rescue9 Member

    Thanks Till. I just downloaded tortoisesvn yesterday after I saw your post, but am still learning how it works. I didn't realize that everything works from explorer... definitely different from working with svn from linux console.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The staps are:

    1) Create a new empty folder in explorer.
    2) make a right click and choose "SVN Checkout". Enter the svn URL:

    svn://svn.ispconfig.org/ispconfig3/trunk/

    3) After the checkuot, make a right click on the folder and choose "Tortoisesvn > show log" to open the log viewer. From time to time you should run update to keep your svn version up to date.
     
  9. Rescue9

    Rescue9 Member

    Ok... got that. I'm slowly figuring it out.

    Still have a couple of questions though.
    1) I posted my last bugfix to flyspray and you actually made the changes. Is it ok for me to make the changes directly to the SVN next time, or what would be the preferred method?

    2) Is it ok if I make some minor changes to the doc files so that I can get the hang of working with SVN prior to making live changes on functional files?

    Thanks a lot for your help.I've wanted to help this project for some time, but didn't know how.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Yes.
    2) Yes.

    If you dont have a svn login yet, please send a email to dev [at] ispconfig [dot] org
     

Share This Page