Configuring mail server to send email from mail.domain.com instead of using shared IP

Cappuccino

Verified User
Joined
Mar 20, 2021
Messages
10
Hi guys, I've recently got a copy of DA on my server and I'm playing with it :)

I'm migrating my mail server from mailgun to my own server so I'm trying to improve emails score. I'm using a website called mail tester.

What I would like to achieve is that every domain registered on DA will send email from mail.domain.com instead of using the server shared IP address. If this is not possible, I assigned to each user a dedicated IPv6, so an other option could be using the dedicated IPv6 instead of the server shared IP address.

I'm going through the docs but I can't find anything. Do you guys have any tip?

Thanks! :)
 
Ok, I found this page here https://www.directadmin.com/features.php?id=1692

What I did so far:
  • set add_domain_to_domainips to 1
  • run echo "action=rewrite&value=domainips&empty=yes" >> /usr/local/directadmin/data/task.queue
  • run echo "action=rewrite&value=helo_data" >> /usr/local/directadmin/data/task.queue
  • restarted directadmin and exim
But mails are still being sent from main server ipv4
 
Try this thread, might be helpful.
 
Hi,
I read that thread. I followed the instruction which are the ones I typed in my first post.
I am trying to send email messages from roundcube. Does roundcube use server shared ip?
I'll try to use thunberbird and see if the correct IP address is used.
Thanks
 
Does roundcube use server shared ip?
I'm not 100% sure but I do think so, because Roundcube is installed globally and every user can use this. Even when loggin in via other domain names and using their own email address and password.

Testing with Thunderbird should indeed give you a definite answer.
You're welcome.
 
Hi,
I read that thread. I followed the instruction which are the ones I typed in my first post.
I am trying to send email messages from roundcube. Does roundcube use server shared ip?
I'll try to use thunberbird and see if the correct IP address is used.
Thanks

Roundcube has no special permission on the server and merely connects over IMAP/SMTP locally, but identically to how you would with an external email client. It will offer the same result in this way, the same path through exim as any other.

Are you only assigning dedicated v6 or also v4? If just v6, that could be related as it’s probably not a tested use case. Also, do you end up with the desired results being in these files?

/etc/virtual/domainips
/etc/virtual/helo_data

I know you’re telling it to write them, but I’m curious if it actually is and what it’s writing.
 
Roundcube has no special permission on the server and merely connects over IMAP/SMTP locally, but identically to how you would with an external email client. It will offer the same result in this way, the same path through exim as any other.

Are you only assigning dedicated v6 or also v4? If just v6, that could be related as it’s probably not a tested use case. Also, do you end up with the desired results being in these files?

/etc/virtual/domainips
/etc/virtual/helo_data

I know you’re telling it to write them, but I’m curious if it actually is and what it’s writing.

Hello, I'm only assigning IPv6 to users, so all their domains point to IPv6 addresses.

My server is set up as follows:
  • ipv4 address only for admin, not used by any website
  • ipv6 addresses, one per user
In addition to this, every domain goes through Cloudflare, which I think complicates things. I've setup a plugin called "daflare" which syncs DirectAdmin DNS settings with Cloudflare DNS settings.

In the /etc/virtual/domainips I have the following:
Code:
*:185.xxx.xxx.xxx (ipv4 address)
domain1.com:ipv6_1
domain2.com:ipv6_2
domain3.com:ipv6_3
etc...

helo_data is empty

Thank you for your reply :)
 
Hello, I'm only assigning IPv6 to users, so all their domains point to IPv6 addresses.

My server is set up as follows:
  • ipv4 address only for admin, not used by any website
  • ipv6 addresses, one per user
In addition to this, every domain goes through Cloudflare, which I think complicates things. I've setup a plugin called "daflare" which syncs DirectAdmin DNS settings with Cloudflare DNS settings.

In the /etc/virtual/domainips I have the following:
Code:
*:185.xxx.xxx.xxx (ipv4 address)
domain1.com:ipv6_1
domain2.com:ipv6_2
domain3.com:ipv6_3
etc...

helo_data is empty

Thank you for your reply :)

Thanks for checking that! So my thought is that IPv6 is going to be questionable here. There's really no way to do IPv6 only exim within reason because only a handful of email services support IPv6. So even if this works, either it's going to fail regularly or still go out of the IPv4 address to compensate. That said, I think this may be one worth opening a ticket with the DA devs over.
 
Thanks for checking that! So my thought is that IPv6 is going to be questionable here. There's really no way to do IPv6 only exim within reason because only a handful of email services support IPv6. So even if this works, either it's going to fail regularly or still go out of the IPv4 address to compensate. That said, I think this may be one worth opening a ticket with the DA devs over.
Thank you for your help. I'll reconfigure everything to use IPv4 for emails.

PS: I'm a fan of your service :)
 
Back
Top