Fetching mails into postfix/dovecot via pop3/imap
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)
Related videos on Youtube
jwinkler
Updated on September 18, 2022Comments
-
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 almost 11 yearsI'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 almost 11 yearsSee my edit for an example.
-
jwinkler almost 11 yearsso the 'is "something"' can be a virtual user too?
-
FooBee almost 11 yearsYes, that's not a problem.
-
jwinkler almost 11 yearsOh god, well I guess could have just tried that. Thank you so much.