eakteam but it doesn’t seems right configuration for mailcow for global header.
Why?
English
eakteam but it doesn’t seems right configuration for mailcow for global header.
Why?
Have something to say?
Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!
Firstly this file location I think is incorrect: header_checks = regexp:/etc/postfix/list_unsub_header
And secondly don’t want to add header for only one email but for all mailboxes registered on specific domains: List-Unsubscribe: <mailto: unsubscribe@example.com?subject=unsubscribe>
eakteam Firstly this file location I think is incorrect:
You need to understand that postfix is containerized and where the actual config files are saved. That is in /opt/mailcow-dockerized/data/conf/postfix or similar folder, depending on your OS.
You will find more info in the mailcow documentation.
eakteam don’t want to add header for only one email
Why do you think its only for one mailbox?
The only thing you have to figure out is how to do it for each domain separately, and that can be found somewhere in the postfix documentation itself
esackbauer That is in /opt/mailcow-dockerized/data/conf/postfix or similar folder, depending on your OS.
So, you are saying that we should use that directory or just /data/conf/postfix
? Also I can see on original mailcow postfix config (main.cf) that some files are pointed to different dir e.g. virtual_mailbox_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mailbox_maps.cf
…
This is confusing, that’s why asking a tested version for that.
esackbauer Why do you think its only for one mailbox?
The only thing you have to figure out is how to do it for each domain separately, and that can be found somewhere in the postfix documentation itself
This is why i need help, on how to do that in an easy way globally or for each domain but can’t find documentation on mailcow nor postfix.
If there is any working template/example how to achieve that it would be awesome.
Exactly! I am having the same issue, I want to add a global List-Unsubscibe header and I followed the mentioned , 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.. !
Do not just reboot, do docker compose up -d
!!
esackbauer
I tried and nothing still..
What i literally tried is:
header_checks = regexp:/etc/postfix/list_unsub_header
to /home/mailcow-dockerized/data/conf/postfix/main.cf
list_unsub_header
next to main.cf
in /home/mailcow-dockerized/data/conf/postfix/list_unsub_header
docker compose up -d
postfix-mailcow
form mailcow UIPlease where did I mess up? I have been trying this for days..
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
Olgaa
I guess you want this for Incoming messages!
in your case create the file:
/home/mailcow-dockerized/data/conf/postfix/list_unsub_header
add to:
/home/mailcow-dockerized/data/conf/postfix/extra.cf
header_checks = regexp:/opt/postfix/conf/list_unsub_header
run:
docker compose up -d
docker compose restart postfix-mailcow
although i have no clue how this will work in a multidomain setup just for one domain.
i used exactly the same manual
the only difference is the path in the extra.cf
what is the output from:
docker-compose exec postfix-mailcow postconf -n | grep -i header
run below and post the output if something found
docker-compose logs postfix-mailcow | grep prepend
I did a little bit more of fiddling around. So please read the below carefully.
The example I’ve explained earlier just works with incoming mails. As I already wrote.
E.g. from gmail to mailcow!
Final Word:
You might want to look around for another solution to run newsletter or a mailinglist rather than using mailcow, since it is some sort of closed solution.
Even though I haven’t found one use case yet which is not covered by mailcow for running a regular, very well designed “mail appliance”.
Over and out.
maybe @DocFraggle or @esackbauer you can give a few words since you seem to have a lot of experience with mailcow
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!!!
I would also strongly suggest to outsource these kind of things into a separate solution which also allows better management. Especially in EU with GDPR it is easier to document in case of audits or complaints. In bigger companies this is typically done within CRM, but there is also a free open source solution:
Havent tried it yet, but looks decent.
Hi fellow bovine enthusiasts. Given the timing, it may be safe to assume you are/were researching this “List-Unsubscribe” configuration to satiate new deliverability requirements from the “big 3”. Just wanted to add a few things:
As for us, we plan to hold off on adding these headers to Postfix for now, as our server is strictly used for transactional email.
Cheers!