XF 1.4 Bounced Email Address

That looks correct (https://support.google.com/mail/troubleshooter/1668960?hl=en#ts=1665018,1665144). It just appears to be a timeout error though. This might indicate that there's a firewall blocking external requests like this.

Hi Mike. Where can I find firewall settings? Is it in my server or gmail?

As Mike said, if you are using CSF on your server, make sure outbound port 993 is listed in the csf.conf (both IPV4 and IPV6 segments).

Hi Tracy. What is CSF and where can I find it? Assuming you post is for me. :)
 
It depends on if you are on a shared hosting (which it appears that at the least you are using cPanel or something similar) or a VPS/dedi.
If VPS/Dedi, CSF would be located in /etc/csf and the file is csf.conf (but you have to be logged in as root user to modify it, much less access the /etc/csf directory).
If on a shared hosting environment then check with your hosting provider to see if they have those ports for outbound blocked.
 
It depends on if you are on a shared hosting (which it appears that at the least you are using cPanel or something similar) or a VPS/dedi.
If VPS/Dedi, CSF would be located in /etc/csf and the file is csf.conf (but you have to be logged in as root user to modify it, much less access the /etc/csf directory).
If on a shared hosting environment then check with your hosting provider to see if they have those ports for outbound blocked.

Thanks Tracy. I'm on shared hosting so I'll contact them and get back here after. ;)
 
Update: I just check it with my host and found this statement. Does this mean that I won't be able to use automatic bounce handling?

With a dedicated IP address on your account, we can generally open any port over 1024. Ports 1024 and lower are restricted and cannot be opened.
 
