PDA

View Full Version : Newline fails in Mailfilter now.


Rescue9
16th September 2009, 18:02
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.

till
17th September 2009, 12:24
Bugtracker:

http://bugtracker.ispconfig.org/index.php?do=details&task_id=905&project=3

Rescue9
17th September 2009, 18:37
WOW... fixed. So cool. Thanks! Now all that needs to be done is a release of 3.0.1.5 :)

till
17th September 2009, 18:39
Or you get the changed files from svn.

Rescue9
17th September 2009, 18:51
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.

till
18th September 2009, 12:47
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.

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.

Rescue9
18th September 2009, 16:04
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.

till
18th September 2009, 16:08
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.

Rescue9
18th September 2009, 16:34
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.

till
19th September 2009, 11:43
1) Yes.
2) Yes.

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