diff --git a/src/freedombone-base-email b/src/freedombone-base-email
index 4cc14a2155b6af80cca6aadeef44e37b2882af1d..272d02f7486c1d374b76a3208664a976ef9d05ce 100755
--- a/src/freedombone-base-email
+++ b/src/freedombone-base-email
@@ -1015,7 +1015,9 @@ function email_smtp_proxy_through_isp {
     isp_smtp_password="$4"
     email_server_type='smarthost'
 
-    if [[ "$isp_smtp_domain" == 'off' || "$isp_smtp_domain" == '0' || "$isp_smtp_domain" == '' ]]; then
+    ONION_ONLY=$(grep "ONION_ONLY=" "/root/${PROJECT_NAME}.cfg" | awk -F '=' '{print $2}')
+
+    if [[ "$isp_smtp_domain" == 'off' || "$isp_smtp_domain" == '0' || "$isp_smtp_domain" == '' || "$ONION_ONLY" != 'no' ]]; then
         { echo '# password file used when the local exim is authenticating to a remote';
           echo '# host as a client.';
           echo '#';