Deployment:Linux:MTA:exim4

From Main

Setting up exim4 with PLAINTEXT auth against a smarthost

The Problem

I have a Rogers @HOME connection and wanted to setup exim4, on my debian box to act as a client, but rogers requires plaintext AUTH,and these MTAs refuse to do plaintext without a secure connection (which is the way it should be!!!!!)

Second problem, rogers doesn't allow outgoing SMTP on port 25, so i had to use my hosts port 587

OK. This was the already done a few weeks ago so I don't remember everything but this is the hack I had to do. I didn't have time to properly RTFM.

The Solution

RTFM'd a little more and I think i'm now able to follow the proper procedure.


If you're using a single configuration file do the following:

  • #dpkg-reconfigure exim4-config #Setup your smarthost and all the other values
  • edit /etc/exim4.conf.template
    • Add this somewhere in the MAIN configuration section:
          AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS=true
  • Find the remote_smtp_smarthost transport and add the port command if necessary
remote_smtp_smarthost:
  debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
  driver = smtp
  port = 587
  hosts_try_auth = ${if exists {CONFDIR/passwd.client}{DCsmarthost}{}}
  tls_tempfail_tryclear = false
  DEBCONFheaders_rewriteDEBCONF
  DEBCONFreturn_pathDEBCONF

  • edit /etc/exim4/passwd.client and add your auth info. Be careful here as your smtp host may actually resolve to another hostname, so do a nslookup smtp.mydomain.com and then do a revese lookup on the ip address you recieve (ie. nslookup 123.456.789.111). If you get back a different hostname, you may have to change the *.mydomain.com to match
*.mydomain.com:myuserid:mypassword
  • Update the configuration file
# update-exim4.conf; /etc/init.d/exim4 reload
    • watch for error messages
  • No errors, do a test
#/usr/lib/sendmail -v my@email.com
SUBJECT:  testing

Here is the body of my test email
.

Always hit enter twice after subjectand then end with a . followed by another enter

  • Things didn't work. Don't despair. Check /var/log/exim4/mainlog for error message, type mailq to see whether these messages are stuck. Review your config and then re-run your queue like this:
# exim4 -qff -v