Custom exim.conf settings

hci

Verified User
Joined
Jun 15, 2004
Messages
355
I have this among other custom settings in exim.conf

# deny email addresses listed in file
deny recipients = lsearch;/etc/virtual/over_quota_email
message = Email account over quota ; Mailbox FULL

How do I get this to persist after an update with custombuild?
 
Last edited:
- Put those two lines in /etc/exim.variables.conf.custom (create the file if it doesn't exist)
- to apply the changes:

cd /usr/local/directadmin/custombuild
./build exim_conf
 
That did not seem to work. Had to remove to get exim to run.
 
Check the section that you added it to. It looks like your adding this to an acl section, if you look at the top of the section you will see there is an include you can create/edit (eg: /etc/exim.acl_script.pre.conf or /etc/exim.acl_check_recipient.pre.conf etc....). Some sections of the config have a .pre.conf file they reference that you you can make your changes in.
 
I see this in exim.conf:

.include_if_exists /etc/exim.acl_check_recipient.pre.conf

So would I add the config too:

.include_if_exists /etc/exim.acl_check_recipient.pre.conf.custom

Then build exim_conf?
 
Don't change the main config files. Just look at those include references and change those files. Once adding to or creating the file you should only need to restart exim for the changes to take effect. Building exim_conf will update the main exim config files back to the latest default versions (over writing any changes in those files). But it will not touch the .pre.conf or the .custom files. That's what I have been doing to make changes and it works fine for me so far.
 
Added config too:

/etc/exim.acl_check_recipient.pre.conf

Seems to have worked fine. Even added my greylisting in there and it works fine too. Thanks.
 
On a related not. I found this in exim.conf:


#EDIT#27:
# 1st deny checks if it's a hostname or IPV4 address with dots or IPV6 address
deny message = R1: HELO_SHOULD_BE_FQDN
!authenticated = *
condition = ${if match{$sender_helo_name}{\N^\[\N}{no}{yes}}
condition = ${if match{$sender_helo_name}{\N\.\N}{no}{yes}}
# 3rd deny makes sure the hostname has no double-dots (invalid)
deny message = R3: HELO_SHOULD_BE_FQDN
!authenticated = *
condition = ${if match{$sender_helo_name}{\N\.\.\N}}

Is there a way to over ride this and basically add:

!hosts = +relay_hosts

To it? I have some IPs in relay_hosts I want to be able to send email without be snagged by this.

Would that be done here or where:

/etc/exim.variables.conf.custom
 
Yes you would make the changes in /etc/exim.variables.conf.custom

 
Back
Top