Red Hat Bugzilla – Bug 243846
Archivemail fails when user@domain/host style usernames are used.
Last modified: 2007-11-30 17:12:07 EST
Description of problem:
Archivemail does not recognise user@host-style IMAP logins (frequently used in
virtualised mail environments)
Version-Release number of selected component (if applicable):
Always (with username@host creds)
Steps to Reproduce:
1. Install Archivemail
2. use a user@host style username (eg. email@example.com)
3. Watch archivemail go boom. ;-)
archivemail: No imap password specified
archivemail: unexpected error encountered - shutting down
Should archive off messages as expected
See attached patch for a fix I used successfully on my old packages (source long
forgotten, I'm no python guru)
Created attachment 156786 [details]
Allows archivemail to use user@host login types
archivemail -d 7 -o foo imap://user:pass@host/INBOX worked for me, with and
without the patch. Can I see the output yours generates?
Perhaps I wasn't clear enough in the initial bug report
If the username = "mfleming" - all is well. However mine and other virtual
environments use username@domain (eg "firstname.lastname@example.org") for the
POP/IMAP login, and archivemail doesn't parse those login names correctly
without the patch I provided.
For reference, here's the output of a "pristine" Archivemail install.
[mfleming@defender mfleming]$ archivemail -d 7 -o ~/Mail-Archive/
Traceback (most recent call last):
File "/usr/bin/archivemail", line 6, in <module>
File "/usr/share/archivemail/archivemail.py", line 686, in main
File "/usr/share/archivemail/archivemail.py", line 1136, in archive
File "/usr/share/archivemail/archivemail.py", line 1340, in _archive_imap
imap_srv = imaplib.IMAP4(imap_server)
File "/usr/lib64/python2.5/imaplib.py", line 163, in __init__
File "/usr/lib64/python2.5/imaplib.py", line 230, in open
File "<string>", line 1, in connect
socket.gaierror: (-2, 'Name or service not known')
I see, it chokes on the second '@'.
I've applied and built in devel. I'll push down the chain if I get no more
reports. Once that happens, I'll send the patch upstream.
archivemail-0.7.0-6.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.