Package: reportbug
Version: 3.29.5
Severity: normal
I'm using a mail server that requires POP before SMTP.
When I forgot to POP, I can't send a mail to other.
Sending a bug report to [EMAIL PROTECTED] are failed with error code "553
require POP authentication before SMTP",
although sending a copy to myself([EMAIL PROTECTED]) is succeed.
This is a log when I try to send a bug report without POP:
-----
Command: rcpt TO:<[EMAIL PROTECTED]>
Response: 553 require POP authentication before SMTP
Command: rcpt TO:<[EMAIL PROTECTED]>
Response: 250 ok
-----
In this case, reportbug does not fails.
No error messages are printed as follow.
-----
Report will be sent to "Debian Bug Tracking System" <[EMAIL PROTECTED]>
Submit this report on bittornado (e to edit) [Y|n|a|c|e|i|l|m|p|q|?]? y
Connecting to mail.morita-inc.co.jp via SMTP...
Bug report submitted to: "Debian Bug Tracking System" <[EMAIL PROTECTED]>
Copies sent to:
"Morita Sho" <[EMAIL PROTECTED]>
If you want to provide additional information, please wait to receive the bug
tracking number via email; you may then send any extra information to
[EMAIL PROTECTED] (e.g. [EMAIL PROTECTED]), where n is the bug number.
Normally you will receive an acknowledgement via email including the bug report
number within an hour.
-----
I have looked up the source code of reportbug,
and I think this problem is due to checking for return value of sendmail()
function is missing.
This is a code around the sendmail() function on reportbug_submit.py:
-----
ewrite("Connecting to %s via SMTP...\n", smtphost)
try:
conn = smtplib.SMTP(smtphost)
if smtptls:
conn.starttls()
conn.ehlo()
if smtpuser:
if not smtppasswd:
smtppasswd = ui.get_password(
'Enter SMTP password for [EMAIL PROTECTED]: ' %
(smtpuser, smtphost))
conn.login(smtpuser, smtppasswd)
conn.sendmail(fromaddr, toaddrs, smtp_message) <-- return
value is not checked at here
conn.quit()
except (socket.error, smtplib.SMTPException), x:
# If wrong password, try again...
if isinstance(x, smtplib.SMTPAuthenticationError):
ewrite('SMTP error: authentication failed. Try again.\n')
tryagain = True
smtppasswd = None
continue
failed = True
ewrite('SMTP send failure: %s\n', x)
-----
Python's manual says:
"11.12.1 SMTP Objects"
http://docs.python.org/lib/SMTP-objects.html
-----
sendmail( from_addr, to_addrs, msg[, mail_options, rcpt_options])
....snip
This method will return normally if the mail is accepted for at least one
recipient. Otherwise it will throw an exception. That is, if this method
does not throw an exception, then someone should get your mail. If this
method does not throw an exception, it returns a dictionary, with one entry
for each recipient that was refused. Each entry contains a tuple of the SMTP
error code and the accompanying error message sent by the server.
-----
I think reportbug should be check the return value of sendmail() function,
and show a message when mail server returns an error.
Sorry for my bad English.
regards,
Morita Sho
-- Package-specific info:
** Environment settings:
EDITOR="vi"
INTERFACE="urwid"
** /home/qw/.reportbugrc:
reportbug_version "3.29.5"
mode standard
ui urwid
realname "Morita Sho"
email "[EMAIL PROTECTED]"
smtphost "mail.morita-inc.co.jp"
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-k7
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Versions of packages reportbug depends on:
ii python 2.4.3-11 An interactive high-level object-o
ii python-central 0.5.5 register and build utility for Pyt
Versions of packages reportbug recommends:
ii python-cjkcodecs 1.1.1-2+b1 Python Unicode Codecs Collection f
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]