Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DW

Pages: 1 2 [3] 4 5 ... 250
31
Hi Judy,

ListMailPRO can work fine on any version of PHP, however there are occasional issues depending on server OS, configuration, etc.

I recommend upgrading to any stable version you like. If you have any issues please check the forum to see if it's been covered, post a new topic, or start an "Other / Bug Investigation" support ticket at https://listmailpro.com/support.

Regards

32
General Help & How-To / Re: Queue stuck
« on: February 24, 2015, 06:43:02 pm »
Hi Brett,

Quote
How would I get the SMTP log to write, when this is a Dailymail send that is stuck right now?  If I turn on SMTP logging, that will not record anything for that (Dailymail) send, correct?  So, I would be stuck to looking at the SMTP log on the next one, right?

When you Resume any queue, including a Dailymail queue, the SMTP log is written, if enabled.

Quote
When I did have SMTP logging on, I was getting 0 byte log files, I just deleted hundreds of them.  What would cause that?

Are you out of disk space?

Regards

33
General Help & How-To / Re: Finding bad Queue Entires???
« on: February 24, 2015, 07:44:55 am »
Hi Brett,

The best place for more clues is the SMTP log. What does the end of the log say when it won't send?

The $smtp_timeout adjustment is only effective if the problem is identified as individual emails timing out when queuing to the server due to DNS delays or other. You may see evidence of this in the SMTP log.

It is difficult and time consuming to make further guesses at a possible cause or solution.

If you still can't figure it out please create a support ticket of the type Other/Bug Investigation at https://listmailpro.com/support

Regards

34
General Help & How-To / Re: Finding bad Queue Entires???
« on: February 12, 2015, 05:24:59 am »
Hi Brett,

Quote
1.) Can you please tell me - what is the proper way to convert lm_sendq/uid field into the uid field that appears in lm_users?

The uid field in lm_sendq corresponds with the id field in lm_users, so you could do the following, where "123" is the UID from the lm_sendq table.

Code: [Select]
SELECT uid FROM lm_users WHERE id = '123';
There is no other way to convert, per se, as the lm_users uid is simply randomly generated.

Quote
2.) Are the queued entries that are stuck/jammed, coming from the TOP of the lm_sendq database, or the BOTTOM of the lm_sendq database?  In other words, when I am looking up 'stuck queue entries', do I assume that it is RECORD #1 that is stuck and cannot send, or is it the LAST RECORD in lm_sendq that is stuck?  Does it go sequentially after that?

The queue-reading process does not use an ORDER BY clause so the order cannot be guaranteed...

Messages may be "timing out", causing confusion in the sending process. You could try increasing the SMTP timeout per this and other posts.

The best way to see what's happening is with the SMTP log.

Regards

35
Development, Suggestions / Re: Enhancementt to Scheduled Emails
« on: February 08, 2015, 06:51:43 am »
Hi Steve,

Thanks for the suggestion. Indeed, this has been requested a few times... Until it's implemented, here's a hack:

http://listmailpro.com/forum/customization-integration/send-scheduled-messages-at-different-times-each-day-v1-88-mod/

Regards

36
Until this becomes a feature, here's a hack:

Copy dailymail.php to dailymail2.php. Edit dailymail2.php as follows:

Change "2" to "99" on line 146:

Code: [Select]
$batid = qstart(99);
This prevents the Dailymail report from being sent when there are messages.

--------------------

Add ",date" to line 446:

Code: [Select]
   $qrows = mysql_query("select id,list,subject,message,htmessage,fattach,date from $qtable where date <= '".date("Y-m-d")."' and type = 'm' order by id");
Add ",$qdate" to line 449:

