Issues related to setting up and using your mailserver and mail clients- I think I have an open relay, what do I do?

Issues related to setting up and using your mailserver and mail clients- I think I have an open relay, what do I do?About 99% of all emails to us with this question end up being da-popb4smtp causing confusion, and not an open relay.

Mailserver, What da-popb4smtp does is adds your own IP to the /etc/virtual/pophosts for 30 minutes file after you have authentication with pop or imap.

Any IP in this file can send emails freely without smtp authentication, but since you have already authenticated with pop, you’re a valid user anyway, so it is not an issue.

You can check if you have an open relay at

You should almost never have any domains listed in the /etc/virtual/whitelist_domains file as any email with any from address as any domain for that file can relay through your server.

Use it as a last resort only.  Be constantly careful to NOT have commonly forged domains, such as hotmail, gmail, etc., in that file. R=localuser T=local_delivery defer (13): Permission denied: cannot create /home/diradmin/Maildir/

If you always get the following error in your /var/log/exim/mainlog when trying to send out welcome emails: R=localuser T=local_delivery defer (13): Permission denied: can not create /home/diradmin/Maildir/

that will means that the receiving mail server is doing a sender check (or bouncing the email).  You can satisfy this check by adding:

diradmin: :blackhole:

to your /etc/aliases file so that the exim accepts all emails to “diradmin” (but will just dump them into the abyss we call the blackhole).   If there you actually want to get the emails to diradmin, then change :blackhole: to be a valid email address, eg:


in the /etc/aliases file.

SMTP error from remote mail server after LHLO

If there you see exim trying to send emails with LHLO it means it’s trying to use LMTP which isn’t setup anywhere in our setup.

This issue can be caused if the exim runs out of file descriptors.  Solutions for this can vary, see related guides for more info.

Disable “Local Mail Server” by default for new domains

If the all new domains are going to have their mail hosted remotely, and you wish to have this option set by default you can do so with the script.


In it, add the code

cp -f $FILE $FILE.backup
grep -v -e “^$domain\$” $FILE > $FILE.tmp
mv -f $FILE.tmp $FILE
chmod 644 $FILE
chown mail:mail $FILE
exit 0;

save/exit.  Then type:

chmod 755 /usr/local/directadmin/scripts/custom/

Any newly domains created after this point should not be in the /etc/virtual/domains.

Don’t forget to copy this:

to the custom folder (in that same directory) and edit the custom/dns_mx.conf for the correct default vaules.

Leave a Reply

Your email address will not be published. Required fields are marked *