smtp auth
-
- Posts: 92
- Joined: Thu Sep 04, 2008 9:48 pm
smtp auth
Hi Dave. When I stopped receiving email alerts for a few days I discovered that my employer now enforces smtp auth for all outbound mail. Although I've now set all 4 smtp variables in System Configuration the alerts are still not being delivered. As an unrelated test I installed and configured sasl auth for Postfix on my Debian box (the one running FreeNATS) and I can send mail just fine from mailx. I'm unsure how to troubleshoot within FreeNATS and did not know if any logs would show the problem.
As always, thanks for your help!
Paul
As always, thanks for your help!
Paul
Re: smtp auth
Hi Paul,
Ok I have managed to replicate a problem with phpmailer sending via SMTP AUTH to some servers. It seems to be a bug within phpmailer.
The latest dev version now has phpmailer v 5.0.0 which appears to resolve this. I've been testing on UK ISPs etc and all seems fine now. If you continue to have problems I'll setup a SMTP AUTH server as a VM here and play more deeply.
So please try 1.04.3a at http://www.purplepixie.org/freenats/rel ... on=1.04.3a
(direct download link http://www.purplepixie.org/freenats/dow ... .3a.tar.gz )
If you continue to have problems then some logging output will hopefully point the way. To get this do the following:
Anyway - hope that helps and all is well with you.
Kind Regards,
Dave.
Ok I have managed to replicate a problem with phpmailer sending via SMTP AUTH to some servers. It seems to be a bug within phpmailer.
The latest dev version now has phpmailer v 5.0.0 which appears to resolve this. I've been testing on UK ISPs etc and all seems fine now. If you continue to have problems I'll setup a SMTP AUTH server as a VM here and play more deeply.
So please try 1.04.3a at http://www.purplepixie.org/freenats/rel ... on=1.04.3a
(direct download link http://www.purplepixie.org/freenats/dow ... .3a.tar.gz )
If you continue to have problems then some logging output will hopefully point the way. To get this do the following:
- Set the system variable log.level to 10 (to log everything)
Go into server/bin
Do: php logwatch.php -l 0 -f > logfile
Do a mail test or whatever fails
Control-C the logwatch
The error should be shown in the logfile on the lines containing Flush:Email
You will probably want to set log.level back aferward to avoid filling your log table too much
Anyway - hope that helps and all is well with you.
Kind Regards,
Dave.
-
- Posts: 92
- Joined: Thu Sep 04, 2008 9:48 pm
Re: smtp auth
Hi Dave.
I updated FreeNATS (only a filesystem update; should I update schema too?) I stopped receiving any alerts so I manually tested:
However, I checked and ../base/nats.php does exist.
Thanks!
Paul
I updated FreeNATS (only a filesystem update; should I update schema too?) I stopped receiving any alerts so I manually tested:
Code: Select all
sudo php /opt/freenats/server/bin/test-threaded.php
Warning: require(../base/nats.php): failed to open stream: No such file or directory in /opt/freenats/server/bin/include.php on line 3
Fatal error: require(): Failed opening required '../base/nats.php' (include_path='.:/usr/share/php:/usr/share/pear') in /opt/freenats/server/bin/include.php on line 3
Thanks!
Paul
Re: smtp auth
Hi Paul,
When using the relative file locations it can get a bit confusing and take your PWD rather than the script directory.
So try:
cd /opt/freenats/server/bin
sudo php test-threaded.php
And see what happens. As for the schema update if you were running the latest beta release then you should be fine (famous last words!).
Cheers,
Dave.
When using the relative file locations it can get a bit confusing and take your PWD rather than the script directory.
So try:
cd /opt/freenats/server/bin
sudo php test-threaded.php
And see what happens. As for the schema update if you were running the latest beta release then you should be fine (famous last words!).
Cheers,
Dave.
-
- Posts: 92
- Joined: Thu Sep 04, 2008 9:48 pm
Re: smtp auth
Ah, sorry about that. OK, here is the result now:
Code: Select all
paullanders@koha:/opt/freenats/server/bin$ sudo php ./test-threaded.php
test-threaded.sh: spawning node tester processes
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /opt/freenats/server/base/nats.db.inc.php on line 89
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /opt/freenats/server/base/nats.db.inc.php on line 84
Re: smtp auth
Paul,
I don't think any nodes are due to be tested perhaps?
Can you just try a "test" from the alert action? Try this with the logging script running I mentioned and see what happens.
Cheers,
Dave.
I don't think any nodes are due to be tested perhaps?
Can you just try a "test" from the alert action? Try this with the logging script running I mentioned and see what happens.
Cheers,
Dave.
-
- Posts: 92
- Joined: Thu Sep 04, 2008 9:48 pm
Re: smtp auth
Code: Select all
11:24:01 21/05/2009 2 DB:Query Query Failed: SELECT nodeid FROM fnnode WHERE nodeenabled>0 AND masterid="" ORDER
BY weight ASC
11:24:01 21/05/2009 2 DB:Query Query Error: Unknown column 'masterid' in 'where clause' (1054)
11:25:01 21/05/2009 2 DB:Query Query Failed: SELECT nodeid FROM fnnode WHERE nodeenabled>0 AND masterid="" ORDER
BY weight ASC
11:25:01 21/05/2009 2 DB:Query Query Error: Unknown column 'masterid' in 'where clause' (1054)
11:26:01 21/05/2009 2 DB:Query Query Failed: SELECT nodeid FROM fnnode WHERE nodeenabled>0 AND masterid="" ORDER
BY weight ASC
11:26:01 21/05/2009 2 DB:Query Query Error: Unknown column 'masterid' in 'where clause' (1054)
11:27:01 21/05/2009 2 DB:Query Query Failed: SELECT nodeid FROM fnnode WHERE nodeenabled>0 AND masterid="" ORDER
BY weight ASC
11:27:01 21/05/2009 2 DB:Query Query Error: Unknown column 'masterid' in 'where clause' (1054)
11:28:01 21/05/2009 2 DB:Query Query Failed: SELECT nodeid FROM fnnode WHERE nodeenabled>0 AND masterid="" ORDER
BY weight ASC
11:28:01 21/05/2009 2 DB:Query Query Error: Unknown column 'masterid' in 'where clause' (1054)
Paul
Re: smtp auth
CRAPIOLA! Je suis une IDIOITE!!
Yes - absolutely!!
Sorry!!
FYI you can manually do it with just a:
mysql -u USERNAME -pWHATEVER --force DATABASENAME < schema.upgrade.sql
Totally forgot masters hadn't made it into the beta yet.
ARGH!
Cheers,
Dave.
Yes - absolutely!!
Sorry!!
FYI you can manually do it with just a:
mysql -u USERNAME -pWHATEVER --force DATABASENAME < schema.upgrade.sql
Totally forgot masters hadn't made it into the beta yet.
ARGH!
Cheers,
Dave.
-
- Posts: 92
- Joined: Thu Sep 04, 2008 9:48 pm
Re: smtp auth
Hi Dave, here's where I stand:
This sucessfully tests the node and fires an alert.
No output to the console (I think it usually lists all nodes as they are tested?) and the only entries in my logfile reference the 2 node-side tests.
It's like the "node enabled" setting is ignored on all nodes.
UPDATE - I discovered that although "node enabled" is already checked on all my nodes, if I simply click the "Save Node Settings" nothing happens visually but it magically begins testing that node! Any ideas on that? I left 5 of my nodes in the "unfixed" state in case you need me to help troubleshoot the issue.
Thanks!
Paul
Code: Select all
# php tester.php test_node
Code: Select all
koha:/opt/freenats/server/bin# php ./test-threaded.php
test-threaded.sh: spawning node tester processes
It's like the "node enabled" setting is ignored on all nodes.
UPDATE - I discovered that although "node enabled" is already checked on all my nodes, if I simply click the "Save Node Settings" nothing happens visually but it magically begins testing that node! Any ideas on that? I left 5 of my nodes in the "unfixed" state in case you need me to help troubleshoot the issue.
Thanks!
Paul
-
- Posts: 92
- Joined: Thu Sep 04, 2008 9:48 pm
Re: smtp auth
Hi Dave.
We kinda got sidetracked from the smtp issue.
1. Currently if an alert is destined for an email address on our network it delivers fine. (The new smtp policies here will allow delivery without authentication if the recipient is within our domain. Outside our domain requires smtp authentication.)
2. If it is destined for a single address outside our domain, FreeNATS produces a small white bar at the top of the current window that says "SMTP Error: The following recipients failed: j.paul.landers@greatdomain.com "
3. If an alert has 2 email addresses separated by a comma, the alert produces the thin white line at the top of the current screen that says "Invalid address: paul.landers@greatdomain.com,dennis.crisp@greatdomain.com You must provide at least one recipient email address."
Thanks, Dave.
We kinda got sidetracked from the smtp issue.
1. Currently if an alert is destined for an email address on our network it delivers fine. (The new smtp policies here will allow delivery without authentication if the recipient is within our domain. Outside our domain requires smtp authentication.)
2. If it is destined for a single address outside our domain, FreeNATS produces a small white bar at the top of the current window that says "SMTP Error: The following recipients failed: j.paul.landers@greatdomain.com "
3. If an alert has 2 email addresses separated by a comma, the alert produces the thin white line at the top of the current screen that says "Invalid address: paul.landers@greatdomain.com,dennis.crisp@greatdomain.com You must provide at least one recipient email address."
Thanks, Dave.