SID-01068: Getting SMTP to work in new installation.
| Status: |
Answered |
TWiki version: |
4.3.1 |
Perl version: |
5.8.4 |
| Category: |
CategoryEmail |
Server OS: |
Linux twiki-vm 2.4.27-2-386 |
Last update: |
14 years ago |
Hello,
I'd like to use email notifications in a new installation using
TWikiVMDebianStable but have been unable to configure the correct combination of settings so far.
From what I've read it should just be a case of setting the correct parameters in Configure but I've gone around in circles with it including looking at exim4 in the vm to see if I can run a successful mail command to test the basics (I don't know if it should work on our domain using NAT or if the vm should be bridged with a static IP).
The settings I think we need are;
- {MailProgram} left empty
- {SMTP}{MAILHOST} set to our exchange server (I've tried both by name and by IP)
- {SMTP}{SENDERHOST} set to our exchange server (fully qualified domain name)
- {SMTP}{Username} and {SMTP}{Password} left blank.
With regard to those last two settings - I've tried with valid logon details and with using Basic Authentication only on the server.
We are using Exchange 2010 which is set to receive email from all but maybe it still needs a separate connector for the vm or host?
I've not had a lot of joy either finding log files etc and the extract below from /home/httpd/twiki/data/warn... is the closest I can get to an error.
| 2010-12-17 - 14:27 | ERROR: Can't send mail using Net::SMTP. Can't connect to 'ourserver.ourdomain' at /home/httpd/twiki/lib/TWiki/Net.pm line 450. TWiki::Net::_sendEmailByNetSMTP('TWiki::Net=HASH(0x8c0e6fc)', 'Date: Fri, 17 Dec 2010 13:25:15 GMT\x{a}From: TWiki Administrator...') called at /home/httpd/twiki/lib/TWiki/Net.pm line 332 TWiki::Net::__ANON__() called at /home/httpd/twiki/lib/CPAN/lib//Error.pm line 379 eval {...} called at /home/httpd/twiki/lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x8c474cc)', 'HASH(0x86c3a34)') called at /home/httpd/twiki/lib/TWiki/Net.pm line 350 TWiki::Net::sendEmail('TWiki::Net=HASH(0x8c0e6fc)', 'From: TWiki Administrator <user@ourdomain>\x{a}To: Michael ...') called at /home/httpd/twiki/lib/TWiki/UI/Register.pm line 1003 TWiki::UI::Register::_emailRegistrationConfirmations('TWiki=HASH(0x81605f0)', 'HASH(0x8ab2fc0)') called at /home/httpd/twiki/lib/TWiki/UI/Register.pm line 832 TWiki::UI::Register::complete('TWiki=HASH(0x81605f0)') called at /home/httpd/twiki/lib/TWiki/UI/Register.pm line 353 TWiki::UI::Register::registerAndNext('TWiki=HASH(0x81605f0)') called at /home/httpd/twiki/lib/TWiki/UI/Register.pm line 109 TWiki::UI::Register::register_cgi('TWiki=HASH(0x81605f0)') called at /home/httpd/twiki/lib/TWiki/UI.pm line 166 TWiki::UI::__ANON__() called at /home/httpd/twiki/lib/CPAN/lib//Error.pm line 379 eval {...} called at /home/httpd/twiki/lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x814ccd8)', 'HASH(0x8569120)') called at /home/httpd/twiki/lib/TWiki/UI.pm line 204 TWiki::UI::run('CODE(0x82b7c5c)', 'register', 1) called
--
MichaelLennon - 2010-12-24
Discussion and Answer
Hello.
In SENDERHOST use the IP or domain name of the twiki server.
Are you sure the SMTP}{Username} and {SMTP}{Password} are supposed to be blank? Most of mail servers require SMTP authentication, so use some credentials there and test again.
In the
TWikiVMDebianStable open a command console and "ping your-mail-server-IP" to be sure you are reaching the mail server.
--
EnriqueCadalso - 2011-01-01
Hi Enrique and thanks for the reply.
I've changed SENDERHOST to the IP of the virtual machine which is a 192.168 address (our domain is using 10.1.2.0) and entered credentials for SMTP authentication.
I don't want to create any more accounts on twiki to test notification - do you know if a mail test from the command line on the vm will give a result once it's working (no joy after the latest changes)?
--
MichaelLennon - 2011-01-05
Meant to say - I can ping the mail server ok from the vm by IP and name.
--
MichaelLennon - 2011-01-05
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2011-05-02
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.