Server-side filtering to subfolder for all users (spamassassin)

Hello,
I am trying to integrate a 3rd-party spam filter/virus scanner, it is just spamassassin/amavisd-new running on a front-end box that adds an X-Spam-Flag: YES header to the message before passing it on. This works great on our current postfix/cyrus-imap system using individual cyrus sieve server side filters to look for the flag and move the message into the user's spam folder.
My question is how to do this in a universal way on OCS, I have been reading through the docs and think server-side filters are the answer, but I can't seem to find a way to set up a system-wide filter that will put the incoming message into the recipients' spam subfolder. Does anyone have any clues on this? I think the key here is to somehow be able to use the recipient name as a variable to pass as a parameter to the moveto action, but I can't see a way to do this. Any pointers would be appreciated.

You can do this in a single system wide rule, but it's undocumented and technically unsupported.
First of all, checking the spam-flag in a system side Deliver rule is straightforward:
<condition>
<attribute tag="xheader" param="X-Spam-Flag"/>
<operator caseSensitive="no" op="stringequal"/>
<operand>YES</operand>
</condition>
(Checking on the subject is OK too, if you rewrite it through SpamAssassin.)
Then to move to a folder, you'll need an external PL/SQL action since the full folder name will vary for each user:
<action>
<command tag="call"/>
<parameter>SpamCheck.moveMsg</parameter>
<parameter>parameter1</parameter>
<parameter>parameter2</parameter>
</action>
Then the tricky part is the Pl/SQL to do the move, using the undocumented es_ga.g_username variable. This is the only way to know which mailbox context you're currently in for the deliver event at the system level. Without this, you need a separate rule for every user. Here's the bare bones of a procedure that would do it.
procedure moveMsg(p_eventid in integer,
p_sessionid in integer,
p_msgobj in mail_message_obj,
myparam1 in varchar2,
myparam2 in varchar2,
p_status out number)
is
this_user varchar2(255);
mList MAIL_MESSAGE_LIST;
Begin
this_user := es_ga.g_username;
mList:=MAIL_MESSAGE_LIST(p_msgobj);
mail_folder.move_messages(p_sessionid, mList, '/' || es_ga.g_username || '/ServerMove');
end MoveToSpam;
You probably want to add some exception handling, etc. to that ;-) More info on the Pl/SQL API in general is in the Mail Application Dev Guide.