It sounds like they think you want to open a port for incoming connections. That's not at all what you're trying to do. (You're just trying to make sure that the outgoing connection to the Gmail IMAP server works.)
 
It sounds like they think you want to open a port for incoming connections. That's not at all what you're trying to do. (You're just trying to make sure that the outgoing connection to the Gmail IMAP server works.)

I explained this to my host and here's what they said..
I'm not sure I understand your question.. Our mail server can't connect to gmail via imap--gmail only uses pop3.

When i changed it to pop3 I got this error..

Code:
Error Info
 
Zend_Mail_Protocol_Exception: cannot connect to host; error = Connection timed out (errno = 110 ) - library/Zend/Mail/Protocol/Pop3.php:109
Generated By: Unknown Account, 7 minutes ago
 
Stack Trace
 
#0 /public_html/library/Zend/Mail/Storage/Pop3.php(190): Zend_Mail_Protocol_Pop3->connect('pop.gmail.com', 995, 'SSL')
#1 /public_html/library/XenForo/Model/EmailBounce.php(288): Zend_Mail_Storage_Pop3->__construct(Array)
#2 /public_html/library/XenForo/Deferred/EmailBounce.php(19): XenForo_Model_EmailBounce->openBounceHandlerConnection()
#3 /public_html/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_EmailBounce->execute(Array, Array, 7.9999978542328, '')
#4 /public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999978542328, '', false)
#5 /public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#6 /public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#7 {main}
 
 
Request State
array(3) {
  ["url"] => string(43) "http://www.pinoyexpatforum.com/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(10) "/index.php"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I explained this to my host and here's what they said..
Well, Gmail does support POP3 and IMAP. But you can see that the same error happens with the POP3 details.

It's not their mail server; it's whatever server is running your site as it's PHP connecting.

Unfortunately, if you're host can't help with this, the only alternatives would be to use a different account for handling bounces (assuming you can connect to that mail server), disable automated bounce handling, or change to a different host.
 
Well, Gmail does support POP3 and IMAP. But you can see that the same error happens with the POP3 details.

It's not their mail server; it's whatever server is running your site as it's PHP connecting.

Unfortunately, if you're host can't help with this, the only alternatives would be to use a different account for handling bounces (assuming you can connect to that mail server), disable automated bounce handling, or change to a different host.

I'm getting confused now. They told me to create an email account from my host then retrieve the messages to gmail. Will that work?

I tried their suggestion and got this error.
Code:
Error Info
 
Zend_Mail_Transport_Exception: Email to pameladawnr@gmail.com failed: Unable to send mail. - library/Zend/Mail/Transport/Sendmail.php:137
Generated By: Unknown Account, 1 minute ago
 
Stack Trace
 
#0 /public_html/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /public_html/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /public_html/library/XenForo/Model/MailQueue.php(71): Zend_Mail->send(Object(Zend_Mail_Transport_Sendmail))
#3 /public_html/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.9999959468842)
#4 /public_html/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_MailQueue->execute(Array, Array, 7.9999959468842, '')
#5 /public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999959468842, '', false)
#6 /public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#7/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#8 {main}
 
 
Request State
 
array(3) {
  ["url"] => string(43) "http://www.pinoyexpatforum.com/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(18) "/index.php?portal/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
 
Last edited:
I'm getting confused now. They told me to create an email account from my host then retrieve the messages to gmail. Will that work?
No, that doesn't really make sense to me. I'm not sure what they're trying to suggest/imply there.

The error you showed there is unrelated to email bounce handling; it's email sending. I'm not sure what changes happened (in XF and server config), but one of those changes likely interfered.
 
Update: It worked after I restarted the firewall, so this can be ignored... except the question I added at the bottom.

I'm getting the same error as @clove28.
Code:
Zend_Mail_Protocol_Exception: cannot connect to host; error = Connection timed out (errno = 110 ) - library/Zend/Mail/Protocol/Imap.php:100
Generated By: Unknown Account, 1 minute ago
Stack Trace
#0 /public_html/library/Zend/Mail/Storage/Imap.php(273): Zend_Mail_Protocol_Imap->connect('imap.gmail.com', 993, 'SSL')
#1 /public_html/library/XenForo/Model/EmailBounce.php(292): Zend_Mail_Storage_Imap->__construct(Array)
#2 /public_html/library/XenForo/Deferred/EmailBounce.php(19): XenForo_Model_EmailBounce->openBounceHandlerConnection()
#3 /public_html/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_EmailBounce->execute(Array, Array, 7.99999713898, '')
#4 /public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.99999713898, '', false)
#5 /public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#6 /public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#7 {main}
Request State
array(3) {
["url"] => string(39) "http://explodingrabbit.com/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(28) "/admin.php?logs/server-error"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}

I followed @Tracy Perry's instructions and added 993 my csf.conf file. Specifically, I added it to TCP_OUT, UDP_OUT, TPC6_OUT, and UDP6_OUT.

I checked my headers, and the emails have this return path in the header:
Code:
Return-Path: <emailbouncer+f5948576+contact=explodingrabbit.com@explodingrabbit.com>

I'm using Gmail IMAP with these settings:
  • imap.gmail.com
  • Port: 993
  • Requires SSL:Yes
Does anyone know what the problem could be? Thanks for your help.

Edit: Did I need to add the port to all 4 parts of csf.conf? (TCP_OUT, UDP_OUT, TPC6_OUT, UDP6_OUT)
 
Last edited:
Edit: Did I need to add the port to all 4 parts of csf.conf? (TCP_OUT, UDP_OUT, TPC6_OUT, UDP6_OUT)
If your server has IPv6 enabled, then yes, you do. I've found that frequently the connections to google are via IPv6 instead of IPv4.
If you don't need IPv6 compatibility then disable it and you won't have to worry about it. It's still a good idea to put it in all 4 places though.... but in your case you really need it on the outbound since you aren't doing the inbound (if you are not connecting from a client to your MTA from remote).
 
Would there be an issue using a gmail address as the bounced email address?

It won't throw any spam trigger warnings seeing as the gmail.com domain doesn't match the forum domain?

I've been trying to get my head around this all evening. I have a VPS with WHM/cPanel and I setup a bounce@domain.com email.

It turns out that cPanel does accept bounce+test@domain.com in the email addresses, but it puts those emails into a folder labelled by whatever follows the + sign, in this case 'test', so it doesn't get picked up by XF.

I'm thinking it might be easier to just make a forumbounce@gmail.com and use that as it will handle the + and I can therefore enable variable bounced email address values, is that a bad idea?
 
It turns out that cPanel does accept bounce+test@domain.com in the email addresses, but it puts those emails into a folder labelled by whatever follows the + sign, in this case 'test', so it doesn't get picked up by XF.
Odds are it's an MTA setting you can set in the config file for it. Depends on if you are using Exim or Postfix as your MTA.

For Postfix it's usually simply adding the
Code:
recipient_delimiter = +
to the main.cf.

Not sure for Exim since I don't use it (and won't as I prefer Postfix myself).
I think (from doing some basic research) the equivalent would be adding
Code:
local_part_suffix = +*
local_part_suffix_optional
to the "userforward:" and the "localuser:" router in /etc/exim/exim.conf.
http://www.faqs.org/faqs/mail/addressing/
 
Last edited:
Thanks, I just spent a while reading up about MTA, exim etc. it's all new jargon for me.

I found some info on Exim in WHM and a config editor. It seems your code posted above was already added for 'localuser'

I'm not sure I should play with those settings, I feel a bit in over my head there and don't want to break anything. Might just look into signing up with one of the dedicated mail services if I run into issues down the line.
 
Top Bottom