Configuring Fetchmail for Receving emails from Remote Mailserver

Published December 16, 2009 by Siva

Scenario :

fetching the emails from remote server to local mail server ( i m running post fix server with configured with SMTP routing with my remote server) & forwarding the emails to localuser

You can also forward to many users using /etc/aliases

user1:        user2, user1, user3

In above example user1 mail copy to user2 & 3.

create file in your home directory names as .fetchmailrc with the permission 600

#chmod 600 .fetmailrc

The file content should be ..

# vi .fetmailrc
defaults

# without ssl for POP3S
poll pop.myserver.com
proto pop3
port 995
user “mymail@myserver.com” password “password” ssl
is vis100
keep

# without ssl for POP3
poll pop.myserver.com
proto pop3
port 110
user “mymail@myserver.com” password “password”
is localuser
keep

poll pop.bizmail.yahoo.com
proto pop3
port 995
user “objective@velaninfo.com” password “objective1947” ssl
is localuser
keep

Add the following line in crontab for scheduling the fetchmail command fto fetch the mails from the remote server in given time period.

crontab -u user -e

*/5 * * * * fetchmail -k -s

Please contact me , if u have any clarification in this regard….

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: