Thread: Exim
View Single Post
  #4  
Old 28th November 2006, 23:22
Arricc Arricc is offline
Junior Member
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay... so these files are for those people using the exim4 split config as pioneered by Debian (yes their config looks hella complicated, but most people would never need to touch it and when you know how it works its nice and easy to fiddle.)

Code:
#/etc/exim4/conf.d/main/000_exim4-ISPConfig_options
# ISPConfig options for Exim
# Edit this file to set match the options in your mail server setup
# in your ISPConfig setup

#ISPCONFIG_ALIASFILE = /etc/exim4/virtusertable
#AUTH_SERVER_ALLOW_NOTLS_PASSWORDS = yes
#ISPCONFIG_COURIER_AUTH=yes
##This option requires you to copy the postfix smtpd.crt and smtpd.key to 
## /etc/exim4 as exim4.crt and exim4.key
#MAIN_TLS_ENABLE = yes
Code:
#/etc/exim4/conf.d/router/450_exim4-ISPConfigAliases
# This router handles aliasing for ISPConfig users using the configured alias file.
#
.ifdef ISPCONFIG_ALIASFILE
ISPConfig_aliases:
  debug_print = "R: ISPConfig_aliases for $local_part@$domain"
  driver = redirect
  domains = +local_domains
  allow_fail
  allow_defer
  data = ${lookup{$local_part@$domain}lsearch{ISPCONFIG_ALIASFILE}}
  .ifdef SYSTEM_ALIASES_USER
  user = SYSTEM_ALIASES_USER
  .endif
  .ifdef SYSTEM_ALIASES_GROUP
  group = SYSTEM_ALIASES_GROUP
  .endif
  .ifdef SYSTEM_ALIASES_FILE_TRANSPORT
  file_transport = SYSTEM_ALIASES_FILE_TRANSPORT
  .endif
  .ifdef SYSTEM_ALIASES_PIPE_TRANSPORT
  pipe_transport = SYSTEM_ALIASES_PIPE_TRANSPORT
  .endif
  .ifdef SYSTEM_ALIASES_DIRECTORY_TRANSPORT
  directory_transport = SYSTEM_ALIASES_DIRECTORY_TRANSPORT
  .endif

# end ifdef ISPCONFIG_ALIASFILE
.endif
Now, for authentication...
Code:
#/etc/exim4/conf.d/auth/999_exim4-ISPConfig-Auth_Courier
#################################
# This file is copied straight from auth/30_exim4-config_examples

# This is now the (working!) example from
# http://www.exim.org/eximwiki/FAQ/Policy_controls/Q0730
# Possible pitfall: access rights on /var/run/courier/authdaemon/socket.
### This may be a security risk:
### chmod o+rw /var/run/courier/authdaemon/
###

.ifdef ISPCONFIG_COURIER_AUTH
 plain_courier_authdaemon:
   driver = plaintext
   public_name = PLAIN
   server_condition = \
     ${extract {ADDRESS} \
               {${readsocket{/var/run/courier/authdaemon/socket} \
               {AUTH ${strlen:exim\nlogin\n$2\n$3\n}\nexim\nlogin\n$2\n$3\n} }} \
               {yes} \
               fail}
   server_set_id = $2
   .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
   server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
   .endif

 login_courier_authdaemon:
   driver = plaintext
   public_name = LOGIN
   server_prompts = Username:: : Password::
   server_condition = \
     ${extract {ADDRESS} \
               {${readsocket{/var/run/courier/authdaemon/socket} \
               {AUTH ${strlen:exim\nlogin\n$1\n$2\n}\nexim\nlogin\n$1\n$2\n} }} \
               {yes} \
               fail}
   server_set_id = $1
   .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
   server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
   .endif
#endif ISPCONFIG_COURIER_AUTH
.endif

Don't forget you need to add whatever file ISPConfig is using to generate local domains. Either edit /etc/exim4/update-exim4.conf.conf to set dc_other_hostnames. Eg:
Code:
dc_other_hostnames='/etc/exim4/local-host-names'
I'm not sure if running "dpkg-reconfigure exim4-config" will work with putting in a file name.

I think ISPConfig will have write permission on the files in my confs by default.
Reply With Quote