#1  
Old 10th February 2013, 07:04
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Exclamation API mail_user_filter_add

Hello Till,

I have used the API functions (mail_user_filter_add, mail_user_filter_delete, mail_user_filter_get, mail_user_filter_update) ..

But they dont have any effect or rather don't yield any results. I created a filter with action DELETE but I still get the mail ...

Do these functions really work? I ask because there's no such feature listed in client's control panel in ISPConfig3.

Thanks, Joseph
Reply With Quote
Sponsored Links
  #2  
Old 11th February 2013, 12:55
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,043
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

Quote:
Do these functions really work? I ask because there's no such feature listed in client's control panel in ISPConfig3.
The feature is available for the client, see Mailbox details > filter tab
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 11th February 2013, 18:54
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Thanks alot Till.

I have indeed seen it though it has not worked regardless of the key words I define with action delete ...
Reply With Quote
  #4  
Old 12th February 2013, 08:40
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,043
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

Did you test it by using the ispconfig interface or api? I've tested it here by using the interface with the current 3.0.5 SVN branch version and the filters work.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 12th February 2013, 09:03
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default Mail Filters

Till am not sure why it would not work on my server ...Please see attachment and that rule was created through ISPConfig panel.

I also sent a test message from YahooMail with the following subjects:

Subject #1: jesus cares
Subject #2: does jesus care

And in ALL the above cases, the messages were delivered to my inbox yet i expected them to be deleted as I had indicated with the action.
Attached Images
 
Reply With Quote
  #6  
Old 12th February 2013, 09:09
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,043
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

maybe the rules were not written to disk, e.g. because the server.sh cronjob is not running or a similar issue. Check the .sieve file of this mailbox if you use dovecot or the mailfilter file if you use courier to see if it contains the filter rules.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 13th February 2013, 15:59
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Till thanks for the endevour to help. I have looked at the .sieve file and below is the content of it in regards to that rule

Code:
### BEGIN FILTER_ID:4
if (/^Subject: .*jesus/:h)
{
exception {
to /dev/null
}
}
Is that fine?
Reply With Quote
  #8  
Old 23rd February 2013, 04:11
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
 
Default

Till I did look at the .sieve.log and I see the following:

Code:
# cat .sieve
require ["fileinto", "regex", "date", "relational", "vacation"];



### BEGIN FILTER_ID:6
if (/^Subject: .*Jesus/:h)
{
exception {
to /dev/null
}
}
### END FILTER_ID:6


keep;
As for sieve.log
Code:
# cat .sieve.log
sieve: info: started log at Feb 23 03:04:14.
main_script: line 6: error: expecting test identifier after '(' in test list, but found '/'.
main_script: line 6: error: unexpected character(s) starting with '^'.
main_script: line 6: error: unexpected character(s) starting with '.'.
main_script: line 7: error: failed to accept more tests for command 'if'.
main_script: error: parse failed.
sieve: info: started log at Feb 23 03:05:02.
main_script: line 6: error: expecting test identifier after '(' in test list, but found '/'.
main_script: line 6: error: unexpected character(s) starting with '^'.
main_script: line 6: error: unexpected character(s) starting with '.'.
main_script: line 7: error: failed to accept more tests for command 'if'.
main_script: error: parse failed.
sieve: info: started log at Feb 23 03:05:39.
main_script: line 6: error: expecting test identifier after '(' in test list, but found '/'.
main_script: line 6: error: unexpected character(s) starting with '^'.
main_script: line 6: error: unexpected character(s) starting with '.'.
main_script: line 7: error: failed to accept more tests for command 'if'.
main_script: error: parse failed.
Kindly advice why the errors above ...

Thanks, Joseph
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Domain Name + SSL Purchasing/Setup API agentmoller001 Plugins/Modules/Addons 14 21st August 2014 09:47
API for third party modules SupuS General 1 6th October 2012 10:52
Folder Protection API snowfly General 4 9th January 2012 08:15
ISPConfig3 + API + BoxBilling class450dude Installation/Configuration 3 22nd August 2011 22:32
ISPConfig API eKg General 5 12th July 2011 15:34


All times are GMT +2. The time now is 12:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.