Bug 243846 - Archivemail fails when user@domain/host style usernames are used.
Archivemail fails when user@domain/host style usernames are used.
Product: Fedora
Classification: Fedora
Component: archivemail (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Gwyn Ciesla
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-06-12 06:58 EDT by Michael Fleming
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 0.7.0-6.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-14 11:46:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Michael Fleming 2007-06-12 06:58:48 EDT
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):

How reproducible:
Always (with username@host creds)

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

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


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 06:58:48 EDT
Created attachment 156786 [details]
Allows archivemail to use user@host login types
Comment 2 Gwyn Ciesla 2007-06-12 08:01:54 EDT
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 08:09:30 EDT
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@enlartenment.com") 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 password: 
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
    _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 08:33:52 EDT
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 11:46:54 EDT
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.