Page 1 of 1

How do I setup bounce mailbox using a SSL/TLS connection?

PostPosted: 5:51pm, Thu 15 Jan, 2015
by urbanmagic
How can I correctly setup the bounce mailbox using a SSL/TLS connection?
At the moment I am using this configuration;

Code: Select all
# when the protocol is pop, specify these three
$bounce_mailbox_host = 'mail.domain.com';
$bounce_mailbox_user = 'bounces@domain.com';
$bounce_mailbox_password = 'password';

# the "port" is the remote port of the connection to retrieve the emails
# the default should be fine but if it doesn't work, you can try the second
# one. To do that, add a # before the first line and take off the one before the
# second line
$bounce_mailbox_port = "993/imap/ssl/tls";
#$bounce_mailbox_port = "110/pop3";


When I run the setup I get the message:
Running in testmode, no emails will be sent. Check your config file.

This information was provided by my hosting company
imap: mail.domain.com
port: 993
SSL: SSL/TLS
Authentication: Normal password


After looking at http://www.php.net/manual/en/ref.imap.php I still don’t know how to use the parameters.


Full code
Code: Select all
<?php

/*

* ==============================================================================================================
*
*
* The minimum requirements to get phpList working are in this file.
* If you are interested in tweaking more options, check out the config_extended.php file
* or visit http://resources.phplist.com/system/config
*
* ** NOTE: To use options from config_extended.php, you need to copy them to this file **
*
==============================================================================================================

*/

# what is your Mysql database server hostname
$database_host = "localhost";

# what is the name of the database we are using
$database_name = "database";

# what user has access to this database
$database_user = "database";

# and what is the password to login to control the database
$database_password = 'password';

# if you have an SMTP server, set it here. Otherwise it will use the normal php mail() function
## if your SMTP server is called "smtp.mydomain.com" you enter this below like this:
##
##     define("PHPMAILERHOST",'smtp.mydomain.com');

define("PHPMAILERHOST",'mail.domain.com');

# if test is true (not 0) it will not actually send ANY messages, but display what it would have sent
# this is here, to make sure you edited the config file and mails are not sent "accidentally"
# on unmanaged systems

define ("TEST",1);



/*

==============================================================================================================
*
* Settings for handling bounces
*
* This section is OPTIONAL, and not necessary to send out mailings, but it is highly recommended to correctly
* set up bounce processing. Without processing of bounces your system will end up sending large amounts of
* unnecessary messages, which overloads your own server, the receiving servers and internet traffic as a whole
*
==============================================================================================================

*/

# Message envelope.
#
# This is the address that most bounces will be delivered to
# Your should make this an address that no PERSON reads
# but a mailbox that phpList can empty every so often, to process the bounces

# $message_envelope = 'listbounces@yourdomain';

# Handling bounces. Check README.bounces for more info
# This can be 'pop' or 'mbox'
$bounce_protocol = 'pop';

# set this to 0, if you set up a cron to download bounces regularly by using the
# commandline option. If this is 0, users cannot run the page from the web
# frontend. Read README.commandline to find out how to set it up on the
# commandline
define ("MANUALLY_PROCESS_BOUNCES",1);

# when the protocol is pop, specify these three
$bounce_mailbox_host = 'mail.domain.com';
$bounce_mailbox_user = 'bounces@domain.com';
$bounce_mailbox_password = 'password';

# the "port" is the remote port of the connection to retrieve the emails
# the default should be fine but if it doesn't work, you can try the second
# one. To do that, add a # before the first line and take off the one before the
# second line
$bounce_mailbox_port = "993/imap/ssl/tls";
#$bounce_mailbox_port = "110/pop3";

# it's getting more common to have secure connections, in which case you probably want to use
#$bounce_mailbox_port = "995/pop3/ssl/novalidate-cert";

# when the protocol is mbox specify this one
# it needs to be a local file in mbox format, accessible to your webserver user
$bounce_mailbox = '/var/mail/listbounces';

# set this to 0 if you want to keep your messages in the mailbox. this is potentially
# a problem, because bounces will be counted multiple times, so only do this if you are
# testing things.
$bounce_mailbox_purge = 1;

# set this to 0 if you want to keep unprocessed messages in the mailbox. Unprocessed
# messages are messages that could not be matched with a user in the system
# messages are still downloaded into phpList, so it is safe to delete them from
# the mailbox and view them in phpList
$bounce_mailbox_purge_unprocessed = 1;

