Add to Favourites Add to Favourites    Print this Article Print this Article

I have more than one home partition. I need exim to find all home paths.

NOTE: if you use exim.conf 4.5.17+, easy_spam_fighter 1.28+, /etc/exim.spamassassin.conf 1.4+, you should not need to make any of the following manual changes to your configs.
Proper /etc/passwd lookups are done, rather than /home/$username references.  The guide below is only if you've got older versions.

By default, exim only finds User accounts under /home.  This saves 2 lookups per path, making exim more efficient.

However, if you have more Users on partitions other than /home, eg: /home and /home2, then the default exim.conf will not work.

The solution is to add extra string expansion code into the /etc/exim.conf to allow the home path for a User to be extracted based on the domain name.

There are 3 lines in the exim.conf that use the hard-coded /home path (they're not all together):

{exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \

directory = /home/$local_part/Maildir/

directory = /home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}/imap/${domain}/${local_part}/Maildir

You'll need to find each of these paths, and change them to look like (respectively):

{exists{${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}}lsearch{/etc/passwd}{$value}}}}/.spamassassin/user_prefs}} \

directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/passwd}{$value}}}}/Maildir/"

directory = "${extract{5}{:}{${lookup{${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}}lsearch{/etc/passwd}{$value}}}}/imap/${domain}/${local_part}/Maildir"


Was this answer helpful?

Also Read