# Mail messages generated with Roundcube not going via the SMTP Relay

**URL:** <https://forum.hestiacp.com/t/mail-messages-generated-with-roundcube-not-going-via-the-smtp-relay/14647>\
**Category:** Mail\
**Created:** [June 5, 2024, 5:43pm UTC](https://forum.hestiacp.com/t/mail-messages-generated-with-roundcube-not-going-via-the-smtp-relay/14647 "2024-06-05T17:43:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![webcliq](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/webcliq/32/5272_2.png) [@webcliq](https://forum.hestiacp.com/u/webcliq)\
**Post date:** [June 5, 2024, 5:43pm UTC](https://forum.hestiacp.com/t/mail-messages-generated-with-roundcube-not-going-via-the-smtp-relay/14647/1 "2024-06-05T17:43:31Z")

</div>

Both Global and Domain Relays are correctly set to an account on SendinBlue / Brevo. Emails generated by Roundcube webmail by my Clients are ignoring the Relay instructions and still being sent locally. Unfortunately my dedicated server IP is on Outlook and Gmail blocked list and recipients with those email addresses are not receiving emails from my Client.

I am unclear why the Relay arrangements created in the usual way on Hestia, do not appear in the Exim config. I am wondering if the overwrite is not working correctly. If Exim has to be manually configured, what settings need to be changed?

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [June 5, 2024, 7:03pm UTC](https://forum.hestiacp.com/t/mail-messages-generated-with-roundcube-not-going-via-the-smtp-relay/14647/2 "2024-06-05T19:03:20Z")

</div>

Exim will check the existence of the smtp relay conf file.

```auto
SMTP_RELAY_FILE = ${if exists{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/smtp_relay.conf}{/etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/smtp_relay.conf}{/etc/exim4/smtp_relay.conf}}

```

Above conf, basically tries to check if file `/etc/exim4/domain/SenderDomain/smtp_relay.conf` exists, if it doesn’t, it will use by default the global smtp relay conf `/etc/exim4/smtp_relay.conf` (if it doesn’t exist, Exim won’t use any smtp relay).

Said that, check that `smtp_relay.conf` has been created correctly for your domain and contains the right data (`host`, `port`, `user` and `pass`).

And of course, check the Exim log.

Example to find logs for messages that are sending mails from the host `webmail.whatever`:

```auto
exigrep '<=.*\(webmail\.' /var/log/exim4/mainlog

```

If you want to search in all the logs add a wildcard symbol after mainlog.

```auto
exigrep '<=.*\(webmail\.' /var/log/exim4/mainlog*

```

If you know the mail address you can use it too:

```auto
exigrep '<=.*TheUser@TheDomain' /var/log/exim4/mainlog*

```

---

<div class="post-metadata">

**Author:** ![webcliq](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/webcliq/32/5272_2.png) [@webcliq](https://forum.hestiacp.com/u/webcliq)\
**Post date:** [June 5, 2024, 10:55pm UTC](https://forum.hestiacp.com/t/mail-messages-generated-with-roundcube-not-going-via-the-smtp-relay/14647/3 "2024-06-05T22:55:51Z")

</div>

Thanks for your prompt reply. Just what I needed.

I have been doing some more research and there appears to be a particular circumstance where this is happening. Client has email account on the Domain which serves a Group account. Mail arriving at this Group account is forwarded to 5 external Outlook and Gmail addresses. When email arrives for this Group account from an external email source, Exim correctly forwards the received email via the Relay. However when an email account, on the same domain, sends to the Group account, Exim copies the email from Sent folder of the Author to the Inbox folder of the Group account, as you would expect but forwards this email directly and not through the Relay.

I suspect that the action by Exim of treating the Domain as local also causes the failure of the Relay. This may be a failing of Exim and outside of the control of Hestia but your information about the location of Exim log files will allow me to test my suspicions.
