# Record ptr reverse dns

**URL:** <https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283>\
**Category:** Community Support\
**Created:** [December 17, 2022, 9:04am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283 "2022-12-17T09:04:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [December 17, 2022, 9:04am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/1 "2022-12-17T09:04:43Z")

</div>

i have this problem with reverse dns on OCI

 ![hestia ptr with Oci](https://forum.hestiacp.com/uploads/default/original/2X/b/bed0fcbc7d48053b941b1b4c5e94e74506f9a67c.jpeg)

i must change the ptr to [omargaiani.com](http://omargaiani.com) …or i can solve in another way  
without open a ticket with OCI

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [December 17, 2022, 9:10am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/2 "2022-12-17T09:10:43Z")

</div>

v-change-sys-hostname [newhostname.com](http://newhostname.com) to update the hostname it is used for the help name look up if I am right.

> <https://github.com/hestiacp/hestiacp/blob/298701fc8e17fbf4dd23999fdc8a85aeedfdbbd9/install/deb/exim/exim4.conf.4.94.template#L373>

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [December 17, 2022, 9:30am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/3 "2022-12-17T09:30:07Z")

</div>

i m sorry but i must run : v-change-sys-hostname [newhostname.com](http://newhostname.com)  
or i change it in the exim4.conf.4.94.template  
becouse the host name in the instance is correct configurated

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [December 17, 2022, 11:16am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/4 "2022-12-17T11:16:31Z")

</div>

v-change-dus-hostname should be enough

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [December 17, 2022, 2:31pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/5 "2022-12-17T14:31:37Z")

</div>

when i instal hestia i have done the hostname like in this message of the forum

> [@Reverse DNS Practice for Mail Server](https://forum.hestiacp.com/t/reverse-dns-practice-for-mail-server/4324):
>
> In setting up a mail server, what should we setup as a reverse DNS? [mail.mydomain.com](http://mail.mydomain.com) or [mydomain.com](http://mydomain.com) The reason I’m asking is that I’ve checked with both mail-tester and mxtoolbox. They seem to have a different idea on what should be in the reverse DNS ptr. In my case, both domain and sub-domain are in the same server sharing the same email address. Thanks for any feedback.

cheers  
Omar

---

<div class="post-metadata">

**Author:** ![linkp](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/linkp/32/2863_2.png) [@linkp](https://forum.hestiacp.com/u/linkp)\
**Post date:** [December 17, 2022, 3:14pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/6 "2022-12-17T15:14:34Z")

</div>

You will need to involve OCI to alter the PTR record. The required steps are outlined in the following article.

> **[DNS in Your Virtual Cloud Network](https://docs.oracle.com/en-us/iaas/Content/Network/Concepts/dns.htm#reverse_dns)**
>
> This topic describes the choices for DNS in your virtual cloud network.

---

<div class="post-metadata">

**Author:** ![omar](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/o/f0a364/32.png) [@omar](https://forum.hestiacp.com/u/omar)\
**Post date:** [December 17, 2022, 3:23pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/7 "2022-12-17T15:23:32Z")

</div>

i have already done it with OCI before configure hestia  
my PTR record work with [hcp.omargaiani.com](http://hcp.omargaiani.com)  
i have this from mxtoobox :  
and i don’t know haw is the :

[sgm-ubuntu.subnet09121748.vcn09121748.oraclevcn.com](http://sgm-ubuntu.subnet09121748.vcn09121748.oraclevcn.com) Hello [keeper-us-east-1d.mxtoolbox.com](http://keeper-us-east-1d.mxtoolbox.com)  
may be instance name

 ![Reverse DNS does not match SMTP Banner](https://forum.hestiacp.com/uploads/default/original/2X/3/33f362c8fbdbc92b267fcabef5dddb1b874b833f.jpeg)

---

<div class="post-metadata">

**Author:** ![yesbhautik](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/yesbhautik/32/7524_2.png) [@yesbhautik](https://forum.hestiacp.com/u/yesbhautik)\
**Post date:** [October 24, 2023, 8:39am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/8 "2023-10-24T08:39:45Z")

</div>

how you set up reverse DNS in OCI instance???

---

<div class="post-metadata">

**Author:** ![yesbhautik](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/yesbhautik/32/7524_2.png) [@yesbhautik](https://forum.hestiacp.com/u/yesbhautik)\
**Post date:** [October 24, 2023, 8:40am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/9 "2023-10-24T08:40:02Z")

</div>

facing same issue!!!, please help

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [October 24, 2023, 8:43am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/10 "2023-10-24T08:43:48Z")

</div>

Contact Oracle Support …

---

<div class="post-metadata">

**Author:** ![yesbhautik](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/yesbhautik/32/7524_2.png) [@yesbhautik](https://forum.hestiacp.com/u/yesbhautik)\
**Post date:** [October 26, 2023, 2:53am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/11 "2023-10-26T02:53:17Z")

</div>

Completed process of PTR record.  
 ![image](https://forum.hestiacp.com/uploads/default/original/2X/0/0606340a03ed9d51d68c25ede24c8ef99fa02158.png)

 ![image](https://forum.hestiacp.com/uploads/default/original/2X/e/e369c7eeac47b41ad5f34362ad16580d1f5df85d.png)

But still showing this error as below.

 ![Screenshot_20231026-082113_Markup](https://forum.hestiacp.com/uploads/default/original/2X/7/72c498d3af8b1842b036fcaeecd653e3b17dd392.png)

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [October 26, 2023, 6:10am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/12 "2023-10-26T06:10:55Z")

</div>

Hostname and PTR record need to match so update the hostname

---

<div class="post-metadata">

**Author:** ![yesbhautik](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/yesbhautik/32/7524_2.png) [@yesbhautik](https://forum.hestiacp.com/u/yesbhautik)\
**Post date:** [October 26, 2023, 7:47am UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/13 "2023-10-26T07:47:58Z")

</div>

hostname is 1.cloud.yesbhautikx.co.in only  
 ![image](https://forum.hestiacp.com/uploads/default/original/2X/4/441f9c0aa577a1388119102e94679c0a503480da.png)

below is my /etc/exim4/exim4.conf.template

```auto
######################################################################
# #
# Exim configuration file for Hestia Control Panel #
# #
######################################################################

#SPAMASSASSIN = yes
#SPAM_SCORE = 50
#SPAM_REJECT_SCORE = 100
#CLAMD = yes

smtp_banner = $smtp_active_hostname
smtp_active_hostname = ${lookup dnsdb{>: defer_never,ptr=$interface_address}{${listextract{1}{$value}}}{$primary_hostname}}
add_environment = <; PATH=/bin:/usr/bin
keep_environment =
disable_ipv6 = true

smtputf8_advertise_hosts =
domainlist local_domains = dsearch;/etc/exim4/domains/
domainlist relay_to_domains = dsearch;/etc/exim4/domains/
hostlist relay_from_hosts = 127.0.0.1
hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
no_local_from_check
untrusted_set_sender = *
acl_smtp_connect = acl_check_spammers
acl_smtp_mail = acl_check_mail
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
acl_smtp_mime = acl_check_mime

.ifdef SPAMASSASSIN
spamd_address = 127.0.0.1 783
.endif

.ifdef CLAMD
av_scanner = clamd: /run/clamav/clamd.ctl
.endif

log_selector = +tls_sni

tls_advertise_hosts = *

# We test that $tls_in_sni is a valid domain, by an arbitrary email address foo@domain.tld .
# Then, we extract the domain with a function that would fail if the email address is invalid.
# If the certificate exists, we will use it, otherwise the default certificate in /etc/ssl will be used.
tls_certificate = \
        ${if and {\
                     { eq {${domain:foo@$tls_in_sni}} {$tls_in_sni}}\
                     { exists{/usr/local/hestia/ssl/mail/$tls_in_sni.crt} }\
                 }\
                 {/usr/local/hestia/ssl/mail/$tls_in_sni.crt}\
                 {/usr/local/hestia/ssl/certificate.crt}\
         }

tls_privatekey = \
        ${if and {\
                     { eq {${domain:foo@$tls_in_sni}} {$tls_in_sni}}\
                     { exists{/usr/local/hestia/ssl/mail/$tls_in_sni.key} }\
                 }\
                 {/usr/local/hestia/ssl/mail/$tls_in_sni.key}\
                 {/usr/local/hestia/ssl/certificate.key}\
         }

daemon_smtp_ports = 25 : 465 : 587
tls_on_connect_ports = 465
tls_require_ciphers = PERFORMANCE:-RSA:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.3:%SERVER_PRECEDENCE
never_users = root
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d

DKIM_DOMAIN = ${lc:${domain:$h_from:}}
DKIM_FILE = /etc/exim4/domains/${lookup{${lc:${domain:$h_from:}}}dsearch{/etc/exim4/domains/}}/dkim.pem
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}

OUTGOING_IP = /etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/ip

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}}
SMTP_RELAY_HOST = ${lookup{host}lsearch{SMTP_RELAY_FILE}}
SMTP_RELAY_PORT = ${lookup{port}lsearch{SMTP_RELAY_FILE}}
SMTP_RELAY_USER = ${lookup{user}lsearch{SMTP_RELAY_FILE}}
SMTP_RELAY_PASS = ${lookup{pass}lsearch{SMTP_RELAY_FILE}}

# Custom Filter
system_filter = /etc/exim4/system.filter
system_filter_user = Debian-exim

######################################################################
# ACL CONFIGURATION #
# Specifies access control lists for incoming SMTP mail #
######################################################################

acl_not_smtp = acl_not_smtp

begin acl

# Limit per user for PHP scripts
acl_not_smtp:
  deny message = Website of user $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
  ratelimit = 200 / 1h / $authenticated_id

  warn ratelimit = 100 / 1h / strict / $authenticated_id
  log_message = Sender rate [limitlog]: log / account / $authenticated_id / $sender_rate / $sender_rate_period

  accept

acl_check_spammers:
  accept hosts = +whitelist

  drop message = Your host in blacklist on this server.
          log_message = Host in blacklist
          hosts = +spammers

  accept

acl_check_mail:
  deny condition = ${if eq{$sender_helo_name}{}}
          message = HELO required before MAIL

  drop !authenticated = *
    	  message = Helo name contains an IP address (HELO was $sender_helo_name) and not is valid
          condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
          condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
          delay = 45s

  drop !authenticated = *
		  condition = ${if isip{$sender_helo_name}}
          message = Access denied - Invalid HELO name (See RFC2821 4.1.3)

  drop !authenticated = *
		  condition = ${if eq{[$interface_address]}{$sender_helo_name}}
          message = $interface_address is _my_ address

  accept

acl_check_rcpt:
  accept hosts = :

# Limit per email account for SMTP auhenticated users
  deny message = Email account $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
          set acl_c_msg_limit = ${if exists{/etc/exim4/domains/${lookup{${domain:$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{${lookup {$authenticated_id} lsearch{/etc/exim4/domains/${lookup{${domain:$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{$value}{${readfile{/etc/exim4/limit.conf}}}}}{${readfile{/etc/exim4/limit.conf}}} }
          ratelimit = $acl_c_msg_limit / 1h / strict/ $authenticated_id

  warn ratelimit = ${eval:$acl_c_msg_limit / 2} / 1h / strict / $authenticated_id
  log_message = Sender rate [limitlog]: log / email / $authenticated_id / $sender_rate / $sender_rate_period

  deny message = Restricted characters in address
          domains = +local_domains
          local_parts = ^[.] : ^.*[@%!/|]

  deny message = Restricted characters in address
          domains = !+local_domains
          local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

  require verify = sender

  accept hosts = +relay_from_hosts
          control = submission

  accept authenticated = *
          control = submission/domain=

  deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
          hosts = !+whitelist
          dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}

  require message = relay not permitted
          domains = +local_domains : +relay_to_domains

  deny message = smtp auth required
         sender_domains = +local_domains
         !authenticated = *

  require verify = recipient

.ifdef CLAMD
  warn set acl_m0 = no

  warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
          set acl_m0 = yes
.endif

.ifdef SPAMASSASSIN
 warn set acl_m1 = no
         set acl_m3 = no
 warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
         set acl_m1 = yes
 warn condition = ${if exists {/etc/exim4/domains/$domain/reject_spam}{yes}{no}}
         set acl_m3 = yes
.endif

  accept

acl_check_data:
.ifdef CLAMD
  deny message = Message contains a virus ($malware_name) and has been rejected
         malware = */defer_ok
         condition = ${if eq{$acl_m0}{yes}{yes}{no}}
.endif

.ifdef SPAMASSASSIN
 warn !authenticated = *
        hosts = !+relay_from_hosts
        condition = ${if < {$message_size}{1024K}}
        condition = ${if eq{$acl_m1}{yes}{yes}{no}}
        spam = debian-spamd:true/defer_ok
        add_header = X-Spam-Score: $spam_score_int
        add_header = X-Spam-Bar: $spam_bar
        add_header = X-Spam-Report: $spam_report
        set acl_m2 = $spam_score_int

 warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
        condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
        add_header = X-Spam-Status: Yes
        message = SpamAssassin detected spam (from $sender_address to $recipients).

  # Deny spam at high score if spam score > SPAM_REJECT_SCORE and delete_spam is enabled
  deny message = This message scored $spam_score spam points
         spam = debian-spamd:true
         condition = ${if eq{$acl_m3}{yes}{yes}{no}}
         condition = ${if >{$spam_score_int}{SPAM_REJECT_SCORE}{1}{0}}
.endif

  accept

acl_check_mime:
  deny message = Blacklisted file extension detected
         condition = ${if match {${lc:$mime_filename}}{\N(\.ace|\.ade|\.adp|\.app|\.arj|\.asp|\.aspx|\.asx|\.bas|\.bat|\.cab|\.cer|\.chm|\.cmd|\.cnt|\.com|\.cpl|\.crt|\.csh|\.der|\.diagcab|\.dll|\.efi|\.exe|\.fla|\.fon|\.fxp|\.gadget|\.grp|\.hlp|\.hpj|\.hta|\.htc|\.img|\.inf|\.ins|\.iso|\.isp|\.its|\.jar|\.jnlp|\.js|\.jse|\.ksh|\.lib|\.lnk|\.mad|\.maf|\.mag|\.mam|\.maq|\.mar|\.mas|\.mat|\.mau|\.mav|\.maw|\.mcf|\.mda|\.mdb|\.mde|\.mdt|\.mdw|\.mdz|\.msc|\.msh|\.msh1|\.msh1xml|\.msh2|\.msh2xml|\.mshxml|\.msi|\.msp|\.mst|\.msu|\.ops|\.osd|\.pcd|\.pif|\.pl|\.plg|\.prf|\.prg|\.printerexport|\.ps1|\.ps1xml|\.ps2|\.ps2xml|\.psc1|\.psc2|\.psd1|\.psdm1|\.pst|\.py|\.pyc|\.pyo|\.pyw|\.pyz|\.pyzw|\.reg|\.scf|\.scr|\.sct|\.sfx|\.shb|\.shs|\.swf|\.sys|\.theme|\.tmp|\.ttf|\.url|\.vb|\.vba|\.vbe|\.vbp|\.vbs|\.vhd|\.vhdx|\.vsmacros|\.vsw|\.vxd|\.webpnp|\.website|\.wim|\.ws|\.wsc|\.wsf|\.wsh|\.xbap|\.xll|\.xnk)$\N}{1}{0}}

  accept

######################################################################
# AUTHENTICATION CONFIGURATION #
######################################################################
begin authenticators

smtp_relay_login:
  driver = plaintext
  public_name = LOGIN
  hide client_send = : SMTP_RELAY_USER : SMTP_RELAY_PASS

dovecot_plain:
  driver = dovecot
  public_name = PLAIN
  server_socket = /run/dovecot/auth-client
  server_set_id = $auth1

dovecot_login:
  driver = dovecot
  public_name = LOGIN
  server_socket = /run/dovecot/auth-client
  server_set_id = $auth1

######################################################################
# ROUTERS CONFIGURATION #
# Specifies how addresses are handled #
######################################################################
begin routers

send_via_unauthenticated_smtp_relay:
  driver = manualroute
  address_data = SMTP_RELAY_HOST:SMTP_RELAY_PORT
  domains = !+local_domains
  require_files = SMTP_RELAY_FILE
  condition = ${if eq{SMTP_RELAY_USER}{}}
  transport = remote_smtp
  route_list = * ${extract{1}{:}{$address_data}}::${extract{2}{:}{$address_data}}
  no_more
  no_verify

send_via_smtp_relay:
  driver = manualroute
  address_data = SMTP_RELAY_HOST:SMTP_RELAY_PORT
  domains = !+local_domains
  require_files = SMTP_RELAY_FILE
  transport = smtp_relay_smtp
  route_list = * ${extract{1}{:}{$address_data}}::${extract{2}{:}{$address_data}}
  no_more
  no_verify

dnslookup:
  driver = dnslookup
  domains = !+local_domains
  transport = remote_smtp
  no_more

userforward:
  driver = redirect
  check_local_user
  file = $home/.forward
  require_files = ${local_part}:+${home}/.forward
  domains = +local_domains
  allow_filter
  no_verify
  no_expn
  check_ancestor
  file_transport = address_file
  pipe_transport = address_pipe
  reply_transport = address_reply

procmail:
  driver = accept
  check_local_user
  require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
  transport = procmail
  no_verify

autoreplay:
  driver = accept
  require_files = /etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${local_part}.msg
  condition = ${if exists{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${local_part}.msg}{yes}{no}}
  retry_use_local_part
  transport = userautoreply
  unseen

aliases:
  driver = redirect
  headers_add = X-redirected: yes
  data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}}}}
  require_files = /etc/exim4/domains/$domain/aliases
  redirect_router = dnslookup
  pipe_transport = address_pipe
  unseen

localuser_fwd_only:
  driver = accept
  transport = devnull
  condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/fwd_only}{true}{false}}}}

localuser_spam:
  driver = accept
  transport = local_spam_delivery
  condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}{yes}{no_such_user}}}}

localuser:
  driver = accept
  transport = local_delivery
  local_part_suffix = +* : .*
  local_part_suffix_optional
  condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}{true}{false}}

catchall:
  driver = redirect
  headers_add = X-redirected: yes
  require_files = /etc/exim4/domains/$domain/aliases
  data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}}}}
  file_transport = local_delivery
  redirect_router = dnslookup
  condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}{false}{true}}

terminate_alias:
  driver = accept
  transport = devnull
  condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}{true}{false}}

######################################################################
# TRANSPORTS CONFIGURATION #
######################################################################
begin transports

smtp_relay_smtp:
  driver = smtp
  hosts_require_auth = $host_address
  hosts_require_tls = $host_address

remote_smtp:
  driver = smtp
  helo_data = ${lookup dnsdb{>: defer_never,ptr=$sending_ip_address}{${listextract{1}{$value}}}{$primary_hostname}}
  dkim_domain = DKIM_DOMAIN
  dkim_selector = mail
  dkim_private_key = DKIM_PRIVATE_KEY
  dkim_canon = relaxed
  dkim_strict = 0
  hosts_try_fastopen = !*.l.google.com
  interface = ${if exists{OUTGOING_IP}{${readfile{OUTGOING_IP}}}}

procmail:
  driver = pipe
  command = "/usr/bin/procmail -d $local_part"
  return_path_add
  delivery_date_add
  envelope_to_add
  user = $local_part
  initgroups
  return_output

local_delivery:
  driver = appendfile
  maildir_format
  maildir_use_size_file
  user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}
  group = mail
  create_directory
  directory_mode = 770
  mode = 660
  use_lockfile = no
  delivery_date_add
  envelope_to_add
  return_path_add
  directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}"
  quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}M
  quota_warn_threshold = 75%

local_spam_delivery:
  driver = appendfile
  maildir_format
  maildir_use_size_file
  user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}
  group = mail
  create_directory
  directory_mode = 770
  mode = 660
  use_lockfile = no
  delivery_date_add
  envelope_to_add
  return_path_add
  directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}/.Spam"
  quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}M
  quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}"
  quota_warn_threshold = 75%

address_pipe:
  driver = pipe
  return_output

address_file:
  driver = appendfile
  delivery_date_add
  envelope_to_add
  return_path_add

address_reply:
  driver = autoreply

userautoreply:
  driver = autoreply
  file = /etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${extract{1}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/accounts}}}}.msg
  from = "${extract{1}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/accounts}}}}@${lookup{$domain}dsearch{/etc/exim4/domains/}}"
  headers = Content-Type: text/plain; charset=utf-8;\nContent-Transfer-Encoding: 8bit
  subject = "${if def:h_Subject: {Autoreply: \"${rfc2047:$h_Subject:}\"} {Autoreply Message}}"
  to = "${sender_address}"

devnull:
  driver = appendfile
  file = /dev/null

######################################################################
# RETRY CONFIGURATION #
######################################################################
begin retry

# Address or Domain Error Retries
# ----------------- ----- -------
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h

######################################################################
# REWRITE CONFIGURATION #
######################################################################
begin rewrite

######################################################################

```

and this is my /etc/hosts

```auto
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.1.1 yesbhautik-cloud-hestia-01 yesbhautik-cloud-hestia-01

127.0.0.1 1.cloud.yesbhautikx.co.in

```

---

<div class="post-metadata">

**Author:** ![yesbhautik](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/yesbhautik/32/7524_2.png) [@yesbhautik](https://forum.hestiacp.com/u/yesbhautik)\
**Post date:** [October 26, 2023, 7:52pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/14 "2023-10-26T19:52:41Z")

</div>

Anyone please give solution!

---

<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:** [October 26, 2023, 8:14pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/15 "2023-10-26T20:14:24Z")

</div>

You could change it manually into exim conf but exim should get it automatically…t I suppose you have several ips and exim is taking the one that doesn’t have the right ptr.

Please, show the output of these commands:

```plaintext
for i in $(ip a | awk '/inet / {print $2}' | cut -d '/' -f1); do dig -x $i | grep -vE '^;|^$';done
hostname
hostname -f
hostnamectl hostname
cat /etc/hostname

```

---

<div class="post-metadata">

**Author:** ![yesbhautik](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/yesbhautik/32/7524_2.png) [@yesbhautik](https://forum.hestiacp.com/u/yesbhautik)\
**Post date:** [October 26, 2023, 8:22pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/16 "2023-10-26T20:22:50Z")

</div>

> [@sahsanu](#):
>
> ```auto
> cat /etc/hostname
> 
> ```

 ![image](https://forum.hestiacp.com/uploads/default/original/2X/f/fed749874f924e7457bac2879d9755a133b3ce40.png)

---

<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:** [October 26, 2023, 8:41pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/17 "2023-10-26T20:41:31Z")

</div>

So, seems `10.0.0.223` is your primary ip and that is the reason exim is getting another ptr.

I don’t want to mess your net conf so I suppose the “easy” way is to modify exim4 to use the right hostname.

First backup exim4 conf just in case…

Check what are the directives using `lookup dnsdb` to get the `primary_hostname`:

```auto
grep '${lookup dnsdb{>: defer_never,ptr=$.*}{${listextract{1}{$value}}}{$primary_hostname}}' /etc/exim4/exim4.conf.template

```

You should see 3 of them, one `smtp_active_hostname` and two `helo_data`. Search them in exim conf file and just replace their values with your hostname.

```auto
smtp_active_hostname = 1.cloud.yesbhautikx.co.in
helo_data = 1.cloud.yesbhautikx.co.in
helo_data = 1.cloud.yesbhautikx.co.in

```

Save the conf file and restart exim4.

---

<div class="post-metadata">

**Author:** ![yesbhautik](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/yesbhautik/32/7524_2.png) [@yesbhautik](https://forum.hestiacp.com/u/yesbhautik)\
**Post date:** [October 27, 2023, 1:39pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/18 "2023-10-27T13:39:24Z")

</div>

> [@yesbhautik](#):
>
> `.cloud.yesbhautikx.co.in`

```auto
root@1:~# systemctl status exim4
× exim4.service - LSB: exim Mail Transport Agent
     Loaded: loaded (/etc/init.d/exim4; generated)
     Active: failed (Result: exit-code) since Fri 2023-10-27 19:05:27 IST; 3min 14s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 2854 ExecStart=/etc/init.d/exim4 start (code=exited, status=1/FAILURE)
        CPU: 193ms

Oct 27 19:05:26 1.cloud.yesbhautikx.co.in systemd[1]: Starting LSB: exim Mail Transport Agent...
Oct 27 19:05:26 1.cloud.yesbhautikx.co.in exim4[2854]: * Starting MTA
Oct 27 19:05:27 1.cloud.yesbhautikx.co.in exim4[3226]: 2023-10-27 19:05:27 Exim configuration error in line 361 of /var/lib/exim4/conf>Oct 27 19:05:27 1.cloud.yesbhautikx.co.in exim4[3226]: "helo_data" option set for the second time
Oct 27 19:05:27 1.cloud.yesbhautikx.co.in exim4[3539]: Invalid new configfile /var/lib/exim4/config.autogenerated.tmp, not installing
Oct 27 19:05:27 1.cloud.yesbhautikx.co.in exim4[3539]: /var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated
Oct 27 19:05:27 1.cloud.yesbhautikx.co.in systemd[1]: exim4.service: Control process exited, code=exited, status=1/FAILURE
Oct 27 19:05:27 1.cloud.yesbhautikx.co.in systemd[1]: exim4.service: Failed with result 'exit-code'.
Oct 27 19:05:27 1.cloud.yesbhautikx.co.in systemd[1]: Failed to start LSB: exim Mail Transport Agent.

```

 ![image](https://forum.hestiacp.com/uploads/default/original/2X/c/c0d0ae303ab53c79c2ba290b86fca048fc579091.png)

Below is my new conf. file

```auto
######################################################################
# #
# Exim configuration file for Hestia Control Panel #
# #
######################################################################

#SPAMASSASSIN = yes
#SPAM_SCORE = 50
#SPAM_REJECT_SCORE = 100
#CLAMD = yes

smtp_banner = $smtp_active_hostname
smtp_active_hostname = 1.cloud.yesbhautikx.co.in
add_environment = <; PATH=/bin:/usr/bin
keep_environment =
disable_ipv6 = true

smtputf8_advertise_hosts =
domainlist local_domains = dsearch;/etc/exim4/domains/
domainlist relay_to_domains = dsearch;/etc/exim4/domains/
hostlist relay_from_hosts = 127.0.0.1
hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
no_local_from_check
untrusted_set_sender = *
acl_smtp_connect = acl_check_spammers
acl_smtp_mail = acl_check_mail
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
acl_smtp_mime = acl_check_mime

.ifdef SPAMASSASSIN
spamd_address = 127.0.0.1 783
.endif

.ifdef CLAMD
av_scanner = clamd: /run/clamav/clamd.ctl
.endif

log_selector = +tls_sni

tls_advertise_hosts = *

# We test that $tls_in_sni is a valid domain, by an arbitrary email address foo@domain.tld .
# Then, we extract the domain with a function that would fail if the email address is invalid.
# If the certificate exists, we will use it, otherwise the default certificate in /etc/ssl will be used.
tls_certificate = \
        ${if and {\
                     { eq {${domain:foo@$tls_in_sni}} {$tls_in_sni}}\
                     { exists{/usr/local/hestia/ssl/mail/$tls_in_sni.crt} }\
                 }\
                 {/usr/local/hestia/ssl/mail/$tls_in_sni.crt}\
                 {/usr/local/hestia/ssl/certificate.crt}\
         }

tls_privatekey = \
        ${if and {\
                     { eq {${domain:foo@$tls_in_sni}} {$tls_in_sni}}\
                     { exists{/usr/local/hestia/ssl/mail/$tls_in_sni.key} }\
                 }\
                 {/usr/local/hestia/ssl/mail/$tls_in_sni.key}\
                 {/usr/local/hestia/ssl/certificate.key}\
         }

daemon_smtp_ports = 25 : 465 : 587
tls_on_connect_ports = 465
tls_require_ciphers = PERFORMANCE:-RSA:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.3:%SERVER_PRECEDENCE
never_users = root
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d

DKIM_DOMAIN = ${lc:${domain:$h_from:}}
DKIM_FILE = /etc/exim4/domains/${lookup{${lc:${domain:$h_from:}}}dsearch{/etc/exim4/domains/}}/dkim.pem
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}

OUTGOING_IP = /etc/exim4/domains/${lookup{$sender_address_domain}dsearch{/etc/exim4/domains}}/ip

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}}
SMTP_RELAY_HOST = ${lookup{host}lsearch{SMTP_RELAY_FILE}}
SMTP_RELAY_PORT = ${lookup{port}lsearch{SMTP_RELAY_FILE}}
SMTP_RELAY_USER = ${lookup{user}lsearch{SMTP_RELAY_FILE}}
SMTP_RELAY_PASS = ${lookup{pass}lsearch{SMTP_RELAY_FILE}}

# Custom Filter
system_filter = /etc/exim4/system.filter
system_filter_user = Debian-exim

######################################################################
# ACL CONFIGURATION #
# Specifies access control lists for incoming SMTP mail #
######################################################################

acl_not_smtp = acl_not_smtp

begin acl

# Limit per user for PHP scripts
acl_not_smtp:
  deny message = Website of user $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
  ratelimit = 200 / 1h / $authenticated_id

  warn ratelimit = 100 / 1h / strict / $authenticated_id
  log_message = Sender rate [limitlog]: log / account / $authenticated_id / $sender_rate / $sender_rate_period

  accept

acl_check_spammers:
  accept hosts = +whitelist

  drop message = Your host in blacklist on this server.
          log_message = Host in blacklist
          hosts = +spammers

  accept

acl_check_mail:
  deny condition = ${if eq{$sender_helo_name}{}}
          message = HELO required before MAIL

  drop !authenticated = *
    	  message = Helo name contains an IP address (HELO was $sender_helo_name) and not is valid
          condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
          condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
          delay = 45s

  drop !authenticated = *
		  condition = ${if isip{$sender_helo_name}}
          message = Access denied - Invalid HELO name (See RFC2821 4.1.3)

  drop !authenticated = *
		  condition = ${if eq{[$interface_address]}{$sender_helo_name}}
          message = $interface_address is _my_ address

  accept

acl_check_rcpt:
  accept hosts = :

# Limit per email account for SMTP auhenticated users
  deny message = Email account $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
          set acl_c_msg_limit = ${if exists{/etc/exim4/domains/${lookup{${domain:$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{${lookup {$authenticated_id} lsearch{/etc/exim4/domains/${lookup{${domain:$authenticated_id}}dsearch{/etc/exim4/domains/}}/limits}{$value}{${readfile{/etc/exim4/limit.conf}}}}}{${readfile{/etc/exim4/limit.conf}}} }
          ratelimit = $acl_c_msg_limit / 1h / strict/ $authenticated_id

  warn ratelimit = ${eval:$acl_c_msg_limit / 2} / 1h / strict / $authenticated_id
  log_message = Sender rate [limitlog]: log / email / $authenticated_id / $sender_rate / $sender_rate_period

  deny message = Restricted characters in address
          domains = +local_domains
          local_parts = ^[.] : ^.*[@%!/|]

  deny message = Restricted characters in address
          domains = !+local_domains
          local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

  require verify = sender

  accept hosts = +relay_from_hosts
          control = submission

  accept authenticated = *
          control = submission/domain=

  deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
          hosts = !+whitelist
          dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}

  require message = relay not permitted
          domains = +local_domains : +relay_to_domains

  deny message = smtp auth required
         sender_domains = +local_domains
         !authenticated = *

  require verify = recipient

.ifdef CLAMD
  warn set acl_m0 = no

  warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
          set acl_m0 = yes
.endif

.ifdef SPAMASSASSIN
 warn set acl_m1 = no
         set acl_m3 = no
 warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
         set acl_m1 = yes
 warn condition = ${if exists {/etc/exim4/domains/$domain/reject_spam}{yes}{no}}
         set acl_m3 = yes
.endif

  accept

acl_check_data:
.ifdef CLAMD
  deny message = Message contains a virus ($malware_name) and has been rejected
         malware = */defer_ok
         condition = ${if eq{$acl_m0}{yes}{yes}{no}}
.endif

.ifdef SPAMASSASSIN
 warn !authenticated = *
        hosts = !+relay_from_hosts
        condition = ${if < {$message_size}{1024K}}
        condition = ${if eq{$acl_m1}{yes}{yes}{no}}
        spam = debian-spamd:true/defer_ok
        add_header = X-Spam-Score: $spam_score_int
        add_header = X-Spam-Bar: $spam_bar
        add_header = X-Spam-Report: $spam_report
        set acl_m2 = $spam_score_int

 warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
        condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
        add_header = X-Spam-Status: Yes
        message = SpamAssassin detected spam (from $sender_address to $recipients).

  # Deny spam at high score if spam score > SPAM_REJECT_SCORE and delete_spam is enabled
  deny message = This message scored $spam_score spam points
         spam = debian-spamd:true
         condition = ${if eq{$acl_m3}{yes}{yes}{no}}
         condition = ${if >{$spam_score_int}{SPAM_REJECT_SCORE}{1}{0}}
.endif

  accept

acl_check_mime:
  deny message = Blacklisted file extension detected
         condition = ${if match {${lc:$mime_filename}}{\N(\.ace|\.ade|\.adp|\.app|\.arj|\.asp|\.aspx|\.asx|\.bas|\.bat|\.cab|\.cer|\.chm|\.cmd|\.cnt|\.com|\.cpl|\.crt|\.csh|\.der|\.diagcab|\.dll|\.efi|\.exe|\.fla|\.fon|\.fxp|\.gadget|\.grp|\.hlp|\.hpj|\.hta|\.htc|\.img|\.inf|\.ins|\.iso|\.isp|\.its|\.jar|\.jnlp|\.js|\.jse|\.ksh|\.lib|\.lnk|\.mad|\.maf|\.mag|\.mam|\.maq|\.mar|\.mas|\.mat|\.mau|\.mav|\.maw|\.mcf|\.mda|\.mdb|\.mde|\.mdt|\.mdw|\.mdz|\.msc|\.msh|\.msh1|\.msh1xml|\.msh2|\.msh2xml|\.mshxml|\.msi|\.msp|\.mst|\.msu|\.ops|\.osd|\.pcd|\.pif|\.pl|\.plg|\.prf|\.prg|\.printerexport|\.ps1|\.ps1xml|\.ps2|\.ps2xml|\.psc1|\.psc2|\.psd1|\.psdm1|\.pst|\.py|\.pyc|\.pyo|\.pyw|\.pyz|\.pyzw|\.reg|\.scf|\.scr|\.sct|\.sfx|\.shb|\.shs|\.swf|\.sys|\.theme|\.tmp|\.ttf|\.url|\.vb|\.vba|\.vbe|\.vbp|\.vbs|\.vhd|\.vhdx|\.vsmacros|\.vsw|\.vxd|\.webpnp|\.website|\.wim|\.ws|\.wsc|\.wsf|\.wsh|\.xbap|\.xll|\.xnk)$\N}{1}{0}}

  accept

######################################################################
# AUTHENTICATION CONFIGURATION #
######################################################################
begin authenticators

smtp_relay_login:
  driver = plaintext
  public_name = LOGIN
  hide client_send = : SMTP_RELAY_USER : SMTP_RELAY_PASS

dovecot_plain:
  driver = dovecot
  public_name = PLAIN
  server_socket = /run/dovecot/auth-client
  server_set_id = $auth1

dovecot_login:
  driver = dovecot
  public_name = LOGIN
  server_socket = /run/dovecot/auth-client
  server_set_id = $auth1

######################################################################
# ROUTERS CONFIGURATION #
# Specifies how addresses are handled #
######################################################################
begin routers

send_via_unauthenticated_smtp_relay:
  driver = manualroute
  address_data = SMTP_RELAY_HOST:SMTP_RELAY_PORT
  domains = !+local_domains
  require_files = SMTP_RELAY_FILE
  condition = ${if eq{SMTP_RELAY_USER}{}}
  transport = remote_smtp
  route_list = * ${extract{1}{:}{$address_data}}::${extract{2}{:}{$address_data}}
  no_more
  no_verify

send_via_smtp_relay:
  driver = manualroute
  address_data = SMTP_RELAY_HOST:SMTP_RELAY_PORT
  domains = !+local_domains
  require_files = SMTP_RELAY_FILE
  transport = smtp_relay_smtp
  route_list = * ${extract{1}{:}{$address_data}}::${extract{2}{:}{$address_data}}
  no_more
  no_verify

dnslookup:
  driver = dnslookup
  domains = !+local_domains
  transport = remote_smtp
  no_more

userforward:
  driver = redirect
  check_local_user
  file = $home/.forward
  require_files = ${local_part}:+${home}/.forward
  domains = +local_domains
  allow_filter
  no_verify
  no_expn
  check_ancestor
  file_transport = address_file
  pipe_transport = address_pipe
  reply_transport = address_reply

procmail:
  driver = accept
  check_local_user
  require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
  transport = procmail
  no_verify

autoreplay:
  driver = accept
  require_files = /etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${local_part}.msg
  condition = ${if exists{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${local_part}.msg}{yes}{no}}
  retry_use_local_part
  transport = userautoreply
  unseen

aliases:
  driver = redirect
  headers_add = X-redirected: yes
  data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}}}}
  require_files = /etc/exim4/domains/$domain/aliases
  redirect_router = dnslookup
  pipe_transport = address_pipe
  unseen

localuser_fwd_only:
  driver = accept
  transport = devnull
  condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/fwd_only}{true}{false}}}}

localuser_spam:
  driver = accept
  transport = local_spam_delivery
  condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}{yes}{no_such_user}}}}

localuser:
  driver = accept
  transport = local_delivery
  local_part_suffix = +* : .*
  local_part_suffix_optional
  condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}{true}{false}}

catchall:
  driver = redirect
  headers_add = X-redirected: yes
  require_files = /etc/exim4/domains/$domain/aliases
  data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}}}}
  file_transport = local_delivery
  redirect_router = dnslookup
  condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}{false}{true}}

terminate_alias:
  driver = accept
  transport = devnull
  condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}{true}{false}}

######################################################################
# TRANSPORTS CONFIGURATION #
######################################################################
begin transports

smtp_relay_smtp:
  driver = smtp
  hosts_require_auth = $host_address
  hosts_require_tls = $host_address

remote_smtp:
  driver = smtp
  helo_data = 1.cloud.yesbhautikx.co.in
  helo_data = 1.cloud.yesbhautikx.co.in
  dkim_domain = DKIM_DOMAIN
  dkim_selector = mail
  dkim_private_key = DKIM_PRIVATE_KEY
  dkim_canon = relaxed
  dkim_strict = 0
  hosts_try_fastopen = !*.l.google.com
  interface = ${if exists{OUTGOING_IP}{${readfile{OUTGOING_IP}}}}

procmail:
  driver = pipe
  command = "/usr/bin/procmail -d $local_part"
  return_path_add
  delivery_date_add
  envelope_to_add
  user = $local_part
  initgroups
  return_output

local_delivery:
  driver = appendfile
  maildir_format
  maildir_use_size_file
  user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}
  group = mail
  create_directory
  directory_mode = 770
  mode = 660
  use_lockfile = no
  delivery_date_add
  envelope_to_add
  return_path_add
  directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}"
  quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}M
  quota_warn_threshold = 75%

local_spam_delivery:
  driver = appendfile
  maildir_format
  maildir_use_size_file
  user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}
  group = mail
  create_directory
  directory_mode = 770
  mode = 660
  use_lockfile = no
  delivery_date_add
  envelope_to_add
  return_path_add
  directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}/.Spam"
  quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}M
  quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}"
  quota_warn_threshold = 75%

address_pipe:
  driver = pipe
  return_output

address_file:
  driver = appendfile
  delivery_date_add
  envelope_to_add
  return_path_add

address_reply:
  driver = autoreply

userautoreply:
  driver = autoreply
  file = /etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${extract{1}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/accounts}}}}.msg
  from = "${extract{1}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/accounts}}}}@${lookup{$domain}dsearch{/etc/exim4/domains/}}"
  headers = Content-Type: text/plain; charset=utf-8;\nContent-Transfer-Encoding: 8bit
  subject = "${if def:h_Subject: {Autoreply: \"${rfc2047:$h_Subject:}\"} {Autoreply Message}}"
  to = "${sender_address}"

devnull:
  driver = appendfile
  file = /dev/null

######################################################################
# RETRY CONFIGURATION #
######################################################################
begin retry

# Address or Domain Error Retries
# ----------------- ----- -------
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h

######################################################################
# REWRITE CONFIGURATION #
######################################################################
begin rewrite

######################################################################

```

---

<div class="post-metadata">

**Author:** ![Ubi](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/u/b782af/32.png) [@Ubi](https://forum.hestiacp.com/u/Ubi)\
**Post date:** [October 27, 2023, 2:04pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/19 "2023-10-27T14:04:27Z")

</div>

Please, make easier for others to help you. That’s basic common sense… [how to copy text in shell - Google Suche](https://www.google.com/search?q=how%20to%20copy%20text%20in%20shell)

---

<div class="post-metadata">

**Author:** ![yesbhautik](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/yesbhautik/32/7524_2.png) [@yesbhautik](https://forum.hestiacp.com/u/yesbhautik)\
**Post date:** [October 27, 2023, 2:06pm UTC](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283/20 "2023-10-27T14:06:50Z")

</div>

updated!

[Next page](https://forum.hestiacp.com/t/record-ptr-reverse-dns/8283.md?page=2)