Similar Messages

  • TS2998 mini mac server Mail App keeps freezing for all users.

    not an email or password or ISP problem, an issue with the machine.
    mini mac server late 2011
    moountian lion operating system.
    all was ok until about a month ago when this issue develops.
    cant investigate because the program freezes, but only on this machine
    any ideas?

    FWIW I've been struggling with this for a long time across many computers. Almost reliably when I look at my aggregate Inbox I see messages including new messages in my Exchange account's inbox, but when I click on the Exchange Inbox I would see nothing. Then I would have to quit and restart Mail and the box would show up.
    Irregularly I would also occasionally get into a situation where all new messages received in the Exchange account would show no content when selected. When this happened in the past I would have to go through a separate webmail interface to read them.
    This week I experienced a new wonder where the account was online and appeared to Synchronize OK, but I stopped getting new messages. Reboot, offline/online, disable/enable account: none of these fixed it.
    Finally I just found a workaround: by modifying the account to store no messages on the computer, and then restarting mail, it was forced to ask the server for the messages again. Minutes of synching later and I'm back up to speed. I've turned local message storage back on again, because I doubt I can live without it, but it might help solve someone else's problems.

  • How do I configure a proxy for all users via GPO on Server 2012 R2?

    I would like to configure a proxy that applies to all users that log into our server running Server 2012 R2. I can manually set up the proxy (on an individual account basis) via Internet Options in Control Panel but this proxy needs to be configured for
    all users. Is it possible to do this in Group Policy Management for Server 2012 R2?
    Thank you
    Silas Horton

    > Have you checked *User configuration\Policies\Windows Settings\Internet
    > Explorer Maintenance\Connection\Proxy Settings *in group policy?
    He cannot check this because it is't available anymore starting with
    Server 2012/Windows 8/IE 10...
    > Hope it helps.
    No, it doesn't :)
    Better check User configuration - Preferences - Control Panel Settings -
    Internet Settings
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • CP3525dn, networked -- default duplex for all users (embedded web server)

    I want to set the default for all users on our networked CP3525dn to be duplex. I cannot find this option anywhere in the embedded web server. I have duplex turned on, of course, and users can set their own default to duplex, but I want it to be default for everyone--the default default, if you will.
    Is this possible? I'm fairly certain it's possible if the printer is connected to a computer and shared on the network (but I don't remember the specifics) but I can't find out how to do it if it's on the network on its own.
    Thanks!

    I don't believe you can.  It must be set for every user manually.
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

  • Adding printers to Terminal Server 2008 for all users

    Hi!  I'm trying to add a printer to a terminal server for all users that log in.  I've been reading around and this seems like a working solution:
    Rundll32 printui.dll,PrintUIEntry /ga /c\\localcomputername /n\\servername\printername
    So I ran this with the proper parameters.  Nothing shows up in Devices and Printers with the name I specified.  I rebooted the server, still nothing.  I re-run the command above and it tells me there's already a printer defined with that name. 
    I look at Devices and Printers and the name I specified still isn't there.  Why doesn't the above command work like it's supposed to?
    Thanks!

    Thanks, yes, that was the first command I tried (without the /c).  All subsequent attempts tell me the printer already exists yet it definitely does not show up under Devices and Printers.  I ran the above logged in as Administrator with an elevated
    command prompt.  The printer can't be seen from this login or a 'normal' user login.

  • Silent install of SQL Server 2008r2 for ALL users?

    We ship an installer that does a silent install of SQL Server 2008r2 with all the 'right' parameters pre-configured. We use this:
    /QS /INSTANCENAME=MSSQLSERVER /ACTION=Install /FEATURES=SQL,BC,Conn,ADV_SSMS /SAPWD=MyPasswordGoesHere /SECURITYMODE=SQL /TCPENABLED=1 /ADDCURRENTUSERASSQLADMIN /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /AGTSVCACCOUNT="NT
    AUTHORITY\SYSTEM" /IACCEPTSQLSERVERLICENSETERMS
    However, the problem is that if a tech installs it for another user, that user does not have access, since ADDCURRENTUSERASSQLADMIN flag only adds the user who installed it -- rather than adding ALL users on the computer. (Or at least all admins.)
    I tried replacing ADDCURRENTUSERASSQLADMIN with this:
    /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS"
    but that also failed to work. How can we install for all users, or at least all administrators?
    NOTE: we do NOT know the name of the computer or the users. The installer has to work for any computer setup.
    Similar question has already been asked, but wasn't helpful:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/8354675f-be9b-4909-b776-942f03954807/how-to-do-a-silent-install-of-sql-2010-express-for-all-users-on-a-computer?forum=sqlexpress
    The documentation does not make it clear what you can pass as allowed SQLSYSADMINACCOUNTS parameters. I also am not sure if I would need to change the AGTSVCACCOUNT or SQLSVCACCOUNT?

    I tried one more thing:
    /SQLSYSADMINACCOUNTS="BUILTIN\Administrators"
    which does not halt installation with an error. 
    However, doing:
    osql -E
    create database test
    go
    in a command prompt from a different admin user on the same machine results in a permissions error... but works if done from a command prompt on the user account from which MSSQLServer was installed.
    So for some reason /SQLSYSADMINACCOUNTS="BUILTIN\Administrators" does not work as expected.
    Anyone have any idea why?
    I checked the output log from the install, and found it had generated and used a configurationFIle to do the install. I looked in that file, and these were the settings, even though I did NOT pass /ADDCURRENTUSERASSQLADMIN as a command line option:
    ; Windows account(s) to provision as SQL Server system administrators. 
    SQLSYSADMINACCOUNTS="BUILTIN\Administrators"
    ; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication. 
    SECURITYMODE="SQL"
    ; Provision current user as a Database Engine system administrator for SQL Server 2008 R2 Express. 
    ADDCURRENTUSERASSQLADMIN="True"

  • How to Enable Auto-Complete for All users on Terminal Server

    Hello,
    I have 4 Microsoft 2003 Terminal Servers, and I want to enable Auto-Complete for all users, and I am unable to find a way to do this. I have tried creating a custom install of Adobe Reader, and installing that, but it isn't working. Ideas anyone?
    Thanks in advanced
    Doug

    Acrobat is not permitted to run as a server process.
    Licenses are assigned to individual users, each of whom must have their own serialized copy.

  • Block all websites apart from the homepage for all users. Citrix environment with Server 2003.

    Citrix Xenapp 5 and Windows server 2003 environment. We want to force Firefox to kiosk mode with a pre-set homepage for all users. I also want to lock this to only one website. I have managed to set up the kiosk mode with R-Kiosk addon and Mozilla.cfg file. I am trying to use BlockSites to block all internet sites and only allow the one site with the whitelist option. I can get the addon to install for all users, but can’t get the default settings across. I have tried to add this with the Mozilla.cfg file, but it looks like this addon is getting it’s settings from the profile folder. If I set the preferences for the addon in Mozilla,cfg file, it actually picks it up but it doesn’t apply it to the addon for some reason. Does anyone have any other ideas on how I can lock this down to the one site?

    I am not entirely sure how to do this, but the enterprise community would be a good place to ask. They have a email group you can ask on this page: [https://www.mozilla.org/en-US/firefox/organizations/faq/]

  • How do I completely disable initial "Checking Compatibility of Add-ons" pop-up for all users on a Citrix server where the FireFox was upgraded to 29.0.1

    I have a set of Citrix servers, we need to upgrade the FireFox on them to 29.0.1
    When I have done this, and a user runs FireFox, now the users are being presented with a pop-up "Checking Compatibility of Add-ons" which delays the start of FireFox.
    I need to prevent this so users just see FireFox start up without any delays.
    I have installed the add-on that re-enables extensions.checkCompatibility and tried various ways of implementing it like pref("extensions.checkCompatibility", false);
    However we seem to have a situation where the add-on that enables the setting is not loaded yet so the setting is not implemented.
    How do I solve this for all users?

    You can try to set the browser.startup.homepage_override.mstone pref to ignore on the about:config
    *http://kb.mozillazine.org/browser.startup.homepage_override.mstone
    You can use a mozilla.cfg file in the Firefox program folder to specify new (default) values and possibly lock prefs.
    Place a local-settings.js file in the defaults\pref folder where also the channel-prefs.js file is located to specify using mozilla.cfg.
    pref("general.config.filename", "mozilla.cfg");
    These functions can be used in the mozilla.cfg file:
    defaultPref(); // set new default value
    pref(); // set pref, but allow changes in current session
    lockPref(); // lock pref, disallow changes
    See:
    *http://kb.mozillazine.org/Locking_preferences
    *http://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/
    *http://mike.kaply.com/2014/01/08/can-firefox-do-this/

  • Unable to change keyboard layout for all users on Windows Server 2012 R2

    Hi,
    I have a requirement where I need to support national keyboard layout for Danish for all users on that machine. When I ran the powershell with script Set-WinUserLanguageList
    -LanguageList da-DK it only sets the Danish keyboard layout to the specific logged in user.However the for other users its same English(US) keyboard which is not expected.
    Please help me how to set the Danish keyboard for all users on the machine. Its Urgent!Thanks

    Hi Mike,
    Thanks for reply.
    But I need to configure everything using powershell script. Is it possible to use powershell script to setting group policy/ adding logon script ?
    These are pretty basic administration tasks and almost always quicker to accomplish with the GUI. Why do you want to use a PowerShell script?
    EDIT: Here's some information on the topic however:
    https://technet.microsoft.com/en-us/library/cc781361%28v=ws.10%29.aspx
    http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/06/use-powershell-and-group-policy-for-your-logon-script.aspx
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • Setting Default Preferences for All Users in Crystal Reports Server 2008 v1

    We are currently looking to set the default preferences in the CMC for all of our users.
    I did locate this page Link: [How to set default preferences for all users in Infoview 3.1/CRS 2008]
    The first part of the thread did seem promising but I am unable to find the sample .jsp code that people recommended.
    I would assume that this scenario is common enough that someone knows a way to set universal preference defaults.
    Thank you

    I thought I could just run it too but when I attempt to I get a Windows Script Host error:
    Script: C:\User Prefs.vbs
    Line: 1
    Char: 1
    Error: Expected statement
    Code: 800A0400
    Source: Microsoft VBScript compilation error.
    I noticed the first most line seems to be markup for a web interface though I am not familiar with vbs so I may be wrong.  I used the publishing wizard to put the script on the CMC to attempt to run it through the CMC but it still does not work.

  • You do not have sufficient privileges to complete this installation for all users of the machine. Log on as administrator and then retry this installation

    Hi all
    Have seen a couple threads regarding this but unfortunately nothing that solves my problem thus far!
    Right now, our developers are using the Domain Admin account to promote their website code using MSI files.  I'd like to change this as I feel the Domain Admin account should be on lock down and only used when absolutely necessary, pretty common.  The
    same goes for my account too, I would like to absolve as much use of the Domain Admin as I can.
    Problem is, when they run installers from their own accounts, they receive this error: You do not have sufficient privileges
    to complete this installation for all users of the machine. Log on as administrator and then retry this installation
    The accounts they are using are part of the Built In Administrators group and the Domain Admins group... I'm not sure what other permission you'd need in a domain?  We've gone as far as explicitly giving them local admin access on this server and still
    nothing changes.
    Is there a Group Policy or something that I can change to provide install rights and possibly remove these accounts as Domain Admin and more along the line of Power User?
    Thanks much for your help!
    Ryan

    Hi,
    You could use Software Restriction Policies (SRP’s) or Applocker(supported on Windows server 2008 R2/Windows 7 only) to restrict the running
    of the application for specific user.
    Description of the Software Restriction Policies
    http://support.microsoft.com/kb/310791
    HOW TO: Restrict Users from Running Specific Windows Programs
    http://support.microsoft.com/kb/323525
    How to Implement Group Policy Security Filtering
    http://www.windowsnetworking.com/articles_tutorials/Group-Policy-Security-Filtering.htmlPlease remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Calendaring not enabled for all users

    OK, I am sure I have overlooked something, but why do some of my user have Calendaring enabled when I look at End User Information on the CUPS Server and some do not? All users are setup with the same profiles. But I can't find where to enable it for the other users.
    Thanks in advance,
    Doug

    Calendaring is enabled by the end user-
    In CUPC
    File>Preserences>Status>Show me as "in a Meeting"
    In CCMUSER Options
    https://CUPSSERVER:8443/ccmuser/showHome.do
    User Options>Preferences>Calendar Settings
    I'm not sure if there is a way to do it from the Admin side....

  • Single Webstart install for all users on a PC?

    Is it possible to do a single install of a Web Start application for all users on a Windows PC? Currently, it appears that each user would have to do the installation.

    I have the same requirement as mikemil. I have read the documentation as dietz333 suggested!
    What have I done:
    - created all the required server side stuff for JNLP
    - created the client side properties.config file referencing the server side system deplyoment.properties via a url
    - this server side deployment.properties contains the property:
    deployment.system.cachedir=c:\\temp\\ws-system-cache
    With that I can do on a client:
    javaws -system <my-jnlp-url>
    All works as expected. Everything gets downloaded and cached in the specified c:\temp\ws-system-cache!
    When I try to "start" <my-jnlp-url> from a browser (ie) it will be stored within the user cache! So, I have to change file association for the JNLPFile type to contain the "-system" option. With that it also works with links in the browser.
    My questions/comments:
    - this requires "some" administrative effort on the client side. Is there a less administrative solution?
    - since there is only a "system" specific location for the deployment.config all Java WS applications ever started will go into this system cache. Wright?

  • How to set an adapted project dashboard view as initial for all users?

    Hi all.
    We have the cProjects project dashboard active and have defined (via settings, save as) a custom view with the columns relevant in this particular installation. 
    I can however only save this view with assignment "user" meaning that it only applies to the user logged on when creating it. 
    We are however looking to have a common global customized view that all users should begin with. 
    Compare the R/3 functionality with layout management in reports where you can define whether the layout should be
    user specific or not
    default
    My question is therefore if it should be possible to save global views in the above example and if not how to achieve what we are looking for.
    I assume one option could be to see if one can use BADI DPR_EVE_DASHBOARD but it seems this should be possible to handle within the application given that the field "Assignment" is there when you save the view.  At the moment only with the value "user" available though ...
    Regards / Anders

    Hej Anders
    You can save a default view for all users under administration mode:
    http:<server>:<port>/sap/bc/webdynpro/sap/cprojects?sap-config-mode=X
    BR
    Matthias

Maybe you are looking for

  • Error when calling a package function

    any insight why my object is erroring out when calling a function. the error is oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character to number conversion error ORA-06512: at line 1 it erro

  • My Podcast is not appearing in the iTunes Store - Feedvalidator says Valid!

    Hi there! This is my first Podcast and something is wrong but I really dont know why... I tested my rss.xml Feed several times with feedvalidator.org... Result: This is a valid RSS feed. ... when I try to uplad it on itunes i can do it every second..

  • Security settings in XI

    hi.. Being am a beginnner where do we do the security settings in xi thanks guna

  • Multiple Chart of Accounts for one holding company.

    Hey, I recently encountered a scenario where a Holding Company will have several companies under 5 different sectors under it. If we call the holding company 'ABC', all the other companies under the ABC company will be segregated to 6 main sectors wh

  • I cant get my imessage or my facetime to activate on my iphone 5.

    every time i try to activate them it will say waiting for activation then after a min or so itll tell me activation unsuccessful. any idea of what might be wrong or how to fix it ?