Read bounce mail and remove address from list

Discussion in 'Installation/Configuration' started by francoisPE, Nov 28, 2021.

  1. francoisPE

    francoisPE Member HowtoForge Supporter

    Hello,
    I use ISPC 3.2.6
    I set a configuration to have all bounce mail in same mailbox.
    I would like to extract mail adresses from that mails and create list depending on hard or soft bounce...
    But here below header of that bounce :
    Code:
    From: =?Windows-1252?Q?Administrateur_syst=E8me?=
    Sender: =?Windows-1252?Q?Administrateur_syst=E8me?=
    To: <[email protected]>
    Subject: =?Windows-1252?Q?Non_remis=A0:_testbounce?=
    Date: Sun, 28 Nov 2021 19:36:26 +0100
    Message-ID: <[email protected]>
    MIME-Version: 1.0
    Content-Type: application/ms-tnef;
            name="winmail.dat"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
            filename="winmail.dat"
    X-Mailer: Microsoft Outlook 16.0
    Thread-Index: AQEonCmDCKxxxxxxxxzB0f4UyQ8r9Q==
    X-OlkEid: 0000000034FBAD0582A81046BB3xxxxxxxxxF77511CEB4CD00AA00BBB6E600000000000C000003D5CC8CBA296B4AB666
    9E68C858F6FF0000000004030000DC306FED93xxxxxxA136925F229B974
    X-MS-TNEF-Correlator: 0000000034FBAD0xxxxxxAB0700C3B68E10F77511CEB4CD00AA00BBB6E600000000000C000003D5CC8C
    BA296B4AB6669E68C858xxxx4030000
    
    After headers, there is texte base64. I decode it but no 550 in it...

    How can I identify if it is error 550 or anyone else !?
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    That information would have to be in the message body, if it exists, as it's nowhere apparent in the headers you posted.
     
  3. francoisPE

    francoisPE Member HowtoForge Supporter

    In body there is an include file as written in header:
    Content-Type: application/ms-tnef; name="winmail.dat"
    I don't know how to decode that...

    So my question is the following:
    is there a pkg that helps to decode content by one command on CLI ?

    I imagine I can have thousands of different situations to be able to read mail content !
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    There is at least one package which can decode tnef files; I haven't used it in a while and don't remember it it is one command, or part of a command pipeline, or otherwise. Try 'apt search tnef' to find related packages.

    There are quite a few, certainly. Start with covering the most common ones first...
     
  5. francoisPE

    francoisPE Member HowtoForge Supporter

    Jesse Norell likes this.

Share This Page