Issues with thousand separator

Hi all. can anyone help me. In my PDF form i create a numeric field. I set numeric format with these parameters:
Decimal places = 0
Separator style = 1,234.56
Currency symbol none.
but for all that feild displayed value as "1234.00". to remove zeros i add javascript for this field: this.getField('1').value=0+this.getField('1').value; Now it show like "1234". but I'm still looking for solution to show thousand separator. Please help

It doesn't help. I forgot to say 1 detail. field works fine when I change value manualy in Acrobat, but I use web service to fill data in pdf (when it done the file becomes read-only). and when pdf is filled I don't see separator

Similar Messages

  • Amount field with thousand separator

    Hi friends,
    i want to display amount field (5794.00)with thousand separator as (5,794.00).
    i defined amount field as character data type for my requirement.
    user want to see this value with thousan separator.
    Please help me hoe can i get thousand separator.
    Thanks
    ramesh

    Hi Ramesh,
    There is two functions for converting display currentcy
    CURRENCY_AMOUNT_SAP_TO_DISPLAY
    Convert currency value from value stored in SAP to displayed currency
    CURRENCY_AMOUNT_DISPLAY_TO_SAP
    Convert currency value from displayed currency value to value stored in SAP
    Try below,
    DATA declaration
    WMTO_S-AMOUNT =  Type DEC :: length 15 :: Deciamls 4
    parameter: p_discur like TCURC-WAERS,     "Display currency
               p_intval like WMTO_S-AMOUNT.   "Internal Amount
    data:      gd_disval  like WMTO_S-AMOUNT. "Display Amount
    *Start-of-selection.
    START-OF-SELECTION.
    CALL FUNCTION 'CURRENCY_AMOUNT_SAP_TO_DISPLAY'
         EXPORTING
              currency        = p_discur
              amount_internal = p_intval
        IMPORTING
             AMOUNT_DISPLAY   = gd_disval
        EXCEPTIONS
             INTERNAL_ERROR   = 1
             OTHERS           = 2.
    IF sy-subrc EQ 0.
    You are now able to manipulate the returned value.
                            I.e. Convert it to GBP
    Without using this function module you would only be manipulating the
    SAP stored value, which is often missing a number of zeroes.
          I.e. 28000 JPY is stored within SAP as 280.
    ENDIF.
    *End-of-selection.
    END-OF-SELECTION.
    write:/(30)  'Value stored in SAP:', p_intval,
          /(30)  'Displayed currency:',  p_discur,
          /(30)  'Ammount is displayed Currency:', gd_disval.
    Hope it help
    Wiparat

  • ODI-HFM issue with decimal separator

    Hi all,
    We are extracting data from an HFM application A and loading into an HFM application B.
    Example:
    Data extracted from applicaiton A = 21.742.139,55
    Data loaded to application B (verified from Explore Data and Smart View) = 2.174.213.955,00
    Is data loading with ODI-HFM taking the regional settings?
    Any suggestions?
    If we extract data with HFM Client (logged on with the same user configured in HFM Data server) from application A and load it into application B, data is correct in application B.
    Current configuration is:
    - User preferences for HFM Application A
         * Decimal separator = ","
         * Thousands separator = "."
    - User preferences for HFM Application B
         * Decimal separator = ","
         * Thousands separator = "."
    - Regional settings of the server where the agent is running (English US)
         * Decimal separator = "."
         * Thousands separator = ","
    This setting is the same for all HFM application servers
    - ODI Datastore HFMDatastore
         * Decimal separator set to "," (this setting was changed to see if solved the issue)
    - ODI Datastore for staging table
         * Decimal separator set to "," (this setting was changed to see if solved the issue)
    - Language Settings for DB (American English)
    Thanks in advance!

    Hi Pls Use This
        For Decimal Separator other than . we need to Code to Convert , See This Code Below and Do the Code
    Private Function ReturnQty(ByVal Qty As String) As String
    Dim strQty As String
    Dim strSQL As String
    Dim strSeprtr As String
    Dim objRS As SAPbobsCOM.Recordset
    strSQL = "SELECT ThousSep FROM OADM"
    Set objRS = oSBC.oDICompany.GetBusinessObject(BoRecordset)
    objRS.DoQuery (strSQL)
    If Not objRS.EOF Then
            strSeprtr = objRS.Fields.Item("ThousSep").Value
    End If
    If strSeprtr = "," Then
    ReturnQty = Qty
    ElseIf strSeprtr = "'" And Len(Qty) <= 6 Then
    Qty = Replace(Qty, ",", ".")
    'Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    Qty = Qty
    ElseIf strSeprtr = "'" Then
    Qty = Replace(Qty, "'", "")
    'Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    Qty = Qty
    ElseIf strSeprtr = "." And Len(Qty) <= 6 Then
    Qty = Replace(Qty, ".", ",")
    Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    ElseIf strSeprtr = "." Then
    Qty = Replace(Qty, ".", "")
    Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    End If
    End Function
    Mohamed Zubair

  • Issue with field separator in GUI_UPLOAD

    Hello Gurus
    I am facing issue with gui_upload. I have a text file in which the fields are eparated by single Pipe  i.e |. Now when I try to read the data from file in internal table even with using field separator it does not insert data in proper fields.
    DATA: BEGIN OF IT_TAB OCCURS 0,
          OBJECT_ID type string,
          VERSION_SERIES_ID TYPE string,
          VERSION_NUMBER TYPE string,
          REVISION TYPE string,
          DOC_NUMBER TYPE string,
          DOCTITLE TYPE string,
          FILESIZE TYPE string,
          MIME_TYPE TYPE string,
          PLANTUNIT TYPE string,
          END OF IT_TAB.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = w_mpath
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = '|'
      HEADER_LENGTH                 = 0
       READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = it_tab[]
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    I want the data to get appended in internal table based on | separator.
    Please help.
    Regards,
    Rajesh.

    Hi,
    I believe the field separator parameter will work for Excel files..You have to get the internal table in a string format..and then use split statement..
    check this example..
    DATA: BEGIN OF it_tab OCCURS 0,
           object_id TYPE string,
           version_series_id TYPE string,
           version_number TYPE string,
           revision TYPE string,
           doc_number TYPE string,
           doctitle TYPE string,
           filesize TYPE string,
           mime_type TYPE string,
           plantunit TYPE string,
         END OF it_tab.
    DATA: t_tab   TYPE TABLE OF string,
          v_string TYPE string.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                = 'C:\TEST.TXT'
    *    has_field_separator     = '|'          "Actually not required.
      TABLES
        data_tab                = t_tab
      EXCEPTIONS
        file_open_error         = 1
        file_read_error         = 2
        no_batch                = 3
        gui_refuse_filetransfer = 4
        invalid_type            = 5
        no_authority            = 6
        unknown_error           = 7
        bad_data_format         = 8
        header_not_allowed      = 9
        separator_not_allowed   = 10
        header_too_long         = 11
        unknown_dp_error        = 12
        access_denied           = 13
        dp_out_of_memory        = 14
        disk_full               = 15
        dp_timeout              = 16
        OTHERS                  = 17.
    IF sy-subrc <> 0.
    ENDIF.
    LOOP AT t_tab INTO v_string.
      SPLIT v_string AT ','
            INTO
            it_tab-object_id
            it_tab-version_series_id
            it_tab-version_number
            it_tab-revision
            it_tab-doc_number
            it_tab-doctitle
            it_tab-filesize
            it_tab-mime_type
            it_tab-plantunit.
      APPEND it_tab.
      CLEAR: it_tab.
    ENDLOOP.
    Thanks
    Naren
    Edited by: Narendran Muthukumaran on Oct 15, 2008 4:58 PM

  • Problem with thousands separator

    Hi,
    I'am working on dunning letters print and i've a problem with the thousands separator.
    Data is stored in a table field typed CURR. The intern format is 119600,60
    When i print directly this value on my SmartForm, there are many blanks before the number, corresponding to the size of the variable (15 caracters). I don't know hax to remove this blanks.
    I tried to change the type of the variable by moving the value into a CHAR variable. The result is better : the blanks have been cleared out but unfortunatelly, the thousands seperators too.
    Does someone know how to put the value of a variable typed CURR in a string or a char variable with thousands separators ?
    To sum up my query :
    The CURR variable contains 119600,60
    I want a String or a char variable containing 119 600,00
    Thanks a lot
    regards
    Edited by: Larrière Dorian on Jun 19, 2008 11:53 AM

    Hi...
    write : wf_cu LEFT-JUSTIFIED.
    This state ment removes the blanks at the beginning....
    The wf_cu may be of curr type
    Edited by: Rudra Prasanna Mohapatra on Jun 19, 2008 12:08 PM

  • To show the data from BI query in bar graph with thousand separator

    Hello Experts,
       I am using Visual composer 7.0.I have designed an application where i have user BI query to show data as a bar graph.I have roundoff the data to 2 places of decimal an i have to show the data with thosand separator as well.
    i am using the formula
    NVAL(NSTR(@Actual_value,"C.2"))
    Where @Actual_value is a value which comes from BI queryand is to be displayed as a bar graph.
    Points will be awarded for reply.
    Thanks ,
    Rakesh

    Hi Rakesh,
    I have found some links which may help you.
    http://help.sap.com/saphelp_nw70/helpdata/en/38/2d9b732beb4c68bba2962602a7d6bd/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/26/64fb472a144a0dbaf88f5ec75d9270/content.htm
    http://oregonstate.edu/dept/computing/warehouse/PDF/8-reports.pdf

  • Big issue with decimal separator

    regional settings of machine where client & server reside are for european country (decimal separator is ",")
    sap b1 decimal separator is set also for ",".
    exception occurs when I set in code, for a edittexts' datasource of type SUM a decimal value using ",". If I set the value using "." it works. how the $%#$% is this possible?

    Hi Pls Use This
        For Decimal Separator other than . we need to Code to Convert , See This Code Below and Do the Code
    Private Function ReturnQty(ByVal Qty As String) As String
    Dim strQty As String
    Dim strSQL As String
    Dim strSeprtr As String
    Dim objRS As SAPbobsCOM.Recordset
    strSQL = "SELECT ThousSep FROM OADM"
    Set objRS = oSBC.oDICompany.GetBusinessObject(BoRecordset)
    objRS.DoQuery (strSQL)
    If Not objRS.EOF Then
            strSeprtr = objRS.Fields.Item("ThousSep").Value
    End If
    If strSeprtr = "," Then
    ReturnQty = Qty
    ElseIf strSeprtr = "'" And Len(Qty) <= 6 Then
    Qty = Replace(Qty, ",", ".")
    'Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    Qty = Qty
    ElseIf strSeprtr = "'" Then
    Qty = Replace(Qty, "'", "")
    'Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    Qty = Qty
    ElseIf strSeprtr = "." And Len(Qty) <= 6 Then
    Qty = Replace(Qty, ".", ",")
    Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    ElseIf strSeprtr = "." Then
    Qty = Replace(Qty, ".", "")
    Qty = Replace(Qty, ",", ".")
    ReturnQty = Qty
    End If
    End Function
    Mohamed Zubair

  • How to print thousands separator on a report.

    Hi everybody,
    I am trying to print a report with thousands separator but I'm not able to do it.
    I tried using the currency addition to the write statement but doesn't work.
    Any help will be appreciated.
    Orlando.

    Hi orlando,
    1. It comes by default.
       - thousand separators.
    2. just try this.
    report abc.
    data : m type p decimals 2.
    m = '1500.66'.
    write :/ m.
    m = '765123.66'.
    write :/ m.
    m = '9765123.66'.
    write :/ m.
    regards,
    amit m.

  • Problem with thousands and decimal  separator (Excel 2000)

    Hi, i have a problem with the download option to excel 2000.
    When downloading numbers over 1000 the thousands separators change in decimal separators.
    My config is:
    Locale (location): Español - España
    User Interface Language: Español
    For example, if I have a value as 1800:
    1) in OBIEE show "1.800" (ok)
    2) in Excel 2000 show "1,8" (bad)
    If i choose Locale (location): English - United Stated and
    User interface language Español.
    1) in OBIEE show "1,800" (bad)
    2) in Excel 2000 show "1.800" (ok)
    Can someone help me solve my problem?
    I need to show the same result in OBIEE and Excel, that is, "1.800" with "." not with ",".
    Thanks

    Hi,
    The thousands separator change in the backend dind't work. (+ it only works for text input fields, not for text fields)
    Anyhow, this is how we created a workaround :
    Suppose we did this : <b>NSTR(@CREDITLIMIT,"C.2")</b>
    This resulted in the field being displayed as <i>67,234.56</i>
    The 'dirty' way to convert this to an european format is :
    <b>REPLACE(REPLACE(REPLACE(NSTR(@CREDITLIMIT,"C.2"),",",";"),".",","),";",".")</b>
    Output is <i>67.234,56</i>
    (we just replaced the '.' by ',' and vice versa)
    I still feel quite uncomfortable with this solution, but this is the only way we got it to work.
    I really hope a next patch/servivepack provided a more elegant solution for this problem... (hint hint)

  • Issues with WiFi connection to Deskjet 3545

    Hi,
    I have number of issues with WiFi connection to my new Deskjet 3545 AIO:
    1. Printer is not able to get IP address automatically from home WiFi router (all other devices get IP with no problem). Using WPS allow printer to register in network but after switching off, WPS setting is not stored, so I have to do it again. This I was able to solve with manual entering of IP address, netwrok mask, DNS and gateway address.
    2. Official HP software installed from HP site was able to find printer for 3dattempt, and it started to work. But after a while, "HP utility" program loose connection to printer,  so I can not see any parameters, and I get "can not find printerä message when start to to print. After a some time (minutes to hours), whithout any action from my side, connection to printer seems to be restored, so I can see printer parameters in "HP utility" and printing is started.
    3.  Official HP software installed from HP site on PC (Windows 7) is not able to find printer on WiFi at all, works only with USB.
    All this is disaponinting and unexpected, as my office HP LaserJet Pro 400 Color works perfect.

    Hi @DmiBro,
    Welcome to the HP Forums!
    I see that you are having some wireless issues with your HP Deskjet 3545 to your Mac OS X 10.10 and Windows 7 computers. I am sorry to hear this, but I am happy to help!
    I would recommend the following guides:
    HP Single-Function and Multifunction Printers - 'Printer is offline' Message Displays on the Compute.... (The solutions for OS X v10.8 Mountain Lion and OS X v10.9 Mavericks will work on Mac OS X 10.19 Yosemite.)
    HP Single-Function and Multifunction Printers - 'Printer is offline' Message Displays on the Compute....
    HP ENVY 4500 and HP Deskjet Ink Advantage 3540 e-All-in-One Printer Series - Printer Does Not Mainta....
    Tips for troubleshooting wireless connection issues
    The following tips can help you troubleshoot and avoid wireless connectivity issues. You can try these tips separately or in combination to get a successful wireless signal.
    Move the printer and the computer closer to the router, but no closer than 6 ft (1.8 m). Wireless signals can be weaker at greater distances between the printer and the router.
    If you are experiencing an intermittent wireless connection, try restarting your router. Consult your router manufacturer, Internet service provider, or network administrator for instructions on how to restart the router.
    Remove any metal objects between the printer, the computer, and the router. Objects such as refrigerators, microwaves, or metal bookcases can interfere with wireless transmission.
    Move any device that emits radio signals, such as microwaves and cordless telephones, farther away from the printer. Such devices can interfere with wireless signals.
    I would also recommend this website, HP Wireless Printing Center - Troubleshooting Issues.
    Hope this information is helpful, and have a nice day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Interactive Report Download CSV file Issue (output includes separator BR)

    Hi,
    I have a Interactive Report and displaying the column values (multiple values in same ROW) as mentioned below.
    SQL Query
      select deptno,
           function1(empno) empno
      from emp
    IR Output
    Dept       Employee No
    10         AAA,BBB,CCC, ...    // -  Row 1
    20         XXX,YYY,ZZZ, ...    // -  Row 2 Now I want to display each employee in a new Line, so modified the SQL Query
    Modified SQL Query
      select deptno,
           REPLACE(function1(empno),',','<br>') empno
      from emp
    New IR Output
    Dept       Employee No
    10         AAA
               BBB
               CCC
               ...    // -  Row 1
    20         XXX
               YYY
               ZZZ
                ...    // -  Row 2 SO, Interactive Report Out put looks fine and that's the way we want.
    But the problem is when I download the Report in CSV or in PDF using the Action Menu -> Download..
    I am getting break line B R in the output, and also I have two different output in CSV for two different column. [Logic is same for both the columns.]
    CSV output1
    Employee No
      AAA<br>BBB<br>CCC
      XXX<br>YYY<br>ZZZI have other columns also with multiple values...for that column, I am getting the following CSV output
    CSV output2
    City List
      1111<br>
      2222<br>
      3333<br>So, in CSV for one column, I am getting all the values in same line with the seperator B R (Output1)
    for other column, I am getting values in new line with the separator B R. (Output2)
    Is there a way to FIX this CSV or PDF output for Interactive Report.
    I DON'T WANT THE SEPARATOR BR in CSV and also the values should always be in New Line.
    I want to have the following Output in CSV
    Employee No
      AAA
      BBB
      CCCThanks,
    Deepak
    Edited by: Deepak_J on Feb 24, 2010 11:45 AM
    Edited by: Deepak_J on Feb 24, 2010 11:46 AM
    Edited by: Deepak_J on Feb 24, 2010 11:48 AM

    Thanks.. Jari.. for the quick response.
    I updated my SQL query with Chr(10) and added the code in Page HTML header.
    Now the CSV & PDF output are fine..getting each individual value in seperate line (no BR tag)
    BUT in the Interactive Report Output, I am now getting first 2 values in 1 line, then next value in next line, and so on..
    IR Output
    Employee
      AAA BBB
      CCCCCCC
      DDDDDI have few more issues with CSV & PDF output
    1. In PDF is there a way to increase the column width, as for some of the columns, the values are getting truncated.
    2. For some of the columns in IR Report, I have user BR tag in Column Heading and this also come in CSV output (column heading with BR tag), is there a way to fix this. In PDF Column headings are fine (no BR tag)
    and by the way..what exactly this does.
    <style type="text/css">
    .apexir_WORKSHEET_DATA td{white-space:pre;word-wrap: break-word}
    </style>Thanks,
    Deepak
    Edited by: Deepak_J on Feb 24, 2010 12:20 PM
    Edited by: Deepak_J on Feb 24, 2010 12:21 PM

  • Issue with setting float point in Textfield

    hi
    i have an issue with float input in a textfield.
    what i want to do is.
    when the user start typing numerics it should accept from right hand side and keep appending value from right hand side.
    for ex
    if i want to enter 123.45
    user starts entering
    1 then it should display as 0.01
    2 then it should display as 0.12
    3 then it should display as 1.23
    4 then it should display as 12.34
    5 then it should display as 123.45
    to achive this i have written the code as below
    public class Test{
         public static void main(String[] a){
         try {
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    } catch (Exception evt) {}
    DecimalFormat format = new DecimalFormat();
    format.setGroupingUsed(true);
    format.setGroupingSize(3);
    format.setParseIntegerOnly(false);
    JFrame f = new JFrame("Numeric Text Field Example");
    final DecimalFormateGen tf = new DecimalFormateGen(10, format);
    // tf.setValue((double) 123456.789);
    tf.setHorizontalAlignment(SwingConstants.RIGHT);
    JLabel lbl = new JLabel("Type a number: ");
    f.getContentPane().add(tf, "East");
    f.getContentPane().add(lbl, "West");
    tf.addKeyListener(new KeyAdapter(){
         public void keyReleased(KeyEvent ke){
              char ch = ke.getKeyChar();
              char key;
              int finalres =0;
              String str,str1 = null,str2 =null,str3 = null,str4= null;
              if(ke.getKeyChar() == KeyEvent.VK_0 || ke.getKeyChar() == KeyEvent.VK_0 ||
                        ke.getKeyChar() == KeyEvent.VK_0 || ke.getKeyChar() == KeyEvent.VK_1 || ke.getKeyChar() == KeyEvent.VK_2 ||
                             ke.getKeyChar() == KeyEvent.VK_3 || ke.getKeyChar() == KeyEvent.VK_4 || ke.getKeyChar() == KeyEvent.VK_5 ||
                             ke.getKeyChar() == KeyEvent.VK_6 || ke.getKeyChar() == KeyEvent.VK_7 || ke.getKeyChar() == KeyEvent.VK_8 ||
                             ke.getKeyChar() == KeyEvent.VK_9 ){
                   double value1 = Double.parseDouble(tf.getText());
                   int position = tf.getCaretPosition();
                   if(tf.getText().length() == 1){
                        if(tf.getText() != null || tf.getText() != ""){
                        value1 = value1 / 100;
                        tf.setText(String.valueOf(value1));
                   /*else if(tf.getText().length() == 3){
                        str = tf.getText();
                        for(int i=0;i<str.length();i++){
                             if(str.charAt(i) == '.'){
                                  str1 = str.substring(0,i);
                                  str2 = str.substring(i+1,str.length()-1);
                                  break;
                        key = ke.getKeyChar();
                        finalres = calculate.calculate1(str2,key);
                        str3 = merge.merge1(str1,finalres);
                        tf.setText(str3);
                        System.out.println(key);
                        System.out.println(str1);
                        System.out.println(str2);
                   else{
                        value1 = Float.parseFloat(tf.getText());
                        value1 = value1*10;
                        tf.setText(String.valueOf(value1));
    tf.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    try {
    tf.normalize();
    Long l = tf.getLongValue();
    System.out.println("Value is (Long)" + l);
    } catch (ParseException e1) {
    try {
    Double d = tf.getDoubleValue();
    System.out.println("Value is (Double)" + d);
    } catch (ParseException e2) {
    System.out.println(e2);
    f.pack();
    f.setVisible(true);
    import javax.swing.JTextField;
    * Created on May 25, 2005
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    * @author jagjeevanreddyg
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.text.DecimalFormat;
    import java.text.ParseException;
    import java.text.ParsePosition;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.UIManager;
    import javax.swing.text.AbstractDocument;
    import javax.swing.text.AttributeSet;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.Document;
    import javax.swing.text.PlainDocument;
    import javax.swing.text.AbstractDocument.Content;
    public class DecimalFormateGen extends JTextField implements
    NumericPlainDocument.InsertErrorListener {
         public DecimalFormateGen() {
         this(null, 0, null);
         public DecimalFormateGen(String text, int columns, DecimalFormat format) {
         super(null, text, columns);
         NumericPlainDocument numericDoc = (NumericPlainDocument) getDocument();
         if (format != null) {
         numericDoc.setFormat(format);
         numericDoc.addInsertErrorListener(this);
         public DecimalFormateGen(int columns, DecimalFormat format) {
         this(null, columns, format);
         public DecimalFormateGen(String text) {
         this(text, 0, null);
         public DecimalFormateGen(String text, int columns) {
         this(text, columns, null);
         public void setFormat(DecimalFormat format) {
         ((NumericPlainDocument) getDocument()).setFormat(format);
         public DecimalFormat getFormat() {
         return ((NumericPlainDocument) getDocument()).getFormat();
         public void formatChanged() {
         // Notify change of format attributes.
         setFormat(getFormat());
         // Methods to get the field value
         public Long getLongValue() throws ParseException {
         return ((NumericPlainDocument) getDocument()).getLongValue();
         public Double getDoubleValue() throws ParseException {
         return ((NumericPlainDocument) getDocument()).getDoubleValue();
         public Number getNumberValue() throws ParseException {
         return ((NumericPlainDocument) getDocument()).getNumberValue();
         // Methods to install numeric values
         public void setValue(Number number) {
         setText(getFormat().format(number));
         public void setValue(long l) {
         setText(getFormat().format(l));
         public void setValue(double d) {
         setText(getFormat().format(d));
         public void normalize() throws ParseException {
         // format the value according to the format string
         setText(getFormat().format(getNumberValue()));
         // Override to handle insertion error
         public void insertFailed(NumericPlainDocument doc, int offset, String str,
         AttributeSet a) {
         // By default, just beep
         Toolkit.getDefaultToolkit().beep();
         // Method to create default model
         protected Document createDefaultModel() {
         return new NumericPlainDocument();
         // Test code
         public static void main(String[] args) {
         try {
         UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
         } catch (Exception evt) {}
         DecimalFormat format = new DecimalFormat("#,###.###");
         format.setGroupingUsed(true);
         format.setGroupingSize(3);
         format.setParseIntegerOnly(false);
         JFrame f = new JFrame("Numeric Text Field Example");
         final DecimalFormateGen tf = new DecimalFormateGen(10, format);
         tf.setValue((double) 123456.789);
         JLabel lbl = new JLabel("Type a number: ");
         f.getContentPane().add(tf, "East");
         f.getContentPane().add(lbl, "West");
         tf.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
         try {
         tf.normalize();
         Long l = tf.getLongValue();
         System.out.println("Value is (Long)" + l);
         } catch (ParseException e1) {
         try {
         Double d = tf.getDoubleValue();
         System.out.println("Value is (Double)" + d);
         } catch (ParseException e2) {
         System.out.println(e2);
         f.pack();
         f.setVisible(true);
         class NumericPlainDocument extends PlainDocument {
         public NumericPlainDocument() {
         setFormat(null);
         public NumericPlainDocument(DecimalFormat format) {
         setFormat(format);
         public NumericPlainDocument(AbstractDocument.Content content,
         DecimalFormat format) {
         super(content);
         setFormat(format);
         try {
         format
         .parseObject(content.getString(0, content.length()), parsePos);
         } catch (Exception e) {
         throw new IllegalArgumentException(
         "Initial content not a valid number");
         if (parsePos.getIndex() != content.length() - 1) {
         throw new IllegalArgumentException(
         "Initial content not a valid number");
         public void setFormat(DecimalFormat fmt) {
         this.format = fmt != null ? fmt : (DecimalFormat) defaultFormat.clone();
         decimalSeparator = format.getDecimalFormatSymbols()
         .getDecimalSeparator();
         groupingSeparator = format.getDecimalFormatSymbols()
         .getGroupingSeparator();
         positivePrefix = format.getPositivePrefix();
         positivePrefixLen = positivePrefix.length();
         negativePrefix = format.getNegativePrefix();
         negativePrefixLen = negativePrefix.length();
         positiveSuffix = format.getPositiveSuffix();
         positiveSuffixLen = positiveSuffix.length();
         negativeSuffix = format.getNegativeSuffix();
         negativeSuffixLen = negativeSuffix.length();
         public DecimalFormat getFormat() {
         return format;
         public Number getNumberValue() throws ParseException {
         try {
         String content = getText(0, getLength());
         parsePos.setIndex(0);
         Number result = format.parse(content, parsePos);
         if (parsePos.getIndex() != getLength()) {
         throw new ParseException("Not a valid number: " + content, 0);
         return result;
         } catch (BadLocationException e) {
         throw new ParseException("Not a valid number", 0);
         public Long getLongValue() throws ParseException {
         Number result = getNumberValue();
         if ((result instanceof Long) == false) {
         throw new ParseException("Not a valid long", 0);
         return (Long) result;
         public Double getDoubleValue() throws ParseException {
         Number result = getNumberValue();
         if ((result instanceof Long) == false
         && (result instanceof Double) == false) {
         throw new ParseException("Not a valid double", 0);
         if (result instanceof Long) {
         result = new Double(result.doubleValue());
         return (Double) result;
         public void insertString(int offset, String str, AttributeSet a)
         throws BadLocationException {
         if (str == null || str.length() == 0) {
         return;
         Content content = getContent();
         int length = content.length();
         int originalLength = length;
         parsePos.setIndex(0);
         // Create the result of inserting the new data,
         // but ignore the trailing newline
         String targetString = content.getString(0, offset) + str
         + content.getString(offset, length - offset - 1);
         // Parse the input string and check for errors
         do {
         boolean gotPositive = targetString.startsWith(positivePrefix);
         boolean gotNegative = targetString.startsWith(negativePrefix);
         length = targetString.length();
         // If we have a valid prefix, the parse fails if the
         // suffix is not present and the error is reported
         // at index 0. So, we need to add the appropriate
         // suffix if it is not present at this point.
         if (gotPositive == true || gotNegative == true) {
         String suffix;
         int suffixLength;
         int prefixLength;
         if (gotPositive == true && gotNegative == true) {
         // This happens if one is the leading part of
         // the other - e.g. if one is "(" and the other "(("
         if (positivePrefixLen > negativePrefixLen) {
         gotNegative = false;
         } else {
         gotPositive = false;
         if (gotPositive == true) {
         suffix = positiveSuffix;
         suffixLength = positiveSuffixLen;
         prefixLength = positivePrefixLen;
         } else {
         // Must have the negative prefix
         suffix = negativeSuffix;
         suffixLength = negativeSuffixLen;
         prefixLength = negativePrefixLen;
         // If the string consists of the prefix alone,
         // do nothing, or the result won't parse.
         if (length == prefixLength) {
         break;
         // We can't just add the suffix, because part of it
         // may already be there. For example, suppose the
         // negative prefix is "(" and the negative suffix is
         // "$)". If the user has typed "(345$", then it is not
         // correct to add "$)". Instead, only the missing part
         // should be added, in this case ")".
         if (targetString.endsWith(suffix) == false) {
         int i;
         for (i = suffixLength - 1; i > 0; i--) {
         if (targetString
         .regionMatches(length - i, suffix, 0, i)) {
         targetString += suffix.substring(i);
         break;
         if (i == 0) {
         // None of the suffix was present
         targetString += suffix;
         length = targetString.length();
         format.parse(targetString, parsePos);
         int endIndex = parsePos.getIndex();
         if (endIndex == length) {
         break; // Number is acceptable
         // Parse ended early
         // Since incomplete numbers don't always parse, try
         // to work out what went wrong.
         // First check for an incomplete positive prefix
         if (positivePrefixLen > 0 && endIndex < positivePrefixLen
         && length <= positivePrefixLen
         && targetString.regionMatches(0, positivePrefix, 0, length)) {
         break; // Accept for now
         // Next check for an incomplete negative prefix
         if (negativePrefixLen > 0 && endIndex < negativePrefixLen
         && length <= negativePrefixLen
         && targetString.regionMatches(0, negativePrefix, 0, length)) {
         break; // Accept for now
         // Allow a number that ends with the group
         // or decimal separator, if these are in use
         char lastChar = targetString.charAt(originalLength - 1);
         int decimalIndex = targetString.indexOf(decimalSeparator);
         if (format.isGroupingUsed() && lastChar == groupingSeparator
         && decimalIndex == -1) {
         // Allow a "," but only in integer part
         break;
         if (format.isParseIntegerOnly() == false
         && lastChar == decimalSeparator
         && decimalIndex == originalLength - 1) {
         // Allow a ".", but only one
         break;
         // No more corrections to make: must be an error
         if (errorListener != null) {
         errorListener.insertFailed(this, offset, str, a);
         return;
         } while (true == false);
         // Finally, add to the model
         super.insertString(offset, str, a);
         public void addInsertErrorListener(InsertErrorListener l) {
         if (errorListener == null) {
         errorListener = l;
         return;
         throw new IllegalArgumentException(
         "InsertErrorListener already registered");
         public void removeInsertErrorListener(InsertErrorListener l) {
         if (errorListener == l) {
         errorListener = null;
         public interface InsertErrorListener {
         public abstract void insertFailed(NumericPlainDocument doc, int offset,
         String str, AttributeSet a);
         protected InsertErrorListener errorListener;
         protected DecimalFormat format;
         protected char decimalSeparator;
         protected char groupingSeparator;
         protected String positivePrefix;
         protected String negativePrefix;
         protected int positivePrefixLen;
         protected int negativePrefixLen;
         protected String positiveSuffix;
         protected String negativeSuffix;
         protected int positiveSuffixLen;
         protected int negativeSuffixLen;
         protected ParsePosition parsePos = new ParsePosition(0);
         protected static DecimalFormat defaultFormat = new DecimalFormat();
    this is not working as desired pls help me.
    can we use this code and get the desired result or is there any other way to do this.
    it is very urgent for me pls help immediately
    thanks in advance

    Hi camickr
    i learned how to format the code now, and u also responded for my testarea problem , iam very much thankful to u, and now i repeat the same problem what i have with a text field.
    actually i have window with a textfield on it and while end user starts entering data in it , it should be have as follows
    when the user start typing numerics it should accept from right hand side and keep appending value from right hand side.
    first the default value should be as 0.00 and as the user starts entering
    then it is as follows
    for ex
    if i want to enter 123.45
    user starts entering
    1 then it should display as 0.01
    2 then it should display as 0.12
    3 then it should display as 1.23
    4 then it should display as 12.34
    5 then it should display as 123.45
    i hope u will give me quick reply because this is very hard time for me.

  • Graphics issues with MacBook Pro 15-inch Late 2011 model

    I have a MB Pro 15-inch late 2011 (2.4GHz Core i7) and recently I started to get random screen glitches while working on photoshop and illustrator and then eventually the screen went totally blank and so I paid to have the graphics chip replaced (as I was out of warranty).
    After 2 weeks, the same glitches have started again so I did some internet research and discovered that that there are thousands of other people around the world who had similar issues in this particular model range that uses the AMD Graphics chipset (Radeon HD 6770M) combined with the Intel HD Graphics 3000 on the same motherboard.
    Does anyone know if Apple has announced a recall / replacement programme for this model as it appears to be a widespread issue ?
    Thanks
    Rohit

    There is an online campaign at change.org which has crossed 10,000 signatories (or is about to) that should prove that there is an issue.
    From my analysis, the problem is the AMC Radeon GPU that is the problem - there is some compatibility issue with the logic board. I just paid to get the problem solved, but it has come back again in less than a a week. I installed gfcCardStatus to control which graphics chips are being used and found that when the Intel HD chipset is used, there is no issue, but when it switches to the AMD chipset, the problem returns.
    There is certainly an issue and it's widespread and I am sure that this will come back to bite apple in the ***...
    I think their issue is probably that the fault lies in AMD's chips and not their circuitry which is probably why they don't want to bear the cost of a recall program unless AMD contribute to the costs...which they won't because Apple have pretty much stopped using AMD GPUs and use nVidia instead now.
    Anyway, I'm going to go back to the repair folks and have them re-fix the issue as it's covered by their warranty. Let me know if you have any more luck on your end.

  • [SOLVED]Issue with Postfix sending to external mail addresses

    I'm having a very silly issue with Postfix. I followed the wiki article at [link]https://wiki.archlinux.org/index.php/Postfix[/link], and everything seems to work properly, however I cannot send to emails outside of my domain.
    I get the error:
    550 5.1.1 <[email protected]>: Recipient address rejected: Local delivery only!
    Here is what the logs say:
    May 08 16:05:12 my.dns.stuff.org postfix/smtpd[31464]: connect from localhost.localdomain[127.0.0.1]
    May 08 16:05:12 my.dns.stuff.org postfix/smtpd[31464]: 091E011E3C: client=localhost.localdomain[127.0.0.1]
    May 08 16:05:12 my.dns.stuff.org postfix/smtpd[31464]: 091E011E3C: reject: RCPT from localhost.localdomain[127.0.0.1]: 550 5.1.1 <[email protected]>: Recipient address rejected: Local delivery only!; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<sendingdomain.com>
    May 08 16:05:12 my.dns.stuff.org postfix/smtpd[31464]: lost connection after RCPT from localhost.localdomain[127.0.0.1]
    May 08 16:05:12 my.dns.stuff.org postfix/smtpd[31464]: disconnect from localhost.localdomain[127.0.0.1]
    May 08 16:05:14 my.dns.stuff.org sudo[31476]: me : TTY=pts/0 ; PWD=/etc/postfix ; USER=root ; COMMAND=/usr/bin/journalctl
    main.cf
    # Global Postfix configuration file. This file lists only a subset
    # of all parameters. For the syntax, and for a complete parameter
    # list, see the postconf(5) manual page (command: "man 5 postconf").
    # For common configuration examples, see BASIC_CONFIGURATION_README
    # and STANDARD_CONFIGURATION_README. To find these documents, use
    # the command "postconf html_directory readme_directory", or go to
    # http://www.postfix.org/BASIC_CONFIGURATION_README.html etc.
    # For best results, change no more than 2-3 parameters at a time,
    # and test if Postfix still works after every change.
    # SOFT BOUNCE
    # The soft_bounce parameter provides a limited safety net for
    # testing. When soft_bounce is enabled, mail will remain queued that
    # would otherwise bounce. This parameter disables locally-generated
    # bounces, and prevents the SMTP server from rejecting mail permanently
    # (by changing 5xx replies into 4xx replies). However, soft_bounce
    # is no cure for address rewriting mistakes or mail routing mistakes.
    #soft_bounce = no
    # LOCAL PATHNAME INFORMATION
    # The queue_directory specifies the location of the Postfix queue.
    # This is also the root directory of Postfix daemons that run chrooted.
    # See the files in examples/chroot-setup for setting up Postfix chroot
    # environments on different UNIX systems.
    queue_directory = /var/spool/postfix
    # The command_directory parameter specifies the location of all
    # postXXX commands.
    command_directory = /usr/bin
    # The daemon_directory parameter specifies the location of all Postfix
    # daemon programs (i.e. programs listed in the master.cf file). This
    # directory must be owned by root.
    daemon_directory = /usr/lib/postfix
    # The data_directory parameter specifies the location of Postfix-writable
    # data files (caches, random numbers). This directory must be owned
    # by the mail_owner account (see below).
    data_directory = /var/lib/postfix
    # QUEUE AND PROCESS OWNERSHIP
    # The mail_owner parameter specifies the owner of the Postfix queue
    # and of most Postfix daemon processes. Specify the name of a user
    # account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
    # AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In
    # particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
    # USER.
    mail_owner = postfix
    # The default_privs parameter specifies the default rights used by
    # the local delivery agent for delivery to external file or command.
    # These rights are used in the absence of a recipient user context.
    # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
    #default_privs = nobody
    # INTERNET HOST AND DOMAIN NAMES
    # The myhostname parameter specifies the internet hostname of this
    # mail system. The default is to use the fully-qualified domain name
    # from gethostname(). $myhostname is used as a default value for many
    # other configuration parameters.
    #myhostname = host.domain.tld
    myhostname = mail.sendingdomain.com
    # The mydomain parameter specifies the local internet domain name.
    # The default is to use $myhostname minus the first component.
    # $mydomain is used as a default value for many other configuration
    # parameters.
    mydomain = www.sendingdomain.com
    # SENDING MAIL
    # The myorigin parameter specifies the domain that locally-posted
    # mail appears to come from. The default is to append $myhostname,
    # which is fine for small sites. If you run a domain with multiple
    # machines, you should (1) change this to $mydomain and (2) set up
    # a domain-wide alias database that aliases each user to
    # [email protected].
    # For the sake of consistency between sender and recipient addresses,
    # myorigin also specifies the default domain name that is appended
    # to recipient addresses that have no @domain part.
    #myorigin = $myhostname
    myorigin = $mydomain
    append_dot_mydomain = no
    # RECEIVING MAIL
    # The inet_interfaces parameter specifies the network interface
    # addresses that this mail system receives mail on. By default,
    # the software claims all active interfaces on the machine. The
    # parameter also controls delivery of mail to user@[ip.address].
    # See also the proxy_interfaces parameter, for network addresses that
    # are forwarded to us via a proxy or network address translator.
    # Note: you need to stop/start Postfix when this parameter changes.
    inet_interfaces = all
    #inet_interfaces = loopback-only
    #inet_interfaces = $myhostname
    #inet_interfaces = $myhostname, localhost
    # The proxy_interfaces parameter specifies the network interface
    # addresses that this mail system receives mail on by way of a
    # proxy or network address translation unit. This setting extends
    # the address list specified with the inet_interfaces parameter.
    # You must specify your proxy/NAT addresses when your system is a
    # backup MX host for other domains, otherwise mail delivery loops
    # will happen when the primary MX host is down.
    #proxy_interfaces =
    #proxy_interfaces = 1.2.3.4
    # The mydestination parameter specifies the list of domains that this
    # machine considers itself the final destination for.
    # These domains are routed to the delivery agent specified with the
    # local_transport parameter setting. By default, that is the UNIX
    # compatible delivery agent that lookups all recipients in /etc/passwd
    # and /etc/aliases or their equivalent.
    # The default is $myhostname + localhost.$mydomain. On a mail domain
    # gateway, you should also include $mydomain.
    # Do not specify the names of virtual domains - those domains are
    # specified elsewhere (see VIRTUAL_README).
    # Do not specify the names of domains that this machine is backup MX
    # host for. Specify those names via the relay_domains settings for
    # the SMTP server, or use permit_mx_backup if you are lazy (see
    # STANDARD_CONFIGURATION_README).
    # The local machine is always the final destination for mail addressed
    # to user@[the.net.work.address] of an interface that the mail system
    # receives mail on (see the inet_interfaces parameter).
    # Specify a list of host or domain names, /file/name or type:table
    # patterns, separated by commas and/or whitespace. A /file/name
    # pattern is replaced by its contents; a type:table is matched when
    # a name matches a lookup key (the right-hand side is ignored).
    # Continue long lines by starting the next line with whitespace.
    # See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
    #mydestination = $myhostname, localhost.$mydomain, localhost
    #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    #mydestination = localhost
    # mail.$mydomain, www.$mydomain, ftp.$mydomain
    # REJECTING MAIL FOR UNKNOWN LOCAL USERS
    # The local_recipient_maps parameter specifies optional lookup tables
    # with all names or addresses of users that are local with respect
    # to $mydestination, $inet_interfaces or $proxy_interfaces.
    # If this parameter is defined, then the SMTP server will reject
    # mail for unknown local users. This parameter is defined by default.
    # To turn off local recipient checking in the SMTP server, specify
    # local_recipient_maps = (i.e. empty).
    # The default setting assumes that you use the default Postfix local
    # delivery agent for local delivery. You need to update the
    # local_recipient_maps setting if:
    # - You define $mydestination domain recipients in files other than
    # /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
    # For example, you define $mydestination domain recipients in
    # the $virtual_mailbox_maps files.
    # - You redefine the local delivery agent in master.cf.
    # - You redefine the "local_transport" setting in main.cf.
    # - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
    # feature of the Postfix local delivery agent (see local(8)).
    # Details are described in the LOCAL_RECIPIENT_README file.
    # Beware: if the Postfix SMTP server runs chrooted, you probably have
    # to access the passwd file via the proxymap service, in order to
    # overcome chroot restrictions. The alternative, having a copy of
    # the system passwd file in the chroot jail is just not practical.
    # The right-hand side of the lookup tables is conveniently ignored.
    # In the left-hand side, specify a bare username, an @domain.tld
    # wild-card, or specify a [email protected] address.
    #local_recipient_maps = unix:passwd.byname $alias_maps
    local_recipient_maps = proxy:unix:passwd.byname $alias_maps
    #local_recipient_maps =
    # The unknown_local_recipient_reject_code specifies the SMTP server
    # response code when a recipient domain matches $mydestination or
    # ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
    # and the recipient address or address local-part is not found.
    # The default setting is 550 (reject mail) but it is safer to start
    # with 450 (try again later) until you are certain that your
    # local_recipient_maps settings are OK.
    unknown_local_recipient_reject_code = 550
    # TRUST AND RELAY CONTROL
    # The mynetworks parameter specifies the list of "trusted" SMTP
    # clients that have more privileges than "strangers".
    # In particular, "trusted" SMTP clients are allowed to relay mail
    # through Postfix. See the smtpd_recipient_restrictions parameter
    # in postconf(5).
    # You can specify the list of "trusted" network addresses by hand
    # or you can let Postfix do it for you (which is the default).
    # By default (mynetworks_style = subnet), Postfix "trusts" SMTP
    # clients in the same IP subnetworks as the local machine.
    # On Linux, this does works correctly only with interfaces specified
    # with the "ifconfig" command.
    # Specify "mynetworks_style = class" when Postfix should "trust" SMTP
    # clients in the same IP class A/B/C networks as the local machine.
    # Don't do this with a dialup site - it would cause Postfix to "trust"
    # your entire provider's network. Instead, specify an explicit
    # mynetworks list by hand, as described below.
    # Specify "mynetworks_style = host" when Postfix should "trust"
    # only the local machine.
    #mynetworks_style = class
    #mynetworks_style = subnet
    mynetworks_style = host
    # Alternatively, you can specify the mynetworks list by hand, in
    # which case Postfix ignores the mynetworks_style setting.
    # Specify an explicit list of network/netmask patterns, where the
    # mask specifies the number of bits in the network part of a host
    # address.
    # You can also specify the absolute pathname of a pattern file instead
    # of listing the patterns here. Specify type:table for table-based lookups
    # (the value on the table right-hand side is not used).
    #mynetworks = 168.100.189.0/28, 127.0.0.0/8
    #mynetworks = $config_directory/mynetworks
    #mynetworks = hash:/etc/postfix/network_table
    # The relay_domains parameter restricts what destinations this system will
    # relay mail to. See the smtpd_recipient_restrictions description in
    # postconf(5) for detailed information.
    # By default, Postfix relays mail
    # - from "trusted" clients (IP address matches $mynetworks) to any destination,
    # - from "untrusted" clients to destinations that match $relay_domains or
    # subdomains thereof, except addresses with sender-specified routing.
    # The default relay_domains value is $mydestination.
    # In addition to the above, the Postfix SMTP server by default accepts mail
    # that Postfix is final destination for:
    # - destinations that match $inet_interfaces or $proxy_interfaces,
    # - destinations that match $mydestination
    # - destinations that match $virtual_alias_domains,
    # - destinations that match $virtual_mailbox_domains.
    # These destinations do not need to be listed in $relay_domains.
    # Specify a list of hosts or domains, /file/name patterns or type:name
    # lookup tables, separated by commas and/or whitespace. Continue
    # long lines by starting the next line with whitespace. A file name
    # is replaced by its contents; a type:name table is matched when a
    # (parent) domain appears as lookup key.
    # NOTE: Postfix will not automatically forward mail for domains that
    # list this system as their primary or backup MX host. See the
    # permit_mx_backup restriction description in postconf(5).
    relay_domains = $mydestination
    # INTERNET OR INTRANET
    # The relayhost parameter specifies the default host to send mail to
    # when no entry is matched in the optional transport(5) table. When
    # no relayhost is given, mail is routed directly to the destination.
    # On an intranet, specify the organizational domain name. If your
    # internal DNS uses no MX records, specify the name of the intranet
    # gateway host instead.
    # In the case of SMTP, specify a domain, host, host:port, [host]:port,
    # [address] or [address]:port; the form [host] turns off MX lookups.
    # If you're connected via UUCP, see also the default_transport parameter.
    #relayhost = $mydomain
    #relayhost = [gateway.my.domain]
    #relayhost = [mailserver.isp.tld]
    #relayhost = uucphost
    #relayhost = [an.ip.add.ress]
    default_transport = error: Local delivery only!
    # REJECTING UNKNOWN RELAY USERS
    # The relay_recipient_maps parameter specifies optional lookup tables
    # with all addresses in the domains that match $relay_domains.
    # If this parameter is defined, then the SMTP server will reject
    # mail for unknown relay users. This feature is off by default.
    # The right-hand side of the lookup tables is conveniently ignored.
    # In the left-hand side, specify an @domain.tld wild-card, or specify
    # a [email protected] address.
    #relay_recipient_maps = hash:/etc/postfix/relay_recipients
    # INPUT RATE CONTROL
    # The in_flow_delay configuration parameter implements mail input
    # flow control. This feature is turned on by default, although it
    # still needs further development (it's disabled on SCO UNIX due
    # to an SCO bug).
    # A Postfix process will pause for $in_flow_delay seconds before
    # accepting a new message, when the message arrival rate exceeds the
    # message delivery rate. With the default 100 SMTP server process
    # limit, this limits the mail inflow to 100 messages a second more
    # than the number of messages delivered per second.
    # Specify 0 to disable the feature. Valid delays are 0..10.
    #in_flow_delay = 1s
    # ADDRESS REWRITING
    # The ADDRESS_REWRITING_README document gives information about
    # address masquerading or other forms of address rewriting including
    # username->Firstname.Lastname mapping.
    # ADDRESS REDIRECTION (VIRTUAL DOMAIN)
    # The VIRTUAL_README document gives information about the many forms
    # of domain hosting that Postfix supports.
    # "USER HAS MOVED" BOUNCE MESSAGES
    # See the discussion in the ADDRESS_REWRITING_README document.
    # TRANSPORT MAP
    # See the discussion in the ADDRESS_REWRITING_README document.
    # ALIAS DATABASE
    # The alias_maps parameter specifies the list of alias databases used
    # by the local delivery agent. The default list is system dependent.
    # On systems with NIS, the default is to search the local alias
    # database, then the NIS alias database. See aliases(5) for syntax
    # details.
    # If you change the alias database, run "postalias /etc/aliases" (or
    # wherever your system stores the mail alias file), or simply run
    # "newaliases" to build the necessary DBM or DB file.
    # It will take a minute or so before changes become visible. Use
    # "postfix reload" to eliminate the delay.
    #alias_maps = dbm:/etc/aliases
    #alias_maps = hash:/etc/aliases
    #alias_maps = hash:/etc/aliases, nis:mail.aliases
    #alias_maps = netinfo:/aliases
    alias_maps = hash:/etc/postfix/aliases
    # The alias_database parameter specifies the alias database(s) that
    # are built with "newaliases" or "sendmail -bi". This is a separate
    # configuration parameter, because alias_maps (see above) may specify
    # tables that are not necessarily all under control by Postfix.
    #alias_database = dbm:/etc/aliases
    #alias_database = dbm:/etc/mail/aliases
    #alias_database = hash:/etc/aliases
    #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
    alias_database = $alias_maps
    # ADDRESS EXTENSIONS (e.g., user+foo)
    # The recipient_delimiter parameter specifies the separator between
    # user names and address extensions (user+foo). See canonical(5),
    # local(8), relocated(5) and virtual(5) for the effects this has on
    # aliases, canonical, virtual, relocated and .forward file lookups.
    # Basically, the software tries user+foo and .forward+foo before
    # trying user and .forward.
    #recipient_delimiter = +
    # DELIVERY TO MAILBOX
    # The home_mailbox parameter specifies the optional pathname of a
    # mailbox file relative to a user's home directory. The default
    # mailbox file is /var/spool/mail/user or /var/mail/user. Specify
    # "Maildir/" for qmail-style delivery (the / is required).
    #home_mailbox = Mailbox
    home_mailbox = Maildir/
    # The mail_spool_directory parameter specifies the directory where
    # UNIX-style mailboxes are kept. The default setting depends on the
    # system type.
    #mail_spool_directory = /var/mail
    #mail_spool_directory = /var/spool/mail
    # The mailbox_command parameter specifies the optional external
    # command to use instead of mailbox delivery. The command is run as
    # the recipient with proper HOME, SHELL and LOGNAME environment settings.
    # Exception: delivery for root is done as $default_user.
    # Other environment variables of interest: USER (recipient username),
    # EXTENSION (address extension), DOMAIN (domain part of address),
    # and LOCAL (the address localpart).
    # Unlike other Postfix configuration parameters, the mailbox_command
    # parameter is not subjected to $parameter substitutions. This is to
    # make it easier to specify shell syntax (see example below).
    # Avoid shell meta characters because they will force Postfix to run
    # an expensive shell process. Procmail alone is expensive enough.
    # IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
    # ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
    #mailbox_command = /some/where/procmail
    #mailbox_command = /some/where/procmail -a "$EXTENSION"
    # The mailbox_transport specifies the optional transport in master.cf
    # to use after processing aliases and .forward files. This parameter
    # has precedence over the mailbox_command, fallback_transport and
    # luser_relay parameters.
    # Specify a string of the form transport:nexthop, where transport is
    # the name of a mail delivery transport defined in master.cf. The
    # :nexthop part is optional. For more details see the sample transport
    # configuration file.
    # NOTE: if you use this feature for accounts not in the UNIX password
    # file, then you must update the "local_recipient_maps" setting in
    # the main.cf file, otherwise the SMTP server will reject mail for
    # non-UNIX accounts with "User unknown in local recipient table".
    # Cyrus IMAP over LMTP. Specify ``lmtpunix cmd="lmtpd"
    # listen="/var/imap/socket/lmtp" prefork=0'' in cyrus.conf.
    #mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
    # Cyrus IMAP via command line. Uncomment the "cyrus...pipe" and
    # subsequent line in master.cf.
    #mailbox_transport = cyrus
    # The fallback_transport specifies the optional transport in master.cf
    # to use for recipients that are not found in the UNIX passwd database.
    # This parameter has precedence over the luser_relay parameter.
    # Specify a string of the form transport:nexthop, where transport is
    # the name of a mail delivery transport defined in master.cf. The
    # :nexthop part is optional. For more details see the sample transport
    # configuration file.
    # NOTE: if you use this feature for accounts not in the UNIX password
    # file, then you must update the "local_recipient_maps" setting in
    # the main.cf file, otherwise the SMTP server will reject mail for
    # non-UNIX accounts with "User unknown in local recipient table".
    #fallback_transport = lmtp:unix:/file/name
    #fallback_transport = cyrus
    #fallback_transport =
    # The luser_relay parameter specifies an optional destination address
    # for unknown recipients. By default, mail for unknown@$mydestination,
    # unknown@[$inet_interfaces] or unknown@[$proxy_interfaces] is returned
    # as undeliverable.
    # The following expansions are done on luser_relay: $user (recipient
    # username), $shell (recipient shell), $home (recipient home directory),
    # $recipient (full recipient address), $extension (recipient address
    # extension), $domain (recipient domain), $local (entire recipient
    # localpart), $recipient_delimiter. Specify ${name?value} or
    # ${name:value} to expand value only when $name does (does not) exist.
    # luser_relay works only for the default Postfix local delivery agent.
    # NOTE: if you use this feature for accounts not in the UNIX password
    # file, then you must specify "local_recipient_maps =" (i.e. empty) in
    # the main.cf file, otherwise the SMTP server will reject mail for
    # non-UNIX accounts with "User unknown in local recipient table".
    #luser_relay = [email protected]
    #luser_relay = [email protected]
    #luser_relay = admin+$local
    # JUNK MAIL CONTROLS
    # The controls listed here are only a very small subset. The file
    # SMTPD_ACCESS_README provides an overview.
    # The header_checks parameter specifies an optional table with patterns
    # that each logical message header is matched against, including
    # headers that span multiple physical lines.
    # By default, these patterns also apply to MIME headers and to the
    # headers of attached messages. With older Postfix versions, MIME and
    # attached message headers were treated as body text.
    # For details, see "man header_checks".
    #header_checks = regexp:/etc/postfix/header_checks
    # FAST ETRN SERVICE
    # Postfix maintains per-destination logfiles with information about
    # deferred mail, so that mail can be flushed quickly with the SMTP
    # "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
    # See the ETRN_README document for a detailed description.
    # The fast_flush_domains parameter controls what destinations are
    # eligible for this service. By default, they are all domains that
    # this server is willing to relay mail to.
    #fast_flush_domains = $relay_domains
    # SHOW SOFTWARE VERSION OR NOT
    # The smtpd_banner parameter specifies the text that follows the 220
    # code in the SMTP server's greeting banner. Some people like to see
    # the mail version advertised. By default, Postfix shows no version.
    # You MUST specify $myhostname at the start of the text. That is an
    # RFC requirement. Postfix itself does not care.
    #smtpd_banner = $myhostname ESMTP $mail_name
    #smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
    # PARALLEL DELIVERY TO THE SAME DESTINATION
    # How many parallel deliveries to the same user or domain? With local
    # delivery, it does not make sense to do massively parallel delivery
    # to the same user, because mailbox updates must happen sequentially,
    # and expensive pipelines in .forward files can cause disasters when
    # too many are run at the same time. With SMTP deliveries, 10
    # simultaneous connections to the same domain could be sufficient to
    # raise eyebrows.
    # Each message delivery transport has its XXX_destination_concurrency_limit
    # parameter. The default is $default_destination_concurrency_limit for
    # most delivery transports. For the local delivery agent the default is 2.
    #local_destination_concurrency_limit = 2
    #default_destination_concurrency_limit = 20
    # DEBUGGING CONTROL
    # The debug_peer_level parameter specifies the increment in verbose
    # logging level when an SMTP client or server host name or address
    # matches a pattern in the debug_peer_list parameter.
    debug_peer_level = 2
    # The debug_peer_list parameter specifies an optional list of domain
    # or network patterns, /file/name patterns or type:name tables. When
    # an SMTP client or server host name or address matches a pattern,
    # increase the verbose logging level by the amount specified in the
    # debug_peer_level parameter.
    #debug_peer_list = 127.0.0.1
    #debug_peer_list = some.domain
    # The debugger_command specifies the external command that is executed
    # when a Postfix daemon program is run with the -D option.
    # Use "command .. & sleep 5" so that the debugger can attach before
    # the process marches on. If you use an X-based debugger, be sure to
    # set up your XAUTHORITY environment variable before starting Postfix.
    debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    ddd $daemon_directory/$process_name $process_id & sleep 5
    # If you can't use X, use this to capture the call stack when a
    # daemon crashes. The result is in a file in the configuration
    # directory, and is named after the process name and the process ID.
    # debugger_command =
    # PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
    # echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
    # >$config_directory/$process_name.$process_id.log & sleep 5
    # Another possibility is to run gdb under a detached screen session.
    # To attach to the screen sesssion, su root and run "screen -r
    # <id_string>" where <id_string> uniquely matches one of the detached
    # sessions (from "screen -list").
    # debugger_command =
    # PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
    # -dmS $process_name gdb $daemon_directory/$process_name
    # $process_id & sleep 1
    # INSTALL-TIME CONFIGURATION INFORMATION
    # The following parameters are used when installing a new Postfix version.
    # sendmail_path: The full pathname of the Postfix sendmail command.
    # This is the Sendmail-compatible mail posting interface.
    sendmail_path = /usr/bin/sendmail
    # newaliases_path: The full pathname of the Postfix newaliases command.
    # This is the Sendmail-compatible command to build alias databases.
    newaliases_path = /usr/bin/newaliases
    # mailq_path: The full pathname of the Postfix mailq command. This
    # is the Sendmail-compatible mail queue listing command.
    mailq_path = /usr/bin/mailq
    # setgid_group: The group for mail submission and queue management
    # commands. This must be a group name with a numerical group ID that
    # is not shared with other accounts, not even with the Postfix account.
    setgid_group = postdrop
    # html_directory: The location of the Postfix HTML documentation.
    html_directory = no
    # manpage_directory: The location of the Postfix on-line manual pages.
    manpage_directory = /usr/share/man
    # sample_directory: The location of the Postfix sample configuration files.
    # This parameter is obsolete as of Postfix 2.1.
    sample_directory = /etc/postfix/sample
    # readme_directory: The location of the Postfix README files.
    readme_directory = /usr/share/doc/postfix
    inet_protocols = ipv4
    #virtual_mailbox_domains = sendingdomain.com
    virtual_alias_maps = hash:/etc/postfix/virtual_alias, mysql:/etc/postfix/mysql_virtual_forwards.cf
    virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmailer
    virtual_uid_maps = static:5003
    virtual_gid_maps = static:5003
    virtual_minimum_uid = 5003
    virtual_mailbox_limit = 51200000
    Any help would be appreciated. Thank you.
    Last edited by nadman10 (2014-05-14 14:36:10)

    Your main.cf seems redundant.
    For example:
    if you specify:
    virtual_alias_maps = hash:/etc/postfix/virtual_alias, mysql:/etc/postfix/mysql_virtual_forwards.cf
    you don't need this:
    alias_maps = hash:/etc/postfix/aliases
    and i think you have a lot of more options you don't need.
    This is my main.cf on my vps and everything works great (sending and receiving emails from/to most common mail server: gmail, hotmail etc etc)
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    readme_directory = no
    # TLS parameters
    smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls=yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    message_size_limit = 4194304
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
    virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
    virtual_transport = dovecot
    dovecot_destination_recipient_limit = 1
    it is very simple (no dkim, no forced tls, no mailbox limits and so on) and it can be improved but it works..
    as I suggested you just try spending some hour wiping postfix installation and giving a look to this guide

  • Issue with addPrincipal() of Interface DocumentAcl

    Hi all,
    There is an issue with the addPrincipal(String id, String format, int idType) method of interface DocumentAcl which creates/sets readers for a document and validates them on identity management system.
    When I use this method for small number of readers say 3-10, readers are properly set for the document. However when I have a thousand users/readers for a single document the method throws OutOfMemory Error and does not add a single user for the document.
    I would like to add to above scenario that for a few documents (in my case for 40 documents) readers (all thousand) were properly set. Afterwards for each document I started getting OutOfMemory Error.
    Is it an issue with addPrincipal() method?
    Need your comments.
    I am using SES 10.1.8.
    Regards,
    Shakti

    Hi all,
    There is an issue with the addPrincipal(String id, String format, int idType) method of interface DocumentAcl which creates/sets readers for a document and validates them on identity management system.
    When I use this method for small number of readers say 3-10, readers are properly set for the document. However when I have a thousand users/readers for a single document the method throws OutOfMemory Error and does not add a single user for the document.
    I would like to add to above scenario that for a few documents (in my case for 40 documents) readers (all thousand) were properly set. Afterwards for each document I started getting OutOfMemory Error.
    Is it an issue with addPrincipal() method?
    Need your comments.
    I am using SES 10.1.8.
    Regards,
    Shakti

Maybe you are looking for

  • New Airport Extreme works fine with everything except my husband's Toshiba running Windows 7

    I have no idea how to fix this problem.  He scanned his computer (Windows 7) for viruses, and nothing came back.  He deleted our home network from his laptop, then added it back.  His computer shows that he has "limited access" to our home network an

  • Indesign pdf on web page

    Evening Forum am i wrong in thinking i can use an indesign pdf on a web page like i do a normal pdf or jpg? i have had an indesign pdf created by someone, [sorry i dont know what the actual created pdf is called or whether it has a proper name?] and

  • Trigger point of function module EXIT_SAPMV45A_002

    Who can tell me the trigger point of function module EXIT_SAPMV45A_002? It is the one of user exits of T-CODE VA01.But it didn't be executed all the time during I executed the T-CODE: VA01 as well as finished the sales document.

  • Locate table in complex database diagram

    Hi All, If I have a database diagram of over 300 tables is there a quick way to locate an individual table by its name ? Ronnie

  • PRKP-1024 while trying to delete a service

    Hello All, I am having issues trying to delete a service that I set up on a node. $> srvctl stop service -d rac -s OLTP_service PRKP-1063 : Service OLTP_service is already stopped. $> srvctl remove service -d rac -s OLTP_service OLTP_service PREF: ra