[
{
    blockid=ube;
    help=service_smtp_plugin_ube_ube_ube;
    custom=com.netscape.management.msgserv.StoreUbeControl;
    localvar={
	.headers="Entry";
	.headers.text="Path";
	.headers="Options";
	.ube.button.moveup="Move up";
	.ube.button.movedown="Move down";
	.ube.button.option="Options...";
	.parseheader.text="Parse message header";
    },
    layout=[ybox];
    content=[
	{
	    ctrl=label;
	    text="Unsolicited Bulk Email Configuration";
	    font=["","",16];
	    wrap=$g.label.size5;
	},
	{
	    ctrl=vstrut;
	},
	{
	    ctrl=separator;
	},
	{
	    ctrl=vstrut;
	},
	{
	    ctrl=pane;
	},
	{
	    ctrl=vstrut;
	},
	{
	    ctrl=table;
	    id=ubeTable;
	    label=adminlabel;
	    showedit=true;
	    buttonsat=east;
	    delimiter=" ";
	    columns=$.headers;
	    columns=[
		{
		    header="Active";
		    editor=boolean;
		    renderer=boolean;
		    width=60;
		},
		{
		    header="Filters";
		    width=300;
		}
	    ]
	   buttons=[
	     {
	       ctrl=button;
	       id=moveupbutton;
	       text=$.ube.button.moveup;
	       cmd=.table.moveUp;
	     },
	     {
	       ctrl=button;
	       id=movedownbutton;
	       text=$.ube.button.movedown;
	       cmd=.table.moveDown;
	     }
	   ]
	},
	{
	    ctrl=vstrut;
	},
	{
	    ctrl=togglepane;
	    id=parseheadertoggle;
	    text=$.parseheader.text;
	    aligny=0.5;
	}
    ]
},
{
    blockid=addDialog;
    help=service_smtp_plugin_ube_ube_addDialog;
    localvar={
	.title.edit="UBE Filter";
	.title.add="UBE Filter";
	.entry.text="Name (optional): ";
	.path.text="Path:";
	.option.text="Options:";
	.funcs.text="Functions:";
	.if.text="IF";
	.otherfield.text="Other Field (user defined)";
	.case.text="Case Sensitive";
	.envonly.text="Envelope only";
	.value.equal.text="=";
	.value.notequal.text="!=";
	.value.text="Value";
	.then.text="THEN";
	.choice.labels=[COPY,DROP,DROPRCPT,EXIT,HOLDCOPY,HOLDONLY,JUMP,REJECT,RUN];
	.argument.label="Argument";
        /* Have fun i18n this */
	.ifchoice.labels=[Also-Control,Alternate-Recipient,Apparently-To,Approved,Article-Names,Article-Updates,Auto-Forwarded,Autoforwarded,Bcc,Cc,
          Channel-To,Client,Comments,Content-Base,Content-Conversion,Content-Description,Content-Disposition,Content-ID,Content-Identifier,Content-Language,
          Content-Location,Content-MD5,Content-Return,Content-SGML-Entity,Content-Transfer-Encoding,Content-Type,Conversion,Conversion-With-Loss,
          DL-Expansion-History,DL-Expansion-History-Indication,Date,Delivery-Date,Delivery-Report,Description,Discarded-X400-IPMS-Extensions,
          Discarded-X400-MTS-Extensions,Disclose-Recipients,Disposition,Distribution,Encoding,Errors-To,Expires,Expiry-Date,Extension,Fax,Fcc,Followup-To,
          For-Comment,For-Handling,Forwarded,From,Generate-Delivery-Report,History,ID,Identifier,Importance,In-Reply-To,Incomplete-Copy,Information-Types,
          Keywords,Language,Length,Lines,MD5,MIME-Version,Mail-From,Mail-System-Version,Mailer,Message-ID,Message-Type,Newsgroups,Newsreader,Obsoletes,
          Organization,Organization,Original-Encoded-Information-Types,Originating-Client,Path,Phone,Precedence,Prevent-NonDelivery-Report,Priority,Rcpt-To,
          Received,Recipient,References,Reply-By,Reply-To,Resent,Resent-Date,Resent-From,Resent-Message-ID,Resent-Reply-To,Resent-To,Resent-bcc,Resent-cc,
          Return,Return-Path,Return-Receipt-To,See-Also,Sender,Sensitivity,Status,Subject,Summary,Supersedes,Telefax,To,Transfer-Encoding,Type,User-From,
          Version,X-Mailer,X-Newsreader,X400-Content-Return,Xref];

    },
    layout=[gridbag];
    content=[
	{
	    ctrl=label;
	    id=entrylabel;
	    text=$.entry.text;
	    label=ifchoice;
	    constraint={
		gridx=0;
		gridy=0;
		anchor=east;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=text;
	    val=$label;
	    label=entrylabel;
	    focus=true;
	    constraint={
		gridx=1;
		gridy=0;
		gridwidth=3;
		weightx=9;
		fill=h;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=separator;
	    constraint={
		gridx=0;
		gridy=1;
		weightx=1;
		gridwidth=4;
		fill=h;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=label;
	    text=$.if.text;
	    constraint={
		gridx=0;
		gridy=2;
		anchor=east;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=choice;
	    editable=true;
	    id=ifchoice;
	    labels=$.ifchoice.labels;
	    items=$.ifchoice.labels;
	    val=$field;
	    constraint={
		gridx=1;
		gridy=2;
		gridwidth=3;
		anchor=west;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=pane;
	    constraint={
		gridx=1;
		gridy=3;
		anchor=east;
		insets=$g.insets.comp;
	    }
	    content=[
		{
		    ctrl=togglepane;
		    style=radio;
		    val=$radio1;
		    text=$.value.equal.text;
		    group=equality;
		},
		{
		    ctrl=togglepane;
		    style=radio;
		    val=$radio2;
		    text=$.value.notequal.text;
		    group=equality;
		}
	    ]
	},
	{
	    ctrl=label;
	    id=valuetextlabel;
	    text=$.value.text;
	    constraint={
		gridx=2;
		gridy=3;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=text;
	    label=valuetextlabel;
	    val=$thevalue;
	    constraint={
		gridx=3;
		gridy=3;
		weightx=1;
		fill=h;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=pane;
	    constraint={
		gridx=1;
		gridy=4;
		gridwidth=3;
		anchor=west;
		insets=$g.insets.comp;
	    }
	    content=[
		{
		    ctrl=togglepane;
		    val=$case;
		    id=casesensitive;
		    text=$.case.text;
		},
		{
		    ctrl=togglepane;
		    val=$envonly;
		    text=$.envonly.text;
		    id=envonly;
		}
	    ]
	},
	{
	    ctrl=label;
	    id=thenlabel;
	    text=$.then.text;
	    constraint={
		gridx=0;
		gridy=6;
		anchor=east;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=choice;
	    id=actionchoiceid;
	    labels=$.choice.labels;
	    items=$.choice.labels;
	    val=$action;
	    constraint={
		gridx=1;
		gridy=6;
		gridwidth=3;
		anchor=west;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=label;
	    id=argumentlabel;
	    text=$.argument.label;
	    constraint={
		gridx=2;
		gridy=7;
		anchor=east;
		insets=$g.insets.comp;
	    }
	},
	{
	    ctrl=text;
	    label=argumentlabel;
	    val=$argument;
	    constraint={
		gridx=3;
		gridy=7;
		/*gridwidth=2;*/
		weightx=1;
		fill=h;
		insets=$g.insets.comp;
	    }
	}
    ]
},
{
    blockid=optionDialog;
    help=service_smtp_plugin_ube_ube_optionDialog;
    localvar={
	.holdtplbody.text="Path to action template file:";
    .holdtplerrmsg.text="Path to error message file:";
	.title.optionDialog="Edit UBE options";
    },
    content=[
	{
	    ctrl=pane;
	    content=[
		{
		    ctrl=label;
		    aligny=0.5;
		    id=tplbody;
		    text=$.holdtplbody.text;
		    wrap=$g.label.size1;
		},
		{
		    ctrl=rigid;
		},
		{
		    ctrl=text;
		    aligny=0.5;
		    val=$HoldTplBody;
		    label=tplbody;
		    focus = true;
		}
	    ]
	},
	{
	    ctrl=vstrut;
	},
	{
	    ctrl=pane;
	    content=[
		{
		    ctrl=label;
		    aligny=0.5;
		    id=tplerr;
		    text=$.holdtplerrmsg.text;
		    wrap=$g.label.size1;
		},
		{
		    ctrl=rigid;
		},
		{
		    ctrl=text;
		    aligny=0.5;
		    val=$HoldTplErrmsg;
		    label=tplerr;
		}
	    ]
	},
	{
	    ctrl=vstrut;
	},
	{
	    ctrl=label;
	    size=$g.label.size4;
	}
    ]
}
]
