[exim] LDAP and secondary MX

Pàgina inicial
Delete this message
Reply to this message
Autor: Stian Jordet
Data:  
A: exim-users
Assumpte: [exim] LDAP and secondary MX
Hi,

I have a nice setup with LDAP on my primary MX, which serves all my
needs in a very satisfying way. Now I want to deploy the secondary mx
with the same setup, with the same LDAP content (via a LDAP-slave).

I have this LDAP entry:

dn: uid=stianj,ou=People,dc=jordet
cn: Stian Jordet
loginShell: /bin/bash
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/stianj
shadowMin: -1
shadowMax: 999999
shadowWarning: 7
shadowInactive: -1
shadowExpire: -1
shadowFlag: 0
host: *
uid: stianj
mailHost: buick.jordet.net
mailRoutingAddress: stianj@???
mailLocalAddress: stian@???
mailLocalAddress: liste@???
objectClass: top
objectClass: account
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetLocalMailRecipient
objectClass: gosaAccount
shadowLastChange: 12890

and I want exim to first check if mailHost==$hostname. If it matches, it
should accept the mail and deliver it. If it does not match, it should
accept it, and send it to the host in mailHost.

Is this possible? Is there a variable containing the hostname, so I can
test against that? And can I use two conditions in an accept router?
(One to find the username of the receipent, and one to test if hostname
== mailHost). I could really, really need some help with that
condition...

If I ever get this to work, it doesn't matter which MX is first or last,
I can choose which mailserver that receives each account's mail. Really
hope I can get this to work :) I used to have this working with
sendmail, but I'm moving away from it for several reasons.

Best regards,
Stian