Install Postfix to configure SMTP Server. -- Fedora 16

[root@mail ~]# yum -y install postfix

[root@mail ~]# vi /etc/postfix/main.cf

# line 75: uncomment and specify hostname
myhostname = mail.unixchosting.com

# line 83: uncomment and specify domain name
mydomain = unixchosting.com

# line 99: uncomment
myorigin = $mydomain

# line 116: change
inet_interfaces = all

# line 119: change if you use only IPv4
inet_protocols = ipv4

# line 164: add
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

# line 264: uncomment and specify your LAN
mynetworks = 127.0.0.0/8,10.0.0.0/24

# line 419: uncomment (use Maildir)
home_mailbox = Maildir/

# line 545: uncomment, line 546: add
header_checks = regexp:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks

# line 571: add
smtpd_banner = $myhostname ESMTP

# add at the last line
# limit an email size 10M
message_size_limit = 10485760

# limit mailbox 1G
mailbox_size_limit = 1073741824

# for SMTP-Auth settings
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_client_restrictions = permit_mynetworks,reject_unknown_client,permit
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject

[root@mail ~]#
vi /etc/postfix/header_checks

# add at the head
# reject if email address is empty
/^From:.*<#.*@.*>/ REJECT
/^Return-Path:.*<#.*@.*>/ REJECT

[root@mail ~]#
vi /etc/postfix/body_checks

# reject if includes 'example.com' in mail body
/^(|[^>].*)example.com/ REJECT

[root@mail ~]#
systemctl stop sendmail.service

[root@mail ~]#
systemctl disable sendmail.service

[root@mail ~]#
alternatives --config mta
 
# change default MTA


There are 2 programs which provide 'mta'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/sbin/sendmail.sendmail
   2           /usr/sbin/sendmail.postfix
Enter to keep the current selection[+], or type selection number:
2
 
# change to Postfix
[root@mail ~]#
systemctl start postfix.service

[root@mail ~]#
chkconfig postfix on

  • 4 Users Found This Useful
Was this answer helpful?

Related Articles

How to install ionCube Loader on Ubuntu

ionCube is a Zend-Engine extension to encode PHP files. To install it on Ubuntu first...

Install Dovecot to Configure POP/IMAP Server. -- Fedora 16

[root@mail ~]# yum -y install dovecot [root@mail ~]# vi /etc/dovecot/dovecot.conf # line...

Create SSL Certficates for Mail server - Fedora 16

[root@www ~]# cd /etc/pki/tls/certs [root@www certs]# make server.key umask 77 ; \...

Configure Postfix and Dovecot for SSL - Fedora 16

[1] Create certifcate first. Click here[2] Configure Postfix and Dovecot for SSL [root@www ~]#...

Install Cairo Dock 3.0 on Ubuntu/Linux Mint

To Install Cairo Dock 3.0 on Ubuntu/Linux Mint (Press Ctrl+Alt+T) and copy the following commands...