Dear visitor, in case we do not cover a topic you are looking for, then feel free to ask in our freshly created forum for IT-professionals for a solution. We hope our visitors can help you out with your questions. Have a good one. ~ Tom.

How to configure conditional smart relay with sendmail on Rocky Linux 8


Rocky Linux 8 with sendmail hosting multiple domains works fine. Only one domain should be configured to use a smarthost with a third party anti-spam service. We want to prevent that every e-mail will be relayed to one external smart host, all other e-mails should go out directly.

  1. Create a smarttable file.
    # touch /etc/mail/smarttable
  2. Download smarttable.m4 and copy the file to /usr/share/sendmail-cf/feature/
    # cd /usr/share/sendmail-cf/feature/
    # wget
  3. Add following entry to your file.
  4. Rebuild the sendmail config
    # /etc/mail/make
    # service sendmail restart
  5. Create your smarttable
    # cat /etc/mail/smarttable
  6. Rebuild smartable by using makemap
    # makemap hash /etc/mail/smarttable < /etc/mail/smarttable

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.