User login |
Setting up SMTP server on a development test server running UbuntuThis is a simple step-by-step tutorial to install and configure exim to route all e-mails send though a local SMTP server to one local user, regardless of the e-mail address or domain. I found this set-up very usefull when testing applications that send e-mail messages and you do not want to generate multiple HotMail accounts for testing or in case I'm wanted to do some testing and development when I'm offline. Install eximStart with installing exim. Configure exim to handle desired domainsNext step is to confiure exim to treat a number of domains as local. user@devmachine:~$ sudo dpkg-reconfigure exim4-config
Configure catch allSo now we want to make sure all emails are routed to the same local user. Start by creating the file /etc/exim4/conf.d/router/950_exim4-config_catchall with this content. catch_all: debug_print = "R: catch_all for $local_part@$domain" driver = redirect data = ${lookup{*}lsearch{/etc/aliases}} Then add the following to /etc/aliases. Replace user with your local username. *: user Build new exim4 config and restartuser@devmachine:~$ sudo update-exim4.conf.template -r Done! |