Bug 243846 - Archivemail fails when user@domain/host style usernames are used.
Summary: Archivemail fails when user@domain/host style usernames are used.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: archivemail
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-12 10:58 UTC by Michael Fleming
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version: 0.7.0-6.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-14 15:46:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Allows archivemail to use user@host login types (550 bytes, patch)
2007-06-12 10:58 UTC, Michael Fleming
no flags Details | Diff

Description Michael Fleming 2007-06-12 10:58:48 UTC
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):
0.7.0

How reproducible:
Always (with username@host creds)

Steps to Reproduce:
1. Install Archivemail
2. use a user@host style username (eg. mfleming)
3. Watch archivemail go boom. ;-)
  
Actual results:
Fails with...

archivemail: No imap password specified
archivemail: unexpected error encountered - shutting down

..errors.

Expected results:
Should archive off messages as expected

Additional info:
See attached patch for a fix I used successfully on my old packages (source long
forgotten, I'm no python guru)

Comment 1 Michael Fleming 2007-06-12 10:58:48 UTC
Created attachment 156786 [details]
Allows archivemail to use user@host login types

Comment 2 Gwyn Ciesla 2007-06-12 12:01:54 UTC
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?

Comment 3 Michael Fleming 2007-06-12 12:09:30 UTC
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 "mfleming") 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/
imap://mfleming@imap.enlartenment.com/INBOX
IMAP password: 
Traceback (most recent call last):
  File "/usr/bin/archivemail", line 6, in <module>
    main()
  File "/usr/share/archivemail/archivemail.py", line 686, in main
    archive(mailbox_path)
  File "/usr/share/archivemail/archivemail.py", line 1136, in archive
    _archive_imap(mailbox_name, final_archive_name)
  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__
    self.open(host, port)
  File "/usr/lib64/python2.5/imaplib.py", line 230, in open
    self.sock.connect((host, port))
  File "<string>", line 1, in connect
socket.gaierror: (-2, 'Name or service not known')


Comment 4 Gwyn Ciesla 2007-06-12 12:33:52 UTC
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.

Thank you!

Comment 5 Fedora Update System 2007-06-14 15:46:54 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.