This issue may be important as Google and Yahoo are both supposedly tightening up requirements on bulk email senders. Implementing the google 'unsubscribe' button may be a requirement soon.
As far as I can tell, adding a List-Unsubscribe header containing a mailto link like "<mailto:_some_email_address?subject=unsubscribe>" should work. As noted above, the py4web mailer assumes it is given an email string and embeds it thus:
payload["List-Unsubscribe"] = "<mailto:%s>" % list_unsubscribe
Adding list_unsubscribe does not cause the unsubscribe button to appear at the (gmail) receiving end.
In addition, a true implementation would use an http link to avoid any manual step, but to avoid unwanted unsubscriptions caused by mechanisms like chrome's 'enhanced safe browsing' List-Unsubscribe-Post headers would also be required as described in
https://www.rfc-editor.org/rfc/pdfrfc/rfc8058.txt.pdf - py4web doesn't appear to support this header.
Furthermore the RFC8058 spec also implies that there needs to be a DKIM signature in the message but I have no idea how to implement this, it appears to be supported by py4web but is not documented. This may be why my List-Unsubscribe is being ignored?
David