How use custom dkim selector on mailu? - docker

I have a server with mailu installed and would like to know how to use a specific dkim selector.
I tried putting a file inside mailu/overrides/rspamd/dkim.conf
selector = "dkim1";
path = "/var/lib/rspamd/dkim/$domain.$selector.key";
and also mailu/overrides/rspamd/dkim_signing.conf
dkim_signing {
allow_envfrom_empty = true;
allow_hdrfrom_mismatch = false;
allow_hdrfrom_multiple = false;
allow_username_mismatch = false;
path = "/var/lib/rspamd/dkim/$domain.$selector.key";
selector = "dkim1";
sign_authenticated = true;
sign_local = true;
symbol = "DKIM_SIGNED";
try_fallback = true;
use_domain = "header";
use_esld = true;
use_redis = true;
key_prefix = "DKIM_KEYS";
}
but apparently I was not successful

I found the answer, just set the variable "DKIM_SELECTOR" in "mailu.env"

Related

Display image when bool variable is true

How can i do this:
I have 5 incentive images. I need to display each image if my bool variable is true.
Here's What I did:
BOOL var1 = true;
BOOL var2 = true;
BOOL var3 = false;
BOOL var4 = true;
BOOL var5 = false;
if(var1)
{
cell.incentive1.hidden = false;
}
if(var2)
{
cell.incentive2.hidden = false;
}
if(var3)
{
cell.incentive3.hidden = false;
}
if(var4)
{
cell.incentive4.hidden = false;
}
if(var5)
{
cell.incentive5.hidden = false;
}
this is working..
I have a follow up question,
how will i be able to display the var4's uiimageview var2's uiimageview. I need the uiimageview to be dynamically created. That when the app detects the bool variables that are true there will be no gaps.
thanks..
When you use if..else if condition, if any one condition passes then the remaining will not be evaluated.
So for fixing the issue, you need to change all to if conditions.
But I'll suggest using like following is a better approach (There is no need of if else conditions):
cell.incentive1.hidden = !var1;
cell.incentive2.hidden = !var2;
cell.incentive3.hidden = !var3;
cell.incentive4.hidden = !var4;
cell.incentive5.hidden = !var5;
You should not use if...else as all images are independent. You should:
if(var1)
{
cell.incentive1.hidden = false;
}
if(var2)
{
cell.incentive2.hidden = false;
}
if(var3)
{
cell.incentive3.hidden = false;
}
if(var4)
{
cell.incentive4.hidden = false;
}
if(var5)
{
cell.incentive5.hidden = false;
}
You've got chained if..else if statements going on there. This means that once one of the conditions is satisfied, the entire evaluation is done and it jumps to the next bit of code. Remove the else everywhere, so that every condition is evaluated in isolation.
Try this.
cell.incentive1.hidden = (var1 == true)?true:false;
cell.incentive2.hidden = (var2 == true)?true:false;
cell.incentive3.hidden = (var3 == true)?true:false;
cell.incentive4.hidden = (var4 == true)?true:false;
cell.incentive5.hidden = (var5 == true)?true:false;
As given code if var 1 is true then it will goes to 1st block other wise it goes to next.
and best way to hide and display images you can set alpha 0 for hide and 1 for display.

I have an issue with hiding text fields

