O
Olgaa

  • Aug 22, 2024
  • Joined Feb 27, 2024
  • 0 discussions
  • 7 posts
  • 1 best answer
  • Post posted... wait what? You like it! You got the answer!
  • Can you please tell me how you fixed it? I am encountering the same issue ๐Ÿ˜•

  • piperino
    docker-compose exec postfix-mailcow postconf -n | grep -i header gives me:

    header_checks = regexp:/opt/postfix/conf/list_unsub_header
    smtp_header_checks = pcre:/opt/postfix/conf/anonymize_headers.pcre
    smtpd_sasl_authenticated_header = yes
    smtpd_tls_received_header = yes

    and

    docker-compose logs postfix-mailcow | grep prepend gives:

    postfix-mailcow-1  | Feb 27 21:58:44 442c313eb6bb postfix/cleanup[483]: 75E6B13C1B04: prepend: header Content-Type: text/html; charset=utf-8 from mail-qt1-f181.google.com[209.85.160.181]; from=<anupam.convodigital@gmail.com> to=<contact@mydomain.com> proto=ESMTP helo=<mail-qt1-f181.google.com>: List-Unsubscribe: mailto:unsubscribe@mydomain.com?subject=unsubscribe
    postfix-mailcow-1  | Feb 27 22:16:21 442c313eb6bb postfix/cleanup[483]: 834C613C0A61: prepend: header Content-Transfer-Encoding: quoted-printable from mail-pf1-f171.google.com[209.85.210.171]; from=<madison@teamrisems.com> to=<updates@mydomain.com> proto=ESMTP helo=<mail-pf1-f171.google.com>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"
    postfix-mailcow-1  | Feb 27 22:26:51 442c313eb6bb postfix/cleanup[602]: D1A8513C1A2C: prepend: header Content-Transfer-Encoding: quoted-printable from mail-yb1-f174.google.com[209.85.219.174]; from=<team@dobleskemarketing.com> to=<news@mydomain.com> proto=ESMTP helo=<mail-yb1-f174.google.com>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"
    postfix-mailcow-1  | Feb 27 22:27:45 442c313eb6bb postfix/cleanup[602]: 1366613C1A4F: prepend: header Content-Transfer-Encoding: 7bit from mail176.acems1.com[192.92.97.176]; from=<bounce-3156164-132-221260-contact=mydomain.com@mail172.acems1.com> to=<contact@mydomain.com> proto=ESMTP helo=<mail176.acems1.com>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"
    postfix-mailcow-1  | Feb 27 22:27:45 442c313eb6bb postfix/cleanup[602]: 1366613C1A4F: prepend: header Content-Transfer-Encoding: quoted-printable from mail176.acems1.com[192.92.97.176]; from=<bounce-3156164-132-221260-contact=mydomain.com@mail172.acems1.com> to=<contact@mydomain.com> proto=ESMTP helo=<mail176.acems1.com>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"
    postfix-mailcow-1  | Feb 27 22:44:04 442c313eb6bb postfix/cleanup[794]: 695B713C18EF: prepend: header Content-Transfer-Encoding: quoted-printable from mout.kundenserver.de[217.72.192.74]; from=<nayef@hellosugarsmile.de> to=<contact@mydomain.com> proto=ESMTP helo=<mout.kundenserver.de>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"
    postfix-mailcow-1  | Feb 27 23:48:34 442c313eb6bb postfix/cleanup[1501]: 9848313C0079: prepend: header Content-Transfer-Encoding: quoted-printable from mail-io1-f54.google.com[209.85.166.54]; from=<ashfaque@theideaforges.com> to=<updates@mydomain.com> proto=ESMTP helo=<mail-io1-f54.google.com>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"
    postfix-mailcow-1  | Feb 27 23:58:54 442c313eb6bb postfix/cleanup[1659]: D903F13C18D6: prepend: header Content-Transfer-Encoding: quoted-printable from mout.perfora.net[74.208.4.197]; from=<peytonriley@infinitumsolar.info> to=<contact@mydomain.com> proto=ESMTP helo=<mout.perfora.net>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"
    postfix-mailcow-1  | Feb 28 00:02:40 442c313eb6bb postfix/cleanup[1729]: 7C56A13C1ABD: prepend: header Content-Transfer-Encoding: quoted-printable from mail-qk1-f172.google.com[209.85.222.172]; from=<anupam.convodigital@gmail.com> to=<contact@mydomain.com> proto=ESMTP helo=<mail-qk1-f172.google.com>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"
    postfix-mailcow-1  | Feb 28 00:17:44 442c313eb6bb postfix/cleanup[1862]: C340313C17F6: prepend: header Content-Transfer-Encoding: quoted-printable from mout.kundenserver.de[212.227.126.133]; from=<simon@marketingfilmsmedia.info> to=<updates@mydomain.com> proto=ESMTP helo=<mout.kundenserver.de>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"
    postfix-mailcow-1  | Feb 28 08:41:47 442c313eb6bb postfix/cleanup[6307]: 3EE2A13C1BC1: prepend: header Content-Transfer-Encoding: quoted-printable from mta-07-3.privateemail.com[198.54.118.214]; from=<samuel@bestpldomains.com> to=<updates@mydomain.com> proto=ESMTP helo=<MTA-07-3.privateemail.com>: List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"

    [unknown] Aha! I thought it was for outgoing emails, like when you send an email from mailcow and it shows to the recipient an โ€œunsubscribeโ€ button ๐Ÿ˜…

    [unknown]
    Adding line /^Content-Type:/i PREPEND List-Unsubscribe: <mailto:unsubscribe@mydomain.com> straight to anonymize_headers.pcre then running docker compose up -d and docker compose restart postfix-mailcow fixes it! ๐Ÿซฃ
    Now there is an List-Unsubscribe header in the source! As you said it might be overwritten after an update but at least it works for now until there is a better solution! Thank you!!! ๐Ÿ™

    • Yes, the List-Unsubscribe header is missing :/
      By the way this is the contents of /home/mailcow-dockerized/data/conf/postfix/list_unsub_header

      /^Content-Transfer-Encoding:/i PREPEND List-Unsubscribe: mailto:<unsubscribe@mydomain.com>?subject=unsubscribe>"

      which I got from Mailtrap Icon here

      , is it correct?

    • piperino
      I tried the steps and nothing yet! ๐Ÿค” does it take some time to work ?

      • DocFraggle
        I tried running docker compose down then docker compose up -d but nothing.
        Also the header_checks line that was added in the /home/mailcow-dockerized/data/conf/postfix/main.cf disappeared

        • esackbauer
          I tried and nothing still.. ๐Ÿ˜•

          What i literally tried is:

          1. added new line header_checks = regexp:/etc/postfix/list_unsub_header to /home/mailcow-dockerized/data/conf/postfix/main.cf
          2. created list_unsub_header next to main.cf in /home/mailcow-dockerized/data/conf/postfix/list_unsub_header
          3. ran docker compose up -d
          4. restarted postfix-mailcow form mailcow UI

          Please where did I mess up? I have been trying this for days.. ๐Ÿ™

          • Exactly! I am having the same issue, I want to add a global List-Unsubscibe header and I followed the mentioned Mailtrap Icon tutorial

            , but still not working.
            There is a confusion about how to do this correctly, one of which is which main.cf should be edited? the one in systemโ€™s /etc/postfix/ or the one in the mailcow working directory which is in my case /home/mailcow-dockerized/data/conf/postfix/, i tried both and none worked, also when i change the main.cf in /home/mailcow-dockerized/data/conf/postfix and i restart postfix-mailcow process, the main.cf gets back to previous state..
            I would really appreciate if someone could give an explicit step by step guide to us newbies, its just too confusing.. ๐Ÿ™ !