Package: mini-dinstall
Version: 0.6.21-0.1

When sending mail the from address should contain a fqdn, not only the
hostname. Attached patch replaces one occurence of socket.gethostname() 
by socket.getfqdn(), which fixes the problem.

[EMAIL PROTECTED]:~> python
Python 2.3.5 (#2, Sep  4 2005, 22:01:42) 
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostname()
'smart130'
>>> socket.getfqdn()    
'smart130.physik.fu-berlin.de'

-- 
Jens Dreger                      Freie Universitaet Berlin
[EMAIL PROTECTED]       Fachbereich Physik - ZEDV
Tel: +49 30 83854774             Arnimallee 14
Fax: +49 30 83855902             14195 Berlin
--- mini-dinstall.orig  2006-08-30 14:39:24.000000000 +0200
+++ mini-dinstall       2006-08-30 14:40:13.000000000 +0200
@@ -206,7 +206,7 @@
         mail_log_flush_count = configp.getint('DEFAULT', 
'mail_log_flush_count')
     if configp.has_option('DEFAULT', 'mail_log_flush_level'):
         mail_log_flush_level = logging.__dict__[configp.get('DEFAULT', 
'mail_log_flush_level')]
-    mail_smtp_handler = SubjectSpecifyingLoggingSMTPHandler('mini-dinstall log 
notice (%l)', mail_server, 'Mini-Dinstall <[EMAIL PROTECTED]>' % 
(getpass.getuser(),socket.gethostname()), [mail_to])
+    mail_smtp_handler = SubjectSpecifyingLoggingSMTPHandler('mini-dinstall log 
notice (%l)', mail_server, 'Mini-Dinstall <[EMAIL PROTECTED]>' % 
(getpass.getuser(),socket.getfqdn()), [mail_to])
     mail_handler = logging.handlers.MemoryHandler(mail_log_flush_count, 
flushLevel=mail_log_flush_level, target=mail_smtp_handler)
 
     mail_handler.setLevel(mail_log_level)

Reply via email to