I created a bar button item. Which will toggle 12 text fields' visibilty. I have tried the method below but even if I click the button while it's title is = Hide, It still calls the first method.
- (IBAction)namesButton:(id)sender {
if ((self.namesButton.title = #"Names")) {
_text1.hidden = FALSE;
_text2.hidden = FALSE;
_text3.hidden = FALSE;
_text4.hidden = FALSE;
_text5.hidden = FALSE;
_text6.hidden = FALSE;
_text7.hidden = FALSE;
_text8.hidden = FALSE;
_text9.hidden = FALSE;
_text10.hidden = FALSE;
_text11.hidden = FALSE;
_text12.hidden = FALSE;
self.namesButton.title = #"Hide";
NSLog(#"Now Showing");
return;
}
else if ((_namesButton.title = #"Hide")) {
_text1.hidden = TRUE;
_text2.hidden = TRUE;
_text3.hidden = TRUE;
_text4.hidden = TRUE;
_text5.hidden = TRUE;
_text6.hidden = TRUE;
_text7.hidden = TRUE;
_text8.hidden = TRUE;
_text9.hidden = TRUE;
_text10.hidden = TRUE;
_text11.hidden = TRUE;
_text12.hidden = TRUE;
self.namesButton.title = #"Names";
NSLog(#"Now Hidden");
}
}
That is because (self.namesButton.title = #"Names") assign a value to the title and does not check it.
If you want to compare values in a if use == but you can not use the == from strings object.
The == compares the pointer of the object and it's value, thus for NSString compare you should use ([self.namesButton.title isEqualToString:#"Names"]) to check the string is equal.
Dont use = , use isEqualToString instead like following:
[self.namesButton.title isEqualToString:#"Names"]
Use this :
- (IBAction)namesButton:(id)sender {
if ([self.namesButton.titleLabel.text isEqualToString: #"Names"]) {
[self.namesButton setTitle: #"Hide" forState:UIControlStateNormal];
_text1.hidden = FALSE;
_text2.hidden = FALSE;
_text3.hidden = FALSE;
_text4.hidden = FALSE;
_text5.hidden = FALSE;
_text6.hidden = FALSE;
_text7.hidden = FALSE;
_text8.hidden = FALSE;
_text9.hidden = FALSE;
_text10.hidden = FALSE;
_text11.hidden = FALSE;
_text12.hidden = FALSE;
NSLog(#"Now Showing");
return;
}
else if ([self.namesButton.titleLabel.text isEqualToString: #"Hide"]) {
[self.namesButton setTitle: #"Names" forState:UIControlStateNormal];
_text1.hidden = TRUE;
_text2.hidden = TRUE;
_text3.hidden = TRUE;
_text4.hidden = TRUE;
_text5.hidden = TRUE;
_text6.hidden = TRUE;
_text7.hidden = TRUE;
_text8.hidden = TRUE;
_text9.hidden = TRUE;
_text10.hidden = TRUE;
_text11.hidden = TRUE;
_text12.hidden = TRUE;
NSLog(#"Now Hidden");
}
}

Setting up Touch Events on Materials in Papervision

I am working with papervision and would like to setup a TouchEvent on each side of a Cube. How would i go about it ? Right now i am setting up the events on the movieclip which i pass to the MovieMaterial class. The MouseEvent is working fine but the TouchEvent doesn't seem to fire.
public function MiniCube(k:int, j:int, i:int)
{
var matList:Object = {all:new ColorMaterial(0xff0000,1,true)};
matList.back = createColorMC(0x000000,'back');
matList.front = createColorMC(0x000000,'front');
matList.top = createColorMC(0x000000,'top');
matList.bottom = createColorMC(0x000000,'bottom');
matList.right = createColorMC(0x000000,'right');
matList.left = createColorMC(0x000000,'left');
cube = new Cube(new MaterialsList(matList),10,10,10);
}
private function createColorMC(color:uint, name:String):MovieMaterial
{
var ClassReference:Class = getDefinitionByName(iconArr[Math.floor(Math.random() * iconArr.length)]) as Class;
var mc=new ClassReference();
mc.name = name;
//MOUSE EVENT WORKS
mc.addEventListener(MouseEvent.MOUSE_DOWN, onMovieMatClicked);
//TOUCH EVENT DOESNT
mc.addEventListener(TouchEvent.TOUCH_BEGIN, onMovieMatClicked);
var movieMat:MovieMaterial = new MovieMaterial(mc,true,true);
movieMat.interactive = true;
movieMat.smooth = true;
movieMat.animated = true;
return movieMat;
}
Did you enable multitouch on your application? The following line goes in the constructor of your main application class:
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
or
Multitouch.inputMode = MultitouchInputMode.GESTURE;

Enable Seamless mode using AxInterop.MSTSCLib

I have an application that use AxInterop.MSTSCLib activeX to create remote connection to another PC similar to the following application:
http://www.codeproject.com/Articles/43705/Remote-Desktop-using-C-NET
My question, is there an option that I can config to connect the PC in seamless mode?
I know this is over a year old but I am assuming this is what you want to do:
rdp.Server = "Server";
rdp.UserName = "Username";
rdp.Domain = "Domain";
IMsTscNonScriptable secured = (IMsTscNonScriptable)rdp.GetOcx();
secured.ClearTextPassword = User.Password;
rdp.AdvancedSettings8.ConnectionBarShowMinimizeButton = false;
rdp.AdvancedSettings8.ConnectionBarShowPinButton = false;
rdp.AdvancedSettings8.ConnectionBarShowRestoreButton = false;
rdp.AdvancedSettings8.EnableWindowsKey = 0;
rdp.AdvancedSettings8.RedirectClipboard = true;
rdp.AdvancedSettings8.RedirectDrives = true;
rdp.AdvancedSettings8.RedirectPrinters = true;
rdp.AdvancedSettings8.SmartSizing = true;
rdp.SecuredSettings3.StartProgram = "LaunchApp Path";
rdp.Connect();
In addition follow what #Hans Passant suggested above..

1151: A conflict exists with definition i in namespace internal

im new in action scripts and flash, i need some help with this code i couldnt find whats wrong with it, it gives this error:1151: A conflict exists with definition i in namespace internal.(var i:Number = 0;)
stop();
menu_item_group.menu_item._visible = false;
var spacing:Number = 5;
var total:Number = menu_label.length;
var distance_y:Number = menu_item_group.menu_item._height + spacing;
var i:Number = 0;
for( ; i < total; i++ )
{
menu_item_group.menu_item.duplicateMovieClip("menu_item"+i, i);
menu_item_group["menu_item"+i]._x = menu_item._x;
menu_item_group["menu_item"+i]._y = i * distance_y;
menu_item_group["menu_item"+i].over = true;
menu_item_group["menu_item"+i].item_text.text = menu_label[i];
menu_item_group["menu_item"+i].item_url = menu_url[i];
menu_item_group["menu_item"+i].onRollOver = function()
{
this.over = false;
}
menu_item_group["menu_item"+i].onRollOut = menu_item_group["menu_item"+i].onDragOut = function()
{
this.over = true;
}
menu_item_group["menu_item"+i].onRelease = function()
{
getURL(this.item_url);
}
menu_item_group["menu_item"+i].onEnterFrame = function()
{
if( this.over == true ) this.prevFrame();
else this.nextFrame();
}
}
thanks for your help!
Check your code. The variable i has been declared in the code already.

Resources