# how many bounces in a row need to have occurred for a user to be marked unconfirmed
$bounce_unsubscribe_threshold = 5;

# Default system language
$default_system_language = "nl";


Re: How do I setup bounce mailbox using a SSL/TLS connection

PostPosted: 12:18pm, Sat 17 Jan, 2015
by duncanc
You haven't explained what is actually happening. Have you tried these lines in config.php that provide an example of how to use SSL?
Code: Select all
# it's getting more common to have secure connections, in which case you probably want to use
#$bounce_mailbox_port = "995/pop3/ssl/novalidate-cert";

As you are using imap it should be
Code: Select all
$bounce_mailbox_port = "993/imap/ssl/novalidate-cert";

You also need to change the define of TEST from 1 to 0.

Re: How do I setup bounce mailbox using a SSL/TLS connection

PostPosted: 1:43pm, Sat 17 Jan, 2015
by urbanmagic
Unfortunately chaining the bounce mailbox port didn't solved it.
Code: Select all
$bounce_mailbox_port = "993/imap/ssl/novalidate-cert";


I am getting the message
Running in testmode, no emails will be sent. Check your config file.

All the configuration steps are marked greed

Re: How do I setup bounce mailbox using a SSL/TLS connection

PostPosted: 2:44pm, Sat 17 Jan, 2015
by Dragonrider
urbanmagic wrote:I am getting the message
Running in testmode, no emails will be sent. Check your config file.

All the configuration steps are marked greed


duncanc wrote:You also need to change the define of TEST from 1 to 0.

You obviously haven't followed Duncan's instruction. This is in line 37-42 in the default lists/config/config.php file

Re: How do I setup bounce mailbox using a SSL/TLS connection

PostPosted: 7:07pm, Sun 18 Jan, 2015
by urbanmagic
I had read the documention and tried out the installation on a local machine, with success. Using the pop protocol and parameter TEST stet to false
Code: Select all
define ("TEST",0);


Config. local machine

Code: Select all
# Handling bounces. Check README.bounces for more info
# This can be 'pop' or 'mbox'
$bounce_protocol = 'pop';

# set this to 0, if you set up a cron to download bounces regularly by using the
# commandline option. If this is 0, users cannot run the page from the web
# frontend. Read README.commandline to find out how to set it up on the
# commandline
define ("MANUALLY_PROCESS_BOUNCES",1);

# when the protocol is pop, specify these three
$bounce_protocol = 'pop';
$bounce_mailbox_host = 'smtp.telecomprofider.com';
$bounce_mailbox_user = 'info@telecomprofider.com';
$bounce_mailbox_password = 'xxxx';

# the "port" is the remote port of the connection to retrieve the emails
# the default should be fine but if it doesn't work, you can try the second
# one. To do that, add a # before the first line and take off the one before the
# second line
$bounce_mailbox_port = "110/pop3/notls";
#$bounce_mailbox_port = "110/pop3";

# it's getting more common to have secure connections, in which case you probably want to use
#$bounce_mailbox_port = "995/pop3/ssl/novalidate-cert";


But I do not understand how can install it on the server of my profiter using the settings
SSL/TLS that my hosting-service provides.

imap: mail.domain.com
port: 993
SSL: SSL/TLS
Authentication: Normal password


The documentation points to http://php.net/manual/en/ref.imap.php but that is gibberish to me. Is the way that I inputed the mail-settings correct?

