Menu

#13 Error when mail server is unreachable

open
nobody
None
5
2003-06-25
2003-06-25
No

When the SMTP server is unreacheable, `syncmail'
generates an error message like the one appended below.
I suggest adding another mail-sending mode that queues
the mail using /usr/sbin/sendmail (instead of
delivering it via SMTP).

Michael

Message: Traceback (most recent call last):
Message: File
"/home/hohmuth/local/var/cvs/CVSROOT/syncmail", line
481, in ?
Message: main()
Message: File
"/home/hohmuth/local/var/cvs/CVSROOT/syncmail", line
474, in main
Message: dolinks, specs[0], cvshost, repo)
Message: File
"/home/hohmuth/local/var/cvs/CVSROOT/syncmail", line
341, in blast_mail
Message: conn.connect(MAILHOST, MAILPORT)
Message: File
"/soft/stow/Python-2.2.2/lib/python2.2/smtplib.py",
line 290, in connect
Message: raise socket.error, msg
Message: socket.error: (79, 'A remote host refused an
attempted connect operation.')

Discussion

  • Klaus Johannes Rusch

    Logged In: YES
    user_id=365576

    I believe the enhancement to add an MTA option has been
    discussed for cvs-syncmail.py and should be fairly simply to
    implement.

    The Perl version of cvs-syncmail at http://cvs-syncmail-
    pl.sourceforge.net/ already has this:

    -m hostname
    --mailhost hostname
    The hostname of an available SMTP server. The default
    is
    the value of the environment variable MAILHOST, or the
    environment
    variable SMTP_SERVER, or 'localhost'.

    --mta command
    Command line to invoke an external mail transfer agent
    (MTA), such as
    sendmail. The program should expect a message with
    SMTP headers and
    an unescaped message body on stdin.

    This option overrides any mailhost settings.

    It would by nice if the Python implementation chose the same
    parameter format, if possible.

     
  • Allen R. Marshall

    Logged In: YES
    user_id=147690

    The whole connect thing should be in some sort of
    try

    finally

    handler so exceptions that are likely to happen like this one
    don't just make it puke.

     
  • Glyn Normington

    Glyn Normington - 2004-03-15

    Logged In: YES
    user_id=623074

    Some colleagues are experiencing an intermittent failure to
    send out changes. Seems like they could do with the MTA
    option too.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.