import base64, MySQLdb, os, getopt, sys, sha, signal, re, shutil, ConfigParser
import MySQLdb.converters
import SocketServer
+import errno
+import traceback
sys.path.append('/usr/lib/mailman/bin')
mbox = email
fqdn = PLATAL_DOMAIN
if ( fqdn == PLATAL_DOMAIN ) or ( fqdn == PLATAL_DOMAIN2 ):
- res = mysql_fetchone("""SELECT CONCAT(f.alias, '@%s'), a.full_name
+ res = mysql_fetchone("""SELECT CONCAT(s1.email, '@%s'), a.full_name
FROM accounts AS a
INNER JOIN email_source_account AS s1 ON (a.uid = s1.uid AND s1.type = 'forlife')
INNER JOIN email_source_account AS s2 ON (a.uid = s2.uid AND s2.email = '%s')
mlist.Unlock()
return ret
except Exception, e:
+ traceback.print_exc(file=sys.stderr)
sys.stderr.write('Exception in locked call %s: %s\n' % (method.__name__, str(e)))
mlist.Unlock()
return 0
@edit
@admin
"""
+ # Force encoding to mailman's default for french, since this is what
+ # Mailman will use internally
+ # LC_DESCRIPTIONS is a dict of lang => (name, charset, direction) tuples.
+ encoding = mm_cfg.LC_DESCRIPTIONS['fr'][1]
+ comment = comment.encode(encoding, 'replace')
mlist.HandleRequest(int(id), int(value), comment)
return 1