The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sending an email with more than one files thambi Shell Programming and Scripting 7 05-25-2007 09:52 PM
Sending email w/ ftp log as attachment idesaj UNIX for Dummies Questions & Answers 2 07-19-2005 11:48 AM
sending email vasikaran UNIX for Dummies Questions & Answers 1 07-05-2005 05:50 AM
sending email in unix. need help! tads98 Shell Programming and Scripting 2 05-16-2005 08:33 AM
Sending email bcheaib UNIX for Dummies Questions & Answers 7 02-22-2005 09:03 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-09-2008
thehaapyappy thehaapyappy is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 28
Email not sending to Hotmail

I have a strange problem. I have a script that sends out emails and it used to work fine to all email addresses, but I recently moved the site to a dedicated server and now it won't send out emails to any Hotmail accounts. None of the Hotmail accounts have got spam filters on and they all used to get email from the site. All of the script is the same as I say the only difference is the site is now on a dedicated server. Both the old and new servers are RedHat Linux using php5. I went into the php.ini file and all I found for SMTP is:

Quote:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -i
The send_mail() function is:

Code:
<?php

function send_mail($to, $from, $subject, $message)
{
	global $g;
	if (isset($g['options']['mail_html']) and $g['options']['mail_html'] == "Y") $ct = "text/html";
	else $ct = "text/plain";
	if (isset($g['options']['mail_utf8']) and $g['options']['mail_utf8'] == "Y") {
		$headers = "From: " . $from . "\n";
		$headers .= "Content-Type: " . $ct . "; charset=utf-8;\n";
		$headers .= "Reply-To: " . $from . ";\n";
		$headers .= "Return-Path: " . $from . ";\n";
	} else {
		$headers = "From: " . $from . "\n";
		$headers .= "Content-Type: " . $ct . ";\n";
		$headers .= "Reply-To: " . $from . ";\n";
		$headers .= "Return-Path: " . $from . ";\n";		
	}
	if (isset($g['options']['mail_utf8_subject']) and $g['options']['mail_utf8_subject'] == "Y") $subject = '=?UTF-8?B?'.base64_encode(trim(preg_replace('#[\n\r]+#s', '', $subject)))."?=\n";
	mail($to, $subject, $message, $headers);
}
but that all works fine. It's just that the emails aren't being sent to Hotmail addresses.
  #2 (permalink)  
Old 05-09-2008
sparcguy sparcguy is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2006
Posts: 315
maybe your new server dunno how to forward the email, maybe you need to specify a mailhost or maybe some config missing.

Go to the "/" root filesystem and check if there is any file called dead.letter.

type mailq to check if your mails are stuck in the queue.

on solaris servers there is a syslog log file whenever you send email out it will log to that file, check your syslog for more clues. Maybe syslog will say mails are dererred or error or remote server terminated you.

Lastly you can try few things which can reveal more details on what's going on in the email sending process

banner test > /tmp/xxx
/usr/lib/sendmail -v youremail@hotmail.com < /tmp/xxx

or

(assuming from your above code your localhost is your mailhost)

First open 2 sessions.
1st session do a tail -f /var/log/syslog

2nd session do
telnet localhost 25
mail from: darthvader@yourdomain.com
rcpt to: youremail@hotmail.com
data
test
test
test
. <---- once you type the termination "." it will immed attempt to send the email. Then at the same time switch to first session(tail -f) to check syslog and see what it says.
  #3 (permalink)  
Old 05-09-2008
sparcguy sparcguy is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2006
Posts: 315
but if you just want a quick and dirty way out of your problem. This may or may not work (usually it does work for me)

On the new server stop sendmail then backup sendmail binary and sendmail.cf
cp -p sendmail sendmail.ORG
cp -p sendmail.cf sendmailcf.ORG

from your old server copy over the sendmail binary and cf file into the appropriate directory, change the appropriate ownership and permissions then start sendmail. Check syslog (tail -f) to see if mails are going out.

good luck
  #4 (permalink)  
Old 05-12-2008
thehaapyappy thehaapyappy is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 28
Thanks, the server itself is sending out email, it was just Hotmail that wasn't getting through, but it turned out that Spam Cannibal had wrong blacklisted it. I've now had it removed from the list and it's all working fine.
Sponsored Links
Closed Thread

Bookmarks

Tags
awk, awk trim, trim, trim awk

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0