Question
Okay guys, I've never had email on this system working, so I disabled the need for email authorization when registering, problem is now people can't reset their password. On the box that twiki is set, I can see port 25 is running, when when I
telnet localhost 25 i can easily send email through the console. In twiki configuration I set {SMTP}{MAILHOST} and {SMTP}{SENDERHOST} to localhost, or it's other hostname (which is in the box's /etc/hosts file too... it shouldn't matter) with no luck.
does {MailProgram} Need to be cleared out? (It says it doesn't) also, what does it seem I'm doing wrong?
Thanks,
Graziano
Environment
--
GrazianoMisuraca - 12 Jul 2007
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.
Also: I have debug checked, but I don't know where to find the error log.. This would help
--
GrazianoMisuraca - 12 Jul 2007
If your host is listening on port 25, and your mailhost is localhost, then you apparently
have a mail program at your service. So just delete the configuration value for
{SMTP}{MAILHOST} and supply the correct value for
{MailProgram}.
If you define a value for
{SMTP}{MAILHOST}, then TWiki will try to use the Perl module
Net::SMTP to send mail via that host. So maybe you don't have
Net::SMTP installed, or you might need to provide a userid and password if you connect to your mailhost over port 25.
The error log should be Apache's error log - I'm not sure for RedHat, but typically something like
/var/log/apache2/error.log.
--
HaraldJoerg - 12 Jul 2007
It wasn't there

I don't have a mail program as in I can type /sbin/sendmail... it just hangs, the only way i could get it to work was telnetting in and running command in that sendmail session. I don't know what they mean by Net::SMTP, i just assumed by that they meant I have a sendmail service running on 25.
When I telnet in, it never asks for a username/pass, but in the configuration, there is a password there (but no username) I don't know what it is (it's ***s) so I'm afraid to remove it.
--
GrazianoMisuraca - 12 Jul 2007
Okay, I guess Net::SMTP is a perl thing, I tried running a test script:
#!/usr/bin/perl -w
use Net::SMTP;
$smtp = Net::SMTP->new('localhost');
$smtp->mail($ENV{USER});
$smtp->to('graziano.misuraca@site.com');
$smtp->data();
$smtp->datasend("To: Graziano.misuraca\n");
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
$smtp->quit;
and there weren't any errors, but i didn't receive it.
[root@nagtest tmp]# ./testperl
[root@nagtest tmp]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 nagtest.site.com ESMTP Sendmail 8.13.1/8.13.1; Thu, 12 Jul 2007 14:02:13 -0600
mail from: test@test.com
250 2.1.0 test@test.com... Sender ok
rcpt to: graziano.misuraca@site.com
250 2.1.5 graziano.misuraca@site.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
test
.
250 2.0.0 l6CK2Dhu014735 Message accepted for delivery
quit
221 2.0.0 nagtest.site.com closing connection
Connection closed by foreign host.
But in a few seconds I got the second one.
I guess it's not installed? (NET::SMTP) how would I install it?
Thanks,
--
GrazianoMisuraca - 12 Jul 2007
Your experiment could indicate that the
receiving post office rejects mails from domains without reverse DNS lookup (a popular anti-spam filtering technique). Did you try with a correct sender address? In recent TWiki versions the sender address for TWiki-generated mails can be set in
configure as
{WebMasterEmail}. If this variable isn't there, then it is a preference variable
%WIKIWEBMASTER% defined in TWiki.TWikiPreferences, which you should override in your Main.TWikiPreferences. Sorry, I don't know which applies for your 4.0.5.
--
HaraldJoerg - 12 Jul 2007
I had to do it in
TWikiPreferences. Which was already set correctly. No matter what i set the MAIL FROM: to, it works regardless. (And yes I know I shouldn't have editted it in there

)
--
GrazianoMisuraca - 13 Jul 2007
Okay, this is kinda weird, but I still don't think this would be a problem.
I've been testing sendmail by telnetting to localhost, I do that by SSHing in, I tried cutting a step, and just telnetting to port 25, but that's blocked. I thought that was weird, but since my sendmail is on the same box as twiki, I don't see how this would be a problem.
--
GrazianoMisuraca - 13 Jul 2007
Okay, a user made a new account, and I
DID get email notification, but I still don't for page changes. I no longer think it's a sendmail problem, but the problem still exists and confused me. (Maybe moreso now)
--
GrazianoMisuraca - 16 Jul 2007
Sorry, closing this after more than 30 days of inactivity...
--
PeterThoeny - 02 Sep 2007