Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using Postfix mail server on a LAMP stack. I use phpmailer to send my mail. I recently noticed that major ISP's have added support for the "List-Unsubscribe" header. according to Hotmail, live automatically adds a

You're subscribed to this mailing list. Unsubscribe

I noticed this when checking my Facebook mail. So when I examined the Facebook headers I noticed this line

List-Unsubscribe: <mailto:unsub+engage_digest_email@unsubscribe.facebook.com>
X-Priority: 3
X-Mailer: ZuckMail [version 1.00]
X-Facebook-Camp: engage_digest_email
X-Facebook-Notify: engage_digest_email; mailid=523199eG1fe9e7abG0Gd4
List-Unsubscribe: <mailto:unsub+engage_digest_email@unsubscribe.facebook.com>
Errors-To: update+pmhd_um@facebookmail.com
X-FACEBOOK-PRIORITY: 1

So with my phpmailer setup I added the addCustomHeader() function.

$x = new PHPMailer();
$x->From = "support@veepiz.com";
$x->FromName = "Veepiz Support";
$x->AddAddress($o->emailaddress,$o->toname);
$x->AddReplyTo("support@veepiz.com", "Veepiz Support");
$x->WordWrap = 80;                                 // set word wrap to 50 characters
$x->IsHTML(true);                                  // set email format to HTML
$x->IsSMTP();
$x->Host = "veepiz.com";
$x->Username = 'support@veepiz.com';
$x->Password = 'xxxxxxxx';                
$x->Subject = $o->subject;
$x->Body    = $o->content."\n\n<span style='color:white'>Forgotten your password? go to <a href='http://www.veepiz.com/forgot.php'>http://www.veepiz.com/forgot.php</a></span>";
$x->Body    = str_replace("\r", "\n", wordwrap($x->Body,80));
$x->AltBody = $o->plain_text;
$x->AltBody = str_replace("\r", "\n", wordwrap($x->AltBody,80));
$x->AddCustomHeader("List-Unsubscribe: <mailto:unsubscribe@veepiz.com?subject=Unsubscribe>, <http://www.veepiz.com/unsubscribe.php?unsubscribeid=$ox->id>");          

Now when I send my mail I get this in my mail headers...

List-Unsubscribe: <mailto:unsubscribe@veepiz.com?subject=Unsubscribe>,<http://www.veepiz.com/unsubscribe.php?unsubscribeid=1>

It seems phpmailer is adding this header and it conforms to the rfc http://www.list-unsubscribe.com/

But in Hotmail I don't get the component showing that i've subscribed to blah blah mailing list unsubscribe

You're subscribed to this mailing list. Unsubscribe

share|improve this question
    
i cant see any other headers from facebook saying its a list. ive editted post @Zoredache –  Sir Lojik Nov 8 '11 at 20:23
    
What happens if you add only the http url? Or list it first? –  Zoredache Nov 8 '11 at 20:24
    
And look really close at RFC 2369. –  mailq Nov 8 '11 at 20:24
    
@mailq i copied an example from that link List-Subscribe: <host.com/list.cgi?cmd=sub&lst=list>;, <mailto:list-manager@host.com?body=subscribe%20list> –  Sir Lojik Nov 8 '11 at 20:27
    
@Zoredache ive tried with email and http url alone and hotmail doesnot add that component.... im i using the phpmailer addCustomHeader function well? public function AddCustomHeader($custom_header) { $this->CustomHeader[] = explode(':', $custom_header, 2); } –  Sir Lojik Nov 8 '11 at 20:28

1 Answer 1

up vote 1 down vote accepted

So you should ask Hotmail. They probably show the component only for trusted newsletters or senders. Who told you that they show this for any mail containing the "List-Unsubscribe:" header.

This header can be used by Phishers and Spammers to make a mail more serious. There is a good chance that Hotmail only accepts these headers from trusted sites.

share|improve this answer
1  
And probably the Spam outbreak from your IP in the beginning of October still echoes back to you. –  mailq Nov 8 '11 at 20:42
    
thx a lot mailq –  Sir Lojik Nov 8 '11 at 20:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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