1

Greetings good people,

I'm really exhausted trying to understand a certain postfix setup by going through its config files. I know this question sounds a little strange to you all as im trying to find things out being blind but I want to come up to speed on this setup so I apologize in advance. First of all I will list some generic questions about postfix and then present you with the config files.

  1. Does relayhost handle inbound emails(mails that are coming from public to your internal systems) as well? As far as I know relayhosts are most commonly used to send emails from internal hosts to valid email addresses without getting rejected as spam?

  2. Do we still need transport maps if the postfix is implemented just to act as a smarthost?

  3. Where do I need to have a valid mx record? I have once setup a host to send emails using gmail no problem but here the relayhost is just an internal ip address?

    I found below configs and their corresponding entires are as follows a) /etc/postfix/relay_domains

    abc.com  OK
    xyz.com OK
    

    b)

    /etc/postfix/transport abc.com smtp:[mail1.someinternalhost.internal]:7575 xyz.com smtp:[mail1.someinternalhost.internal]:7575
    

    c) /etc/postfix/spf_domains:

    hhh.com   #domain
    kkk.com   #domain
    

    note: the domains listed in transport are not to be found in this file.

    d) /etc/postfix/spf_transport

    hhh.com smtp:[mail1.someinternalhost]:7575
    kkk.com smtp:[mail1.someinternalhost]:7575
    

In main.cf is this:

relayhost = [172.16.25.90]:25  #just an internal ip????
relay_domains = hash:$config_directory/relay_domains, hash:/etc/postfix   /spf_domains
relay_transport = hash:$config_directory/transport, hash:/etc/postfix/spf_transport
smtpd_tls_security_level = may
smtp_tls_security_level = may
smtpd_tls_key_file = /etc/postfix/cert/wildcard.xxx.com.key
smtpd_tls_cert_file = /etc/postfix/cert/wildcard.xxx.com.cert
smtpd_tls_CAfile = /etc/postfix/cert/alphassl-intermediate.crt
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtpd_tls_received_header = yes
smtpd_tls_loglevel = 1

Please can someone shed some light on as to whats going on here? I think i know what SPF does so no need to explain what that is. :)

Many thanks in advance good people.

/B

sebix
  • 4,175
  • 2
  • 25
  • 45
bindo
  • 15
  • 1
  • 3

1 Answers1

0

relayhost value overrides all mx translation, anything not local or in a transport map will go there.

transport maps look like they routed those domains specifically, likely you keep internal email from going out an outbound system.

relay host would apply to all email to this postfix box.

Jacob Evans
  • 7,636
  • 3
  • 25
  • 55