Postfix to use a third party SMTP server

3 Mar

This instructs postfix to use a third party SMTP server. It’s useful when you want to relay e-mail from an internal server which uses a dynamic IP address.

Ensure postfix is installed, and let’s have all e-mail sent to root relay to an external e-mail address:

nano /etc/postfix/sender_canonical
root     youremail@provider.tld

Postfix requires the modifications to be hashed:

postmap hash:/etc/postfix/sender_canonical
postconf -e "sender_canonical_maps=hash:/etc/postfix/sender_canonical"

Now let’s instruct postfix to use third party SMTP to route e-mail:

nano /etc/postfix/main.cf
relayhost = yoursmtp.provider.tld
service postfix restart

Finally update system aliases:

nano /etc/aliases
root:   email@domain.tld
newaliases

23 thoughts on “Postfix to use a third party SMTP server

  1. Wow, incredible weblog structure! How lengthy have you been running a blog
    for? you made running a blog look easy. The entire look of your
    site is fantastic, let alone the content material!

  2. Need top-notch roof installation in Lancaster? Roof Installation Pros delivers professional services with a skilled team ready to handle all roof types. Their work is reliable, durable, and adds value to your home—trusted by many for timely and budget-friendly roofing solutions.

  3. When it comes to roof installation in Lancaster, Roof Installation Pros stands out for quality and reliability. Their expert team works with all roof types, delivering strong, protective installations that add value. Highly rated for affordable, on-time, and professional roofing work.

  4. Need top-notch roof installation in Lancaster? Roof Installation Pros delivers professional services with a skilled team ready to handle all roof types. Their work is reliable, durable, and adds value to your home—trusted by many for timely and budget-friendly roofing solutions.

  5. Searching for trusted roof installation in Lancaster? Roof Installation Pros provides expert services across all roofing styles. Their experienced team guarantees strong, lasting installations that enhance your home’s protection and market value. Excellent service, always on time and within budget.

  6. you are in reality a excellent webmaster. The site loading pace is amazing.

    It seems that you’re doing any unique trick. Furthermore, The
    contents are masterwork. you’ve done a magnificent
    job in this topic!

  7. hi!,I love your writing very a lot! proportion we keep up a correspondence extra about your post on AOL? I need an expert in this house to resolve my problem. May be that’s you! Having a look ahead to peer you.

Leave a Reply

Your email address will not be published.