Troubleshooting Maildrop Host
102Hi; I can't get Maildrop Host to work. I have a working SMTP, Python 2.3.5, Zope 2.7.8, and am running FreeBSD. I've edited the config.py file thus: PYTHON="/usr/bin/python" MAILDROP_HOME="/tmp/maildrop" MAILDROP_SPOOL="/tmp/maildrop/spool-1; /tmp/maildrop/spool-2; /tmp/maildrop/spool-3; /tmp/maildrop/spool-4" MAILDROP_VAR="/tmp/maildrop/var" MAILDROP_PID_FILE="/var/run/maildrop/maildrop.pid" MAILDROP_LOG_FILE="/var/log/maildrop/maildrop.log" SMTP_HOST="localhost" SMTP_PORT=25 MAILDROP_INTERVAL=120 DEBUG=0 DEBUG_RECEIVER="" MAILDROP_BATCH=0 MAILDROP_TLS=0 MAILDROP_LOGIN="" MAILDROP_PASSWORD="" WAIT_INTERVAL=0.0 ADD_MESSAGEID=1 I've fired up ./start_maildrop from the Products/Maildrop/maildrop/bin folder and a ps wax|grep maildrop yields a favorable result. I've added an instance of Maildrop through the ZMI. It appears I can reach the mail host because I use this code in my script: try: mailhost=getattr(context, context.superValues('Mail Host')[0].id) except: raise AttributeError, "Can't find a Mail Host object" and the error is not raised (rather, an error from a following page is raised, although perhaps I'm mistaken here?). Yet, when I go to fire up the script, the email is not sent. What am I doing wrong here? TIA, Nancy
Nancy Donnelly wrote:
try: mailhost=getattr(context, context.superValues('Mail Host')[0].id)
'Mail Host' won't find a Maildrop Host...
except:
Bare excepts like this are extremely bad programming practice...
raise AttributeError, "Can't find a Mail Host object"
Why not just let the original exception get raised?!
Yet, when I go to fire up the script, the email is not sent. What am I doing wrong here?
Quite a lot, I'm afraid... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers -
Nancy Donnelly