Current settings at my profider
Code: Select all
    <?php

    /*

    * ==============================================================================================================
    *
    *
    * The minimum requirements to get phpList working are in this file.
    * If you are interested in tweaking more options, check out the config_extended.php file
    * or visit http://resources.phplist.com/system/config
    *
    * ** NOTE: To use options from config_extended.php, you need to copy them to this file **
    *
    ==============================================================================================================

    */

    # what is your Mysql database server hostname
    $database_host = "localhost";

    # what is the name of the database we are using
    $database_name = "database";

    # what user has access to this database
    $database_user = "database";

    # and what is the password to login to control the database
    $database_password = 'password';

    # if you have an SMTP server, set it here. Otherwise it will use the normal php mail() function
    ## if your SMTP server is called "smtp.mydomain.com" you enter this below like this:
    ##
    ##     define("PHPMAILERHOST",'smtp.mydomain.com');

    define("PHPMAILERHOST",'mail.domain.com');

    # if test is true (not 0) it will not actually send ANY messages, but display what it would have sent
    # this is here, to make sure you edited the config file and mails are not sent "accidentally"
    # on unmanaged systems

    define ("TEST",0);



    /*

    ==============================================================================================================
    *
    * Settings for handling bounces
    *
    * This section is OPTIONAL, and not necessary to send out mailings, but it is highly recommended to correctly
    * set up bounce processing. Without processing of bounces your system will end up sending large amounts of
    * unnecessary messages, which overloads your own server, the receiving servers and internet traffic as a whole
    *
    ==============================================================================================================

    */

    # Message envelope.
    #
    # This is the address that most bounces will be delivered to
    # Your should make this an address that no PERSON reads
    # but a mailbox that phpList can empty every so often, to process the bounces

    # $message_envelope = 'listbounces@yourdomain';

    # Handling bounces. Check README.bounces for more info
    # This can be 'pop' or 'mbox'
    $bounce_protocol = 'pop';

    # set this to 0, if you set up a cron to download bounces regularly by using the
    # commandline option. If this is 0, users cannot run the page from the web
    # frontend. Read README.commandline to find out how to set it up on the
    # commandline
    define ("MANUALLY_PROCESS_BOUNCES",1);

    # when the protocol is pop, specify these three
    $bounce_mailbox_host = 'mail.domain.com';
    $bounce_mailbox_user = 'bounces@domain.com';
    $bounce_mailbox_password = 'password';

    # the "port" is the remote port of the connection to retrieve the emails
    # the default should be fine but if it doesn't work, you can try the second
    # one. To do that, add a # before the first line and take off the one before the
    # second line
    $bounce_mailbox_port = "993/imap/ssl/novalidate-cert";
    #$bounce_mailbox_port = "110/pop3";

    # it's getting more common to have secure connections, in which case you probably want to use
    #$bounce_mailbox_port = "995/pop3/ssl/novalidate-cert";

    # when the protocol is mbox specify this one
    # it needs to be a local file in mbox format, accessible to your webserver user
    $bounce_mailbox = '/var/mail/listbounces';

    # set this to 0 if you want to keep your messages in the mailbox. this is potentially
    # a problem, because bounces will be counted multiple times, so only do this if you are
    # testing things.
    $bounce_mailbox_purge = 1;

    # set this to 0 if you want to keep unprocessed messages in the mailbox. Unprocessed
    # messages are messages that could not be matched with a user in the system
    # messages are still downloaded into phpList, so it is safe to delete them from
    # the mailbox and view them in phpList
    $bounce_mailbox_purge_unprocessed = 1;

    # how many bounces in a row need to have occurred for a user to be marked unconfirmed
    $bounce_unsubscribe_threshold = 5;

    # Default system language
    $default_system_language = "nl";



Re: How do I setup bounce mailbox using a SSL/TLS connection

PostPosted: 7:38pm, Sun 18 Jan, 2015
by duncanc
You will need to explain what happens and is displayed when you run the process bounces menu item.

Re: How do I setup bounce mailbox using a SSL/TLS connection

PostPosted: 10:18am, Sat 24 Jan, 2015
by urbanmagic
I have asked my provider and the send me some information.

- Pop poort: 995
- Imap poort 993
- Server outgoing e-mail (SMTP): mail.provider.com
- SSL enabled: Yes
- Poort: 587 (alternative: 465)
- Authentication: Yes (password)

Re: How do I setup bounce mailbox using a SSL/TLS connection

PostPosted: 7:01pm, Sat 24 Jan, 2015
by duncanc
So try this value

Code: Select all
$bounce_mailbox_port = "995/pop3/ssl/novalidate-cert";

but so far you have not explained what happens when you try to process bounces. Unless you do that then we won't be able to help you.

Re: How do I setup bounce mailbox using a SSL/TLS connection

PostPosted: 11:19am, Mon 26 Jan, 2015
by urbanmagic
The process bounces menu displays the following

1 bounces to fetch from the mailbox
Please do not interrupt this process
Closing mailbox, and purging messages
Identifying consecutive bounces
Nothing to do
total of 0 subscribers processed


I have added some test emails to the list and tried to send out a test mail using the test email function at the bottom of the send a campaign page

Re: How do I setup bounce mailbox using a SSL/TLS connection

PostPosted: 12:15pm, Mon 26 Jan, 2015
by duncanc
The settings are correct as phplist is retrieving an email from the bounce mailbox.

If you go to the View Bounces page then it might be shown under the Unidentified view, which means phplist was not able to match the bounce to a subscriber or email.