Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th January 2006, 04:17
palkat palkat is offline
Member
 
Join Date: Aug 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default mail from server being blocked?

This is a head scratcher for me, been fighting with this for a while.
I got the ISPconfig on a Suse9.3 install and the Uebimaiu webmail that ISPconfig installed works great email AOL users but we have found that PHP programs like Geeklog and Coppermine Photo Gallery to name a couple can send emails to most all servers and people get the emails from them but not AOL and my brother on roadrunner cable back in NewYork.

I can send emails to AOL and my brother on Roadrunner perfectly and they get all the emails sent directly from the Ubimail webmail on my server but its those pesky php programs they don't get email from.

I have gone round an dround with the developtboth GEEKLOG and COPPERMINE PHOTO GALLERY and now turn to you all for any input/help on this.

Why do the PHP programs seem to get blocked by AOL and roadrunner?

Thanks.
Reply With Quote
Sponsored Links
  #2  
Old 19th January 2006, 06:16
themachine themachine is offline
Senior Member
 
Join Date: Oct 2005
Location: Texas, USA
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Most likely you are using the "mail()" funtion in PHP. And most likely you are not creating proper email headers. Reference the following:

Code:
<?php

$to = "to@domain.com";
$from = "from@domain.com";
$subject = "Subject Line";
$msg = "Email Content";

$headers = "From: $from\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "Return-Path: $from\r\n";

mail ($to,$subject,$msg,$headers);

?>

Its possible that if your emails are not sending with a proper return path then they are being rejected. However AOL can reject emails for whatever reason they choose... and therefore it would be helpful if you could post the *FULL HEADERS* of the email message that is bouncing back. Please turn on *FULL HEADERS* in your email client, and then copy all headers including the bounce error message to the forum and then we can help you further.
__________________
themachine
5dollarwhitebox.org
Reply With Quote
  #3  
Old 19th January 2006, 15:57
palkat palkat is offline
Member
 
Join Date: Aug 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

THats just it, I don't get anything bounced back either...the messages just seem to vaporize to aol.
Reply With Quote
  #4  
Old 19th January 2006, 21:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

What about the code that produces the mails? Does it generate full headers? Please post this code here (only the code that generates the emails).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 19th January 2006, 22:38
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,258 Times in 4,122 Posts
Default

Please have a look at the mail log and post the lines that appear when you send an email to AOL with the PHP application.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 20th January 2006, 00:50
palkat palkat is offline
Member
 
Join Date: Aug 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
What about the code that produces the mails? Does it generate full headers? Please post this code here (only the code that generates the emails).
Here is the code from one program where it will not deliver to AOL. this is GEEKLOG and the code is to send an article to a person via email.

/**
* This will email new stories in the topics that the user is interested in
*
* In account information the user can specify which topics for which they
* will receive any new article for in a daily digest.
*
* @return void
*/

function COM_emailUserTopics()
{
global $_CONF, $_TABLES, $LANG08, $LANG24;

$subject = strip_tags( $_CONF['site_name'] . $LANG08[30] . strftime( '%Y-%m-%d', time() ));

$authors = array();

// Get users who want stories emailed to them
$usersql = "SELECT username,email,etids,{$_TABLES['users']}.uid AS uuid "
. "FROM {$_TABLES['users']}, {$_TABLES['userindex']} "
. "WHERE {$_TABLES['users']}.uid > 1 AND {$_TABLES['userindex']}.uid = {$_TABLES['users']}.uid AND (etids <> '-') ORDER BY {$_TABLES['users']}.uid";

$users = DB_query( $usersql );
$nrows = DB_numRows( $users );

$lastrun = DB_getItem( $_TABLES['vars'], 'value', "name = 'lastemailedstories'" );

// For each user, pull the stories they want and email it to them
for( $x = 1; $x <= $nrows; $x++ )
{
$U = DB_fetchArray( $users );

$storysql = "SELECT sid,uid,date AS day,title,introtext,bodytext "
. "FROM {$_TABLES['stories']} "
. "WHERE draft_flag = 0 AND date <= NOW() AND date >= '{$lastrun}'";

$topicsql = "SELECT tid FROM {$_TABLES['topics']}"
. COM_getPermSQL( 'WHERE', $U['uuid'] );
$tresult = DB_query( $topicsql );
$trows = DB_numRows( $tresult );

if( $trows == 0 )
{
// this user doesn't seem to have access to any topics ...
continue;
}

$TIDS = array();
for( $i = 1; $i <= $trows; $i++ )
{
$T = DB_fetchArray( $tresult );
$TIDS[] = $T['tid'];
}

if( !empty( $U['etids'] ))
{
$ETIDS = explode( ' ', $U['etids'] );
$TIDS = array_intersect( $TIDS, $ETIDS );
}

if( sizeof( $TIDS ) > 0)
{
$storysql .= " AND (tid IN ('" . implode( "','", $TIDS ) . "'))";
}

$storysql .= COM_getPermSQL( 'AND', $U['uuid'] );
$storysql .= ' ORDER BY featured DESC, date DESC';

$stories = DB_query( $storysql );
$nsrows = DB_numRows( $stories );

if( $nsrows == 0 )
{
// If no new stories where pulled for this user, continue with next
continue;
}

$mailtext = $LANG08[29] . strftime( $_CONF['shortdate'], time() ) . "\n";

for( $y = 0; $y < $nsrows; $y++ )
{
// Loop through stories building the requested email message
$S = DB_fetchArray( $stories );

$mailtext .= "\n------------------------------\n\n";
$mailtext .= "$LANG08[31]: "
. COM_undoSpecialChars( stripslashes( $S['title'] )) . "\n";
if( $_CONF['contributedbyline'] == 1 )
{
if( empty( $authors[$S['uid']] ))
{
$storyauthor = DB_getItem( $_TABLES['users'], 'username', "uid = '{$S['uid']}'" );
$authors[$S['uid']] = $storyauthor;
}
else
{
$storyauthor = $authors[$S['uid']];
}
$mailtext .= "$LANG24[7]: " . $storyauthor . "\n";
}

$mailtext .= "$LANG08[32]: " . strftime( $_CONF['date'], strtotime( $S['day' ])) . "\n\n";

if( $_CONF['emailstorieslength'] > 0 )
{
$storytext = COM_undoSpecialChars( stripslashes( strip_tags( $S['introtext'] )));

if( $_CONF['emailstorieslength'] > 1 )
{
if( strlen( $storytext ) > $_CONF['emailstorieslength'] )
{
$storytext = substr( $storytext, 0, $_CONF['emailstorieslength'] ) . '...';
}
}

$mailtext .= $storytext . "\n\n";
}

$mailtext .= $LANG08[33] . ' ' . COM_buildUrl( $_CONF['site_url']
. '/article.php?story=' . $S['sid'] ) . "\n";
}

$mailtext .= "\n------------------------------\n";
$mailtext .= "\n$LANG08[34]\n";
$mailtext .= "\n------------------------------\n";

$mailto = $U['username'] . ' <' . $U['email'] . '>';

COM_mail( $mailto, $subject, $mailtext );
}

DB_query( "UPDATE {$_TABLES['vars']} SET value = NOW() WHERE name = 'lastemailedstories'" );
}
Reply With Quote
  #7  
Old 20th January 2006, 00:54
palkat palkat is offline
Member
 
Join Date: Aug 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till
Please have a look at the mail log and post the lines that appear when you send an email to AOL with the PHP application.
Sorry to be lame but i have not touched the server is soo long and not a linux god would you mind if i ask where would i find the mail log on the server?

thanks!
Reply With Quote
  #8  
Old 20th January 2006, 06:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Please post the COM_mail() function, that's where the emails seem to be generated.

Quote:
Originally Posted by palkat
Sorry to be lame but i have not touched the server is soo long and not a linux god would you mind if i ask where would i find the mail log on the server?
Somewhere in /var/log.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 20th January 2006, 07:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,258 Times in 4,122 Posts
Default

Quote:
Originally Posted by palkat
Sorry to be lame but i have not touched the server is soo long and not a linux god would you mind if i ask where would i find the mail log on the server?
The mail log is in the directory /var/log

Depending on your linux distro, it might be named:

/var/log/mail
/var/log/mail.log
/var/log/mail.info
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 31st January 2006, 23:47
palkat palkat is offline
Member
 
Join Date: Aug 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Alright sorry for the dealy here is a log from the /var/log of the "mail" file

Note: the log is of 2 mail messages sent the first one from Coppermine Photo Gallery to my AOL account that does not get the messages. This message should be around the 15:34 time stamp.
the Second message is sent again to the same AOL account but from GEEKLOG bloggin program at 15:37 time frame.

Jan 31 15:34:47 server1 postfix/pickup[22590]: 5764D2AF1A: uid=30 from=<wwwrun> Jan 31 15:34:47 server1 postfix/cleanup[23644]: 5764D2AF1A:
message-id=<20060131223446.5764D2AF1A@server1.example.com>
Jan 31 15:34:47 server1 postfix/qmgr[22591]: 5764D2AF1A:
from=<wwwrun@server1.example.com>, size=2570, nrcpt=1 (queue active) Jan 31 15:34:47 server1 postfix/smtp[23646]: warning: connect to
private/tlsmgr: No such file or directory Jan 31 15:34:48 server1 postfix/smtp[23646]: warning: connect to
private/tlsmgr: No such file or directory Jan 31 15:34:48 server1 postfix/smtp[23646]: warning: problem talking to server private/tlsmgr: No such file or directory Jan 31 15:34:48 server1 postfix/smtp[23646]: warning: no entropy for TLS key
generation: disabling TLS support
Jan 31 15:34:49 server1 postfix/smtp[23646]: 5764D2AF1A:
to=<palkat@aim.com>, relay=mailin-02.mx.aol.com[205.188.155.89], delay=3, status=bounced (host mailin-02.mx.aol.com[205.188.155.89] said: 550 REQUESTED ACTION NOT TAKEN: DNS FAILURE (in reply to MAIL FROM command)) Jan 31 15:34:49 server1 postfix/cleanup[23644]: EAC392AF19:
message-id=<20060131223449.EAC392AF19@server1.example.com>
Jan 31 15:34:49 server1 postfix/qmgr[22591]: 5764D2AF1A: removed Jan 31 15:34:49 server1 postfix/qmgr[22591]: EAC392AF19: from=<>, size=4515,
nrcpt=1 (queue active)
Jan 31 15:34:50 server1 postfix/local[23650]: EAC392AF19:
to=<root@server1.example.com>, orig_to=<wwwrun@server1.example.com>,
relay=local, delay=1, status=sent (delivered to maildir) Jan 31 15:34:50 server1 postfix/qmgr[22591]: EAC392AF19: removed Jan 31 15:36:03 server1 postfix/pickup[22590]: 0398F2AF17: uid=30 from=<wwwrun> Jan 31 15:36:03 server1 postfix/cleanup[23644]: 0398F2AF17:
message-id=<20060131223602.0398F2AF17@server1.example.com>
Jan 31 15:36:03 server1 postfix/qmgr[22591]: 0398F2AF17:
from=<wwwrun@server1.example.com>, size=2570, nrcpt=1 (queue active) Jan 31 15:36:05 server1 postfix/smtp[23646]: 0398F2AF17:
to=<palkat@aim.com>, relay=mailin-01.mx.aol.com[205.188.156.185], delay=3, status=bounced (host mailin-01.mx.aol.com[205.188.156.185] said: 550 REQUESTED ACTION NOT TAKEN: DNS FAILURE (in reply to MAIL FROM command)) Jan 31 15:36:05 server1 postfix/cleanup[23644]: D16DB2AF19:
message-id=<20060131223605.D16DB2AF19@server1.example.com>
Jan 31 15:36:05 server1 postfix/qmgr[22591]: D16DB2AF19: from=<>, size=4517,
nrcpt=1 (queue active)
Jan 31 15:36:05 server1 postfix/qmgr[22591]: 0398F2AF17: removed Jan 31 15:36:06 server1 postfix/local[23650]: D16DB2AF19:
to=<root@server1.example.com>, orig_to=<wwwrun@server1.example.com>,
relay=local, delay=1, status=sent (delivered to maildir) Jan 31 15:36:06 server1 postfix/qmgr[22591]: D16DB2AF19: removed Jan 31 15:36:49 server1 pop3d: Connection, ip=[::ffff:68.35.83.14] Jan 31 15:36:50 server1 pop3d: LOGIN, user=visionscreativematting.com_steve,
ip=[::ffff:68.35.83.14]
Jan 31 15:36:51 server1 pop3d: LOGOUT,
user=visionscreativematting.com_steve, ip=[::ffff:68.35.83.14], top=0, retr=0, time=1 Jan 31 15:37:39 server1 postfix/pickup[22590]: 5C9362AF24: uid=30 from=<wwwrun> Jan 31 15:37:39 server1 postfix/cleanup[23644]: 5C9362AF24:
message-id=<20060131223739.5C9362AF24@server1.example.com>
Jan 31 15:37:39 server1 postfix/qmgr[22591]: 5C9362AF24:
from=<wwwrun@server1.example.com>, size=2070, nrcpt=1 (queue active) Jan 31 15:37:40 server1 postfix/smtp[23646]: 5C9362AF24:
to=<palkat@aim.com>, relay=mailin-04.mx.aol.com[64.12.138.152], delay=1, status=bounced (host mailin-04.mx.aol.com[64.12.138.152] said: 550 REQUESTED ACTION NOT TAKEN: DNS FAILURE (in reply to MAIL FROM command)) Jan 31 15:37:40 server1 postfix/cleanup[23644]: D5D612AF25:
message-id=<20060131223740.D5D612AF25@server1.example.com>
Jan 31 15:37:40 server1 postfix/qmgr[22591]: 5C9362AF24: removed Jan 31 15:37:40 server1 postfix/qmgr[22591]: D5D612AF25: from=<>, size=3947,
nrcpt=1 (queue active)
Jan 31 15:37:41 server1 postfix/local[23650]: D5D612AF25:
to=<root@server1.example.com>, orig_to=<wwwrun@server1.example.com>,
relay=local, delay=1, status=sent (delivered to maildir) Jan 31 15:37:41 server1 postfix/qmgr[22591]: D5D612AF25: removed
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
configure as a secondary mail server xma General 6 15th February 2006 13:46
Email - Ueb-Miau mazhar Installation/Configuration 5 21st December 2005 10:01
Mail server jas_esp Server Operation 1 7th December 2005 18:17
Can't get MX for external mail server to work semmelbroesel Installation/Configuration 4 25th November 2005 17:48
The Perfect Setup Suse 9.3 - Postfix problems new_bee05 HOWTO-Related Questions 20 25th November 2005 02:30


All times are GMT +2. The time now is 12:10.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.