QmailtoasterMain Page | About | Help | FAQ | Special pages | Log in

Printable version | Disclaimers | Privacy policy

How to Setup Postfix on a Generic Server for Log Delivery

From Qmailtoaster

The Problem

The following outlines the steps taken if you have a generic server within your local network and want it to be able to send emails such as logs, etc. to an email account on your QMT server or an external email. This can be achieved by installing Postfix on the generic server.

The following solution was taken from the QMT mailinglist and credit goes to Eric Shubert.

Please note that if you are on an internal network, you need to have the proper settings for your firewall and port forwarding (ie port 587), I will not cover that here. Also, if you are using an external ISP's mailserver you must have a valid email account setup.

The Solution

For the instructions below: {replace what's in braces, and remove braces}

    # yum install -y postfix
# yum remove -y sendmail

# cd /etc/pki/tls/certs
# make postcert.pem

    # echo "{submission.mailserver.com}:587 {user:passwd}" > /etc/postfix/sasl_passwd
# chmod 600 /etc/postfix/sasl_passwd
# chown root:root /etc/postfix/sasl_passwd
# postmap /etc/postfix/sasl_passwd

Edit /etc/aliases if desired by adding the following line to the bottom of the file - "root: sysadmin", save and exit the file, then type the newaliases command:

    # newaliases

Edit /etc/postfix/main.cf, changing or adding these lines within the file from the default values (this was on Fedora 13):

    myorigin = $mydomain
#mydestination =
mynetworks_style = host
relayhost = {submission.mailserver.com}:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_use_tls = yes
smtp_tls_CAfile = /etc/pki/tls/certs/postcert.pem
smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache

Save and exit the file.

    # service postfix start
    # chkconfig postfix on

That should do it!

Note, this configuration relies on hostname being set correctly for your domain. If it's not, you'll need to change the myorigin variable appropriately.

Reference (thread starting point): qmailtoaster Is it getting Blocked?

Retrieved from "http://wiki.qmailtoaster.com/index.php/How_to_Setup_Postfix_on_a_Generic_Server_for_Log_Delivery"

This page has been accessed 3,666 times. This page was last modified on 2 October 2010, at 18:11. Content is available under GNU Free Documentation License 1.2.


Main page
Community portal
Current events
Recent changes
Random page
View source
Editing help
This page
Discuss this page
New section
Printable version
Page history
What links here
Related changes
My pages
Log in / create account
Special pages
New pages
File list