Tags:
create new tag
view all tags

Question

I have been wrestling with MailNotify some time no, ever since sendmail was shut down permanently on the hosting server. Even though SMTPMAILHOST and SMTPSENDERHOST are set in my global preferences MailNotify tries to use sendmail.

After patching the scripts directly I found out that in sub sendEmail in lib/TWiki/Net.pm the code ...

$mailHost  = &TWiki::Prefs::getPreferencesValue( "SMTPMAILHOST" );
$helloHost = &TWiki::Prefs::getPreferencesValue( "SMTPSENDERHOST" );
... yields undef values even though they are set in the preferences. If I hardcoded the mailserver information here, TWiki used Net::SMTP and sent the mail (however, the sender was listed as WIKIWEBMASTER in percentsigns even though that preference value has also been set in my global preferences).

Seems like the preferences don't make it to the Net module. Some preferences (like the logo to use, etc.) work fine from the global preferences, so far I've only experienced that the mail configuration information is lost.

(Incidentally, the notification mails also contain an unexpanded HTTP_EQUIV_ON_VIEW and WEBCOPYRIGHT reference, but this happened when sending through sendmail also and probably not related to any of this.)

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat Linux 9
Web server: Apache/2.0.45 (Unix) mod_ssl/2.0.45 OpenSSL/0.9.6b DAV/2
Perl version: 5.8.0
Client OS: n/a
Web Browser: n/a

-- MadsTroest - 05 Dec 2003

Answer

Are you running mailnotify from a cron job? If so, try running testenv from the same cron job so you can see the path - it's possible that the TWiki.cfg is not being picked up properly, although I'd have expected another error.

-- RichardDonkin - 05 Dec 2003

Yes, I do run mailnotify from a cronjob but it starts by changing into the bin/ directory. However, I get exactly the same results when executing mailnotify from a shell on the server (standing in the bin/ directory). The output it produces report no errors of any kind, just says that it sent the change report. I've attached the "testenv" output for the site.

-- MadsTroest - 05 Dec 2003

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt testenv.txt r1 manage 6.1 K 2003-12-05 - 15:36 UnknownUser "testenv" output.
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2004-03-02 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.