3

I am having problems fetching emails with mailx. My imap account uses ssl/tls connection with normal password authentication on port 993. I don't have any problems sending through smtp though. Here is my ~/.mailrc:

set verbose
account bell {
set smtp-use-starttls
set smtp=smtp://smtp-mail.outlook.com:587
set smtp-auth=login
set smtp-auth-user=$USERNAME@bell.net
set smtp-auth-password=$PASSWORD
set from="$NAME <$USERNAME@bell.net>"
set nss-config-dir=/etc/openldap/certs
set ssl-verify=ignore

set folder=imaps://$USERNAME@imap-mail.outlook.com:993/INBOX
}

Mailx prompts for my password, then responds with "invalid username or password". Here is the output of "mail -A bell":

Resolving host imap-mail.outlook.com . . . done.
Connecting to 157.56.195.250 . . . connected.
Comparing DNS name: "*.hotmail.com"
Comparing DNS name: "*.live.com"
Comparing DNS name: "*.outlook.com"
SSL parameters: cipher=AES-256, keysize=256, secretkeysize=256,
issuer=CN=GlobalSign Organization Validation CA - G2,O=GlobalSign nv-sa,C=BE
subject=CN=*.hotmail.com,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US
* OK Outlook.com IMAP4rev1 server version 17.4.0.0 ready (DUB451-IMAP167)
>>> T1 CAPABILITY
* CAPABILITY IMAP4rev1 CHILDREN ID NAMESPACE UIDPLUS UNSELECT AUTH=PLAIN AUTH=XOAUTH2 SASL-IR
T1 OK CAPABILITY completed
Password:
>>> T2 LOGIN "$USERNAME" "$PASSWORD"
T2 NO [AUTHENTICATIONFAILED] Invalid username or password.
IMAP error: [AUTHENTICATIONFAILED] Invalid username or password.
Password:

Is this related to the authentification method or am I missing some ssl/tls config options?

0

You are missing whole section for IMAP server. Since they are using outlook it should work similar to Hotmail

account hotmail {
    set MAIL=imaps://username%40hotmail.com@imap-mail.outlook.com
    set imap-use-starttls
    set password-username%40hotmail.com@imap-mail.outlook.com="secret"
    set smtp="smtp-mail.outlook.com:587"
    set from="My Name <username@hotmail.com>"
    set smtp-use-starttls
    set smtp-auth="login"
    set smtp-auth-user=username@hotmail.com
    set smtp-auth-password="secret"
    }

I didn't make mistake using %40 instead of @. The latest s-nail (Linux mailx is much behind) doesn't like two @ since which Microsoft uses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.