Code: [Select]
    while(list($qid,$qlist,$qsubj,$qmsg,$qhtmsg,$qfatt,$qdate)=@mysql_fetch_row($qrows)){
The queued date is retrieved for comparison later.

--------------------

Add " && false" to line 848:

Code: [Select]
  if($sendq==0 && false){
This disables the Dailymail Report when there are no messages.

--------------------

Add this starting at line 450, after the line "while(list($qid ...":

Code: [Select]
     // BEGIN TIME MOD
     $dstime='0000'; // default sending time 0000 to 2359
     list($stime)=explode(' ',$qsubj);
     if(is_numeric($stime) && strlen($stime)==4) $qsubj=substr($qsubj,strpos($qsubj,' ')+1); else $stime=$dstime;
     if(round($stime)>date("Gi") && $qdate==date("Y-m-d")) continue;
     // END TIME MOD

This checks the subject for the time and removes it if found, and skips sending if a message is scheduled for later than the current day and time.

--------------------

If you're using the optional daily-xtra.php script, "comment out" lines 841-845, like so:

Code: [Select]
// if(file_exists('./daily-xtra.php')){
//    if($outp) echo "Running daily-xtra.php..<br>";
//    include('./daily-xtra.php');
//    mysql_select_db($sqldb);
//  }

--------------------

Notes / instructions:

- Add &nosched=1 to the regular dailymail.php once-per-day cron task to suppress scheduled message processing, e.g. as follows (note: quotes around URL are important):

Code: [Select]
0 0 * * * /usr/bin/wget -O /dev/null -T 0 "http://example.com/mail/dailymail.php?pw=YourDailyMailPass&nosched=1" 1>/dev/null 2>&1
- Schedule the modified (see above) dailymail2.php script for every 15 or 30 minutes, skipping 'last ran' checking and updating and suppressing all but scheduled messages, e.g. as follows:

Code: [Select]
*/15 * * * * /usr/bin/wget -O /dev/null -T 0 "http://example.com/mail/dailymail2.php?pw=YourDailyMailPass&warn=no&nolastran=1&nomaint=1&nofups=1&nobounce=1&noscfup=1&noremind=1" 1>/dev/null 2>&1
- There is currently no report sent to the admin when scheduled messages are sent. It is recommended to set up test addresses on your lists and perhaps enable the SMTP log temporarily to ensure everything is being sent to the server as expected. A custom report could be added fairly easily but I wanted to publish the mod in its simplest form first and foremost.

- To schedule by time, add 4 digits and a space to the beginning of the subject when scheduling messages, e.g. "1234 Example Subject". The dailymail2.php script will read the digits as the time to send (0000 to 2359), and remove them automatically before sending. Note that if any combination other than 4 digits and a space appears it will NOT be processed or removed and the default time as configured in the mod (above set to 0000, midnight) will be used instead.

- All times use the server time zone which can be viewed on the Dailymail page within LMP.

37
General Help & How-To / Re: Finding bad Queue Entires???
« on: January 03, 2015, 01:45:31 am »
Hi Brett,

Quote
When the queue resumes, will it write the log

Yes, you should not have to cancel your queues. The logs should appear in the /attach folder, which must have the correct permissions (777 or read/write/execute for all).

Quote
What is the preferred way to turn off the DNS lookup ... Is it only possible to make those changes in the mail server

Yes, if this is the problem, and I've only heard of it being a problem on sendmail systems, the mail server config could be updated.

Regards

38
General Help & How-To / Re: Finding bad Queue Entires???
« on: December 30, 2014, 06:27:24 am »
Hi,

The SMTP log will likely indicate which email address is holding things up. It may end up eventually timing out and skipping the user. Such things sometimes happen when a server does a long or failing DNS lookup. The mail server may be able to be configured to delay lookups until sending time and not do them during queuing which could eliminate the symptoms.

Regards

39
General Help & How-To / Re: Virus and Security problems with ListMailPRO?
« on: December 17, 2014, 04:17:09 am »
Hi Brett,

It looks like the content, domain or some part of the URL has been listed in an anti-virus system. If it were me I would email the host and assure them I am not hosting any viruses on my site and ask that they flag the link or content as safe.

It may also be worthwhile to find out what anti-virus system they use so it could further be determined if this is server-specific or a more widespread issue, and if the flag is based on content, domain, the structure of LMP links or something else.

This does not as yet appear to be a security problem at all.

Regards

40
General Help & How-To / Re: database install problem
« on: December 14, 2014, 06:43:25 pm »
Hi Franklin,

It appears your server has some strict MySQL modes enabled that can interfere with certain LMP database insertions. I added the following near the bottom of admin.php after the database connection is established to clear the modes:

Code: [Select]
mysql_query("SET SESSION sql_mode=''");
Please let me know if you continue to have troubles.

Regards

41
General Help & How-To / Re: database install problem
« on: December 11, 2014, 12:01:41 pm »
Hi Franklin,

Your server may have a special MySQL configuration that isn't compatible with LMP. For me to assist further please submit your hosting information at http://listmailpro.com/support under the type Other/Bug Investigation.

Regards

42
General Help & How-To / Re: 1and1 SMTP Question
« on: December 10, 2014, 04:37:53 am »
Hi Franklin,

The SMTP restrictions only applied to 1&1's shared hosting. I am not sure if they are still in place.

With a VPS you have full control over the operating system and your own dedicated IP, so it's extremely unlikely for email to be restricted, particularly because your actions won't potentially harm other users such as with shared hosting where multiple sites use the same IP.

Regards

43
Hi Brett,

Quote
I'm hoping that Dean (the author of LMP), can soon provide us with a method to setup/configure Amazon SES with Amazon SNS to track complaints/bounces of messages

Try this:
Code: [Select]
<?php
// LMP Amazon SES SNS Complaint & Bounce Processing
// based on https://github.com/npflood/AWS-SNS-HTTP-PHP-ENDPOINT/blob/master/receiver.php
//
// Name this file ses_bounce.php or similar, put it in your LMP folder, and (after configuring below) set its URL as an SNS HTTP endpoint (also configure SES to publish to the SNS topic)
// Change $allowedTopic below to your full SNS topic
// Change $sourceDomain below to suit your region
// see bottom for LMP

//////
//// CONFIGURATION
//////
//For Debugging.
$logToFile false;
//Should you need to check that your messages are coming from the correct topicArn
$restrictByTopic true;
$allowedTopic "arn:aws:sns:us-west-2:100885381234:SES_Complaints_and_Bounces";
//For security you can (should) validate the certificate, this does add an additional time demand on the system.
//NOTE: This also checks the origin of the certificate to ensure messages are signed by the AWS SNS SERVICE.
//Since the allowed topicArn is part of the validation data, this ensures that your request originated from
//the service, not somewhere else, and is from the topic you think it is, not something spoofed.
$verifyCertificate true;
$sourceDomain "sns.us-west-2.amazonaws.com";
 
//////
//// OPERATION
//////
$signatureValid false;
$safeToProcess true//Are Security Criteria Set Above Met? Changed programmatically to false on any security failure.
if($logToFile){
////LOG TO FILE:
$dateString date("Ymdhis");
$dateString $dateString."_r.txt";
$myFile $dateString;
$fh fopen($myFile'w') or die("Log File Cannot Be Opened.");
}
//Get the raw post data from the request. This is the best-practice method as it does not rely on special php.ini directives
//like $HTTP_RAW_POST_DATA. Amazon SNS sends a JSON object as part of the raw post body.
$json json_decode(file_get_contents("php://input"));
//Check for Restrict By Topic
if($restrictByTopic){
if($allowedTopic != $json->TopicArn){
$safeToProcess false;
if($logToFile){
fwrite($fh"ERROR: Allowed Topic ARN: ".$allowedTopic." DOES NOT MATCH Calling Topic ARN: "$json->TopicArn "\n");
}
}
}
//Check for Verify Certificate
if($verifyCertificate){
//Check For Certificate Source
$domain getDomainFromUrl($json->SigningCertURL);
if($domain != $sourceDomain){
$safeToProcess false;
if($logToFile){
fwrite($fh"Key domain: " $domain " is not equal to allowed source domain:" .$sourceDomain"\n");
}
}



//Build Up The String That Was Originally Encoded With The AWS Key So You Can Validate It Against Its Signature.
if($json->Type == "SubscriptionConfirmation"){
$validationString "";
$validationString .= "Message\n";
$validationString .= $json->Message "\n";
$validationString .= "MessageId\n";
$validationString .= $json->MessageId "\n";
$validationString .= "SubscribeURL\n";
$validationString .= $json->SubscribeURL "\n";
$validationString .= "Timestamp\n";
$validationString .= $json->Timestamp "\n";
$validationString .= "Token\n";
$validationString .= $json->Token "\n";
$validationString .= "TopicArn\n";
$validationString .= $json->TopicArn "\n";
$validationString .= "Type\n";
$validationString .= $json->Type "\n";
}else{
$validationString "";
$validationString .= "Message\n";
$validationString .= $json->Message "\n";
$validationString .= "MessageId\n";
$validationString .= $json->MessageId "\n";
if($json->Subject != ""){
$validationString .= "Subject\n";
$validationString .= $json->Subject "\n";
}
$validationString .= "Timestamp\n";
$validationString .= $json->Timestamp "\n";
$validationString .= "TopicArn\n";
$validationString .= $json->TopicArn "\n";
$validationString .= "Type\n";
$validationString .= $json->Type "\n";
}
if($logToFile){
fwrite($fh"Data Validation String:");
fwrite($fh$validationString);
}

$signatureValid validateCertificate($json->SigningCertURL$json->Signature$validationString);

if(!$signatureValid){
$safeToProcess false;
if($logToFile){
fwrite($fh"Data and Signature Do No Match Certificate or Certificate Error.\n");
}
}else{
if($logToFile){
fwrite($fh"Data Validated Against Certificate.\n");
}
}
}
if(
$safeToProcess){
//Handle A Subscription Request Programmatically
if($json->Type == "SubscriptionConfirmation"){
//RESPOND TO SUBSCRIPTION NOTIFICATION BY CALLING THE URL

if($logToFile){
fwrite($fh$json->SubscribeURL);
}

$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,$json->SubscribeURL);
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
curl_exec($curl_handle);
curl_close($curl_handle);
}


//Handle a Notification Programmatically
if($json->Type == "Notification"){
//Do what you want with the data here.
//fwrite($fh, $json->Subject);
//fwrite($fh, $json->Message);
}
}
//Clean Up For Debugging.
if($logToFile){
ob_start();
print_r$json );
$output ob_get_clean();
fwrite($fh$output);
////WRITE LOG
fclose($fh);
}
//A Function that takes the key file, signature, and signed data and tells us if it all matches.
function validateCertificate($keyFileURL$signatureString$data){

$signature base64_decode($signatureString);


// fetch certificate from file and ready it
$fp fopen($keyFileURL"r");
$cert fread($fp8192);
fclose($fp);

$pubkeyid openssl_get_publickey($cert);

$ok openssl_verify($data$signature$pubkeyidOPENSSL_ALGO_SHA1);


if ($ok == 1) {
    return true;
} elseif ($ok == 0) {
    return false;
    
} else {
    return false;
}
}
//A Function that takes a URL String and returns the domain portion only
function getDomainFromUrl($urlString){
$domain "";
$urlArray parse_url($urlString);

if($urlArray == false){
$domain "ERROR";
}else{
$domain $urlArray['host'];
}

return $domain;
}

