Fetching mails into postfix/dovecot via pop3/imap

7,136

You want a tool like fetchmail or getmail. They pick up mail via POP/IMAP and insert them into the local mail system.

You use fetchmail with a config file, usually called .fetchmailrc like this:

poll mail.example.com protocol pop3:
     username "admin" password "dir3cti0n" is "squire" here;
     username "fore" password "0rd3r" is "foreman" here;

The is squire here does the mapping from the remote address to the local one.

(Example pulled from here)

Share:
7,136

Related videos on Youtube

jwinkler
Author by

jwinkler

Updated on September 18, 2022

Comments

  • jwinkler
    jwinkler over 1 year

    I managed to set up my first Debian mail server using postfix and dovecot. I use roundcube to access my IMAP accounts which are defined by virtual users in a MySQL data base.

    Everything works perfectly so far. What I want to do now is fetching mails from other servers (like hotmail for example) and distribute them to according virtual accounts.

    Since I have absolutely no idea where to start here I thought I'd give it a try and just aks for a general direction.

    Any help is much appreciated.

  • jwinkler
    jwinkler almost 11 years
    I've looked into fetchmail already, which seems like a great tool, but how would I do the mapping to the virtual mail users on my server? All the examples I saw used existing users on the server.
  • FooBee
    FooBee almost 11 years
    See my edit for an example.
  • jwinkler
    jwinkler almost 11 years
    so the 'is "something"' can be a virtual user too?
  • FooBee
    FooBee almost 11 years
    Yes, that's not a problem.
  • jwinkler
    jwinkler almost 11 years
    Oh god, well I guess could have just tried that. Thank you so much.