Thursday, July 26, 2007

Exim4 relaying on

I'm NOT a sysman...but sometimes it happens.

This post is mainly for my reminder, but I hope it could be useful to other people.

The problem: I have an internal SMTP server (Exim4 on Debian) that must relay to an external smarthost (

Configure Exim4 as usual, for example typing:

# dpkg-reconfigure exim4-config

For delivering mails to, your SMTP server have to act as SMTP AUTH client.

You have to create /etc/exim4/passwd.client file, and put inside it your connection infos in the following format:


Simple, isn'it? But not sufficient... (and, I think, many other smarthosts) doesn't support TLS encryption, so you have to enable AUTH PLAIN.

Create (if you don't have yet) a /etc/exim4/conf.d/main/000_localmacros file, and write in it:


Update the configuration:

# update-exim4.conf

...and restart Exim4:

# /etc/init.d/exim4 restart

Of course I'm using the splitted configuration schema. If you are using the non-splitted one, you need to modify the /etc/exim4/update-exim4.conf.conf or /etc/exim4/exim4.conf.template files.

...remember...I'm NOT a sysman...


Unknown said...


you're my hero for next 10 mins.


Lucio Benfante said...

Hi Mattia, welcome.