// LMP - Process Bounce or Complaint
// per http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-examples.html
include('./config.php');
include(
'./admin.php');
if(
$json->notificationType=='Bounce'){
if($json->bounce->bounceType=='Permanent'){
foreach($json->bounce->bouncedRecipients as $r){
// set user to bounced
mysql_query("UPDATE $utable SET cnf = '3' WHERE email LIKE '".addslashes($r->emailAddress)."';") or die(mysql_error());
}
}
} elseif(
$json->notificationType=='Complaint'){
foreach($json->complaint->complainedRecipients as $r){
// set user to removed
mysql_query("UPDATE $utable SET cnf = '2' WHERE email LIKE '".addslashes($r->emailAddress)."';") or die(mysql_error());
}
}

?>

I'll have to consider the queue size issue further.

Regards

44
General Help & How-To / Re: SMTP with Amazon SES Problem
« on: November 23, 2014, 08:00:41 pm »
Hi Franklin,

There are a lot of hosts out there, many more permissive than GoDaddy. You'll have to ask to be sure if they support PHP connections to external servers like Amazon SES.

I just updated our Email Hosting page. Perhaps you will find something there.

Regards

45
General Help & How-To / Re: SMTP with Amazon SES Problem
« on: November 23, 2014, 06:04:49 pm »
Quote
on the phone with my hosting support they confirmed that port 465 is open

and now I am getting 2 errors when trying to connect throguh LMP

Please mention to your host that we need to connect TO email-smtp.us-east-1.amazonaws.com on port 465 using PHP fsockopen() with TLS encryption enabled and it's not working due to DNS or other. You can send them a link to this thread. I recommend starting a support ticket if they offer that rather than phoning as it may take them some time to diagnose and fix.

Required of the host is:
  • The unrestricted ability to connect via PHP sockets
  • PHP support for SSL/TLS connections
  • A working DNS system (Your host seems to be giving DNS errors)

Regards

Pages: 1 2 [3] 4 5 ... 250