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.


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)

  • 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. – jwinkler Jul 25 '13 at 17:47
  • See my edit for an example. – Sven Jul 25 '13 at 17:51
  • so the 'is "something"' can be a virtual user too? – jwinkler Jul 25 '13 at 17:52
  • Yes, that's not a problem. – Sven Jul 25 '13 at 17:53
  • Oh god, well I guess could have just tried that. Thank you so much. – jwinkler Jul 25 '13 at 17:54

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.