Question
Basically, our TWiki email functionality isn't working yet. User Registration was hanging, so we disabled the email and
WebNotify isn't working either. In Mail Settings, I've tried known SMTP Mail and Sender Hosts. Exchange Server port 25 is also closed and I'm not sure if I have to enable Relaying settings in Exchange or if I may just have the SMTP server incorrect. What should I check? Where should I look?
Thanks in advance.
Environment
--
TWikiGuest - 16 Jun 2006
Answer
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.
At least you need to be able to telnet the server you are going to use at port 25 and be able deliver an e-mail "by hand".
Until this is achieved, I think using some Microsoft-oriented support is the best bet (perhaps a newsgroup dedicated to this?).
--
SteffenPoulsen - 25 Jun 2006
I have similar problem, our exchange server has port 25 closed and is using another one. I can telnet to that port, Steffen can you describe sending mail "by hand" in a few words.
Is it possible to specify port for SMTP server? It looks like that is the problem.
--
DusanDavidovic - 27 Jun 2006
For this to work, Net.pm needs a little manual patch:
Index: lib/TWiki/Net.pm
===================================================================
--- lib/TWiki/Net.pm (revision 10735)
+++ lib/TWiki/Net.pm (working copy)
@@ -295,10 +295,12 @@
my $smtp = 0;
if( $this->{HELLO_HOST} ) {
$smtp = Net::SMTP->new( $this->{MAIL_HOST},
+ Port => 2525,
Hello => $this->{HELLO_HOST},
Debug => $TWiki::cfg{SMTP}{Debug} || 0 );
} else {
$smtp = Net::SMTP->new( $this->{MAIL_HOST},
+ Port => 2525,
Debug => $TWiki::cfg{SMTP}{Debug} || 0 );
}
my $status = '';
Sending an e-mail "by hand" simply means connecting to the mail server using telnet and by hand typing the nescessary protocol commands. There are several guides to this out there on this, but I think
http://www.activxperts.com/activemail/telnet/
doesn't look to frightening for first timers
--
SteffenPoulsen - 27 Jun 2006
I am trying to use Exchange but dont know what setting i should use, or change, can someone help me with this...
Server 2003, indigoperl, Exchange 2007.
--
BikramSingh - 19 Sep 2007
On a windows PC, you can open a new command prompt window. In the window, type
telnet exchange_server 25 and enter.
You should get a response back from the exchange server simiilar to this:
220 mydomain.net Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at W
ed, 19 Sep 2007 23:06:13 +1000
If you don't, then it's not a TWiki problem... you need to make sure you have the SMTP service installed and configured on your exchange server.
If you do see something like the above, then try the following, noting that dependand on your telnet settings you won't see the characters you type.
helo hotmail.com Press enter key
mail from:test@hotmail.com Press enter key
rcpt to:email@mydomain.com Press enter key (obviously, put in a valid address hosted on the exchange system, not
email@mydomainPLEASENOSPAM.com)
data press enter key
Testing 1 2 3 from telnet (or any message)
.
you're done. NOTE: you need the
. on the last line to tell the smtp engine that the data command is finished. You would get some response to verify the receipt of your "email" and shortly after you should receive the email message (dependant on your spam settings).
NOTE: SMTP on windows server is a component of IIS that needs to be installed (thought I'm not sure about Exchange 2007 as I haven't played with it yet). You configure it using the IIS admin mmc, or it's also displayed in the Computer Management mmc, under the Services\IIS stuff.
The entire screen should look something like this:
220 mydomain.net Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at W
ed, 19 Sep 2007 23:20:29 +1000
helo hotmail.com
250 mydomain.com Hello [192.168.0.23]
mail from:andrew@hotmail.com
250 2.1.0 andrew@hotmail.com....Sender OK
rcpt to:email@mydomain.com
250 2.1.5 email@mydomain.com
data
354 Start mail input; end with <CRLF>.<CRLF>
Testing 1 2 3
.
250 2.6.0 <SERVER_NAMEOJKfceXDHCrcB00000001@mydomain.com> Queued mail for delivery
--
AndrewRobinson - 19 Sep 2007
I think the exchange server probably has a protocols section in the Exchange System Manager application. You need to make sure the SMTP stuff is setup I guess. On Exchange 2000 and 2003 this works without any issue so perhaps it's something new in 2007.
--
AndrewRobinson - 19 Sep 2007
I'm having similar issues. I try to telnet the exchange but i get no reply. Probably port 25 is blocked. I do not have access to this exchange server. I am able to send mails through Outlook to this exchange server, but twiki isn't able to do so, thus im guessing there's something wrong on my end. Could anyone please read the following log to help me identify the problem? Steffen, Net.pm needs a manual patch, should i add those lines or replace them?
| 09 Jun 2008 - 17:01 | ERROR: Can't send mail using Net::SMTP. Can't connect to '10.5.1.144' at c:\PROGRA~1\TWiki\twiki\lib/TWiki/Net.pm line 432.
at c:\PROGRA~1\TWiki\twiki\lib/TWiki/Net.pm line 432
TWiki::Net::_sendEmailByNetSMTP('TWiki::Net=HASH(0x2097c5c)', 'Date: Mon, 09 Jun 2008 11:01:30 GMT\x{a}From: TWiki Administrator...') called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/Net.pm line 316
TWiki::Net::__ANON__() called at c:\PROGRA~1\TWiki\twiki\lib/CPAN/lib//Error.pm line 379
eval {...} called at c:\PROGRA~1\TWiki\twiki\lib/CPAN/lib//Error.pm line 371
Error::subs::try('CODE(0x211a06c)', 'HASH(0x222b190)') called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/Net.pm line 332
TWiki::Net::sendEmail('TWiki::Net=HASH(0x2097c5c)', 'From: TWiki Administrator <SAAD.KHAN-NSN@MYEMAIL.COM.PK>\x{a}To: ...') called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI/Register.pm line 1178
TWiki::UI::Register::_sendEmail('TWiki=HASH(0x1530e00)', 'mailresetpassword', 'HASH(0x1f5f8f0)') called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI/Register.pm line 556
TWiki::UI::Register::_resetUsersPassword('TWiki=HASH(0x1530e00)', 'TestUser', '', 'SCALAR(0x18cb014)') called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI/Register.pm line 489
TWiki::UI::Register::resetPassword('TWiki=HASH(0x1530e00)') called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI.pm line 159
TWiki::UI::__ANON__() called at c:\PROGRA~1\TWiki\twiki\lib/CPAN/lib//Error.pm line 379
eval {...} called at c:\PROGRA~1\TWiki\twiki\lib/CPAN/lib//Error.pm line 371
Error::subs::try('CODE(0x226240)', 'HASH(0x1f5f6bc)') called at c:\PROGRA~1\TWiki\twiki\lib/TWiki/UI.pm line 197
TWiki::UI::run('CODE(0x18cac90)') called at C:/Program Files/TWiki/twiki/bin/resetpasswd line 31
--
SaadKhan - 25 Jun 2008