I just did our first email blast and it went pretty well. I'm using the token {action.optOutUrl} in the footer, plus the domain address, but that's it. The Opt Outs appear to have worked fine and they're labeled "No Bulk Emails (User Opt Out)" in the CiviCRM database. The bounces processed properly as well.

The weird thing was that the Mail Report shows that 5 people made "unsubscribe requests". How did they do that since the token isn't there?? Plus, their records aren't flagged with any red message, tho they do show up in Advanced Search. Did these people hit the spam button on their email programs? Will they get future emails? Am I supposed to do something with them? Thanks, in advance! Jim

  • For what it's worth I have seen the exact same behavior (we have the same footer setup) in civiCRM 4.6.4 sending through Mandrill transactional emails. We have switched to SparkPost due to Mandrill going away and I will report back if we see the same behavior there. Commented Apr 13, 2016 at 15:14

4 Answers 4


I had this question also and just figured it out!

Civimail always includes a List-Unsubscribe header in the messages it sends out (https://issues.civicrm.org/jira/browse/CRM-3251).

That header is invisible to most recipients and is intended as a way for mail clients to provide easy and standardized unsubscribe mechanisms (http://www.list-unsubscribe.com/).

I note that google doesn't seem to do anything with it, though they do expose the list unsubscribe option for mailman lists, or used to .. But, it appears that Windows Live does use it, so anyone using that software that receives Civimail can use it.

The only clue I had was in my apache logs - the time of the unsubscribe matched a soap request that came in via UAS/CiviSMTP that handles the bounces for this domain.

Thanks to Leyla UAS/CiviSMTP support (http://www.civismtp.com/) for confirming this idea.

For bonus points, assuming you really only want people to opt-out instead of unsubscribing, you can include this in a custom extension or module, changing 'hook' to the name of your custom extension or module.

function hook_civicrm_alterMailParams(&$params, $context) {
  if ('civimail' == $context || 'flexmailer' == $context) {
    $params['List-Unsubscribe'] = str_replace('mailto:u.','mailto:o.',$params['List-Unsubscribe']);
  • My solution recently stopped working when the client switched to using Mosaico - turns out the use of flexmailer caused this solution to stop working, so I've just updated it above. Updating from 4.6 to 4.7 didn't cause any issues.
    – Alan Dixon
    Commented Mar 30, 2018 at 14:39

I suspect that unsubscribes are a subset of opt out. So in CiviCRM, when a user opts out, they are also automatically unsubscribed from the mailing list groups you used.

As opposed to those that might unsubscribe (if you had included that link) wherein they would be removed from the mailing list group they are in but would not have been opted out.

  • Thanks for the quick reply! They don't seem to be a subset of the opt outs, since their records aren't flagged with any red messages. The mailing groups I used were temporary, so that's not gonna help. This seems like some kind of glitch. Should I assume they want off the list? So, I'll have to look for these after every mailing and opt them out manually? Bummer. I'm using 4.5.8 with WordPress. We tried 4.6.6, but CiviMail doesn't work with WP. You always get 0 recipients. We we had to backtrack..
    – jimcrist
    Commented Sep 29, 2015 at 21:08
  • I guess I can find them with the advanced search, keep adding them to a permanent group and keep excluding that group from emails. What a pain! It's weird that you can't see this "unsubscribe request" flag when you look at their contact record.
    – jimcrist
    Commented Sep 29, 2015 at 21:24
  • What are your outbound email settings?
    – DaveD
    Commented Sep 29, 2015 at 21:30
  • I'm using SMTP on DreamHost. On my mailing 92 people opted-out and only 5 people had this "unsubscribe request". Also, I was wondering if CiviMail captures anything when people hit the spam button? Any chance 5 people hit the spam button? Thanks again!
    – jimcrist
    Commented Sep 29, 2015 at 23:23
  • No, the spam button is only generally with their ISP. Too many spam button presses and the ISP just blocks your incoming mail. Your prob is interesting. Gotta think about it.
    – DaveD
    Commented Sep 29, 2015 at 23:27

It's weird indeed. Are you using an external provider to handle the mailings (eg mandrill or mailjet?) by any chance?

Given the low number, I would suggest you to contact the 5 to tell them that you quite don't understand what happened with your mail server, if they could remember and explain you what they did to unsubscribe, it'd be super useful for you to understand their workflow.

(be clear it's a personal email, not a mass mailing one and that you will remove them from the mailing list). I would send them from your mail client, not via civi

Please update us on your finding.


OK - I think I have this (thanks for input from @pradpnayak)

according to the docs for hook_civicrm_alterMailParams:

You can add custom headers by appending to $params['headers']. Example:

$params['headers']['X-My-Header'] = 'my header value';

The headers key may not exist in the $params array when passed into the hook.

so this was the codce in an extension to unset the existing 'List-Unsubscribe', and put in a NULL replacement into the headers:

 * Implements hook_civicrm_alterMailParams().
 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
function custom_civicrm_alterMailParams(&$params, $context) {
  if ($context == 'flexmailer' || $context == 'civimail') {
    // remove existing header
    // replace via the 'headers' key
    $params['headers']['List-Unsubscribe'] = NULL;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.