node-imap icon indicating copy to clipboard operation
node-imap copied to clipboard

Connecting to imap server with one username and another email?

Open Qualphey opened this issue 5 years ago • 5 comments

This kind of connection works on thundermail, so I suppose there should be a way to do the same thing with this module. Though there is only the user property in the configuration object. Any suggestions? :)

Qualphey avatar Oct 05 '20 08:10 Qualphey

I'm not quite sure what your email client is doing. IMAP authentication almost always involves a username and some kind of password.

mscdex avatar Oct 05 '20 12:10 mscdex

I think you didn't really get me right. I meant connecting to IMAP server using an email, username and a password. ie:

{
  user: "foo",
  email: "[email protected]",
  password: "123456879"
}

But it's okay now. I've reconfigured my server to use postgresql database for user authentication instead of pam.

Qualphey avatar Oct 05 '20 13:10 Qualphey

That's what I meant. I've never seen an email address be used as part of the authentication.

mscdex avatar Oct 05 '20 13:10 mscdex

Well the email address is not used for authentication. It's used to specify which emails you want to fetch when you're using aliases and save these emails for multiple addresses at the same maildir that's located in the home directory of a user you authenticate with. I'm using Postfix and Dovecot. You can read more about Postfix vitual aliases here.

Qualphey avatar Oct 05 '20 15:10 Qualphey

Since I'm not familiar with that kind of setup, there's not much I can tell you other than I'm confident it must be already possible with this module since all common IMAP functionality is available, it's just a matter of figuring out how Dovecot or other IMAP servers are making those email addresses available/selectable via IMAP.

mscdex avatar Oct 05 '20 16:10 mscdex