Suresh Ramasubramanian

     

Configure POP and SMTP services on a dialup

There are several howtos around to configure sendmail / fetchmail, but most of them give rather sketchy information on how to configure sendmail on a dialup.

Here's a set of short howtos on how to configure various Unix MTAs to run a mailserver on a dialup

Sendmail

Postfix

Exim

QMail [coming soon]

Fetchmail

Fetchmail is a great command line pop client, written by the legendary Eric S. Raymond.

It can be configured quite easily using an X based interface called fetchmailconf. Alternatively, you can just edit a file called .fetchmailrc in your home directory, which looks like:

	defaults
	forcecr
	poll pop.your-isp.com with proto pop3 no dns
	user your-username with password your-password
	fetchall

See the fetchmail FAQ and manual at http://www.tuxedo.org/~esr/fetchmail/ for more.

 

Wrapup

We now have a MTA that queues mail sent to non local addresses for delivery through a smarthost (say your ISP's smtp server). We also have fetchmail configured to poll your ISP's pop server for e-mail.

Now to automate the whole thing, so that you can fetch mails from your ISP's server and send all queued mails as soon as you dial into your ISP.

Create a file called /etc/ppp/ip-up.local which contains

	#!/bin/sh
	# use the line below for 
	# sendmail or postfix
	/usr/sbin/sendmail -q &
	# use this one for exim
	# /usr/exim/bin/exim -qff -v 
	/usr/bin/fetchmail -v &
	echo "Finished Fetching"
	/usr/bin/killall pppd
	/usr/bin/killall wvdial

Now, make this file owned by root (if you create it as root, that'll be the case) and give it execute permissions using

	'chmod +x /etc/ppp/ip-up.local'

$id:dlhowto.html$ $author:suresh$ $date:9 March 2001$ $version:2.0$