LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-25-2003, 05:05 AM   #1
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
configuring postfix 2


As a side note: this is just a thread part of my main thread which is destinated at securing debian!

This postfix configuration should be pretty easy to read. Well you need postfix 2.x for it to work properly (rbl). You can get a backport at {URL=http://people.debian.org/~nobse/]this page[/URL]. I've chosen Postfix 2 for it's improvement for LMTP (which will be required on 1 server), and this is a base image for all servers. You can easily implement features like SMTP AUTH, SSL, etc with this configuration:
Code:
----------------------------------------------------------------------
configured postfix
----------------------------------------------------------------------

created /etc/postfix/main.cf:

# ====================================================================
# base configuration
# --------------------------------------------------------------------
alias_database			= hash:/etc/aliases
alias_maps			= $alias_database
allow_percent_hack		= no
append_dot_mydomain		= no
biff				= no
#canonical_maps			= hash:/etc/postfix/canonical
command_directory		= /usr/sbin
daemon_directory		= /usr/lib/postfix
inet_interfaces			= 127.0.0.1
myhostname			= debian.markus-welsch.de
program_directory		= /usr/lib/postfix
queue_minfree			= 26214400
setgid_group			= postdrop
#tls_daemon_random_source	= dev:/dev/urandom
#tls_random_source		= dev:/dev/urandom
# ====================================================================



# ====================================================================
# smtp outgoing
# --------------------------------------------------------------------
delay_warning_time		= 24h
#relayhost			= [example.relayhost.net]
#smtp_sasl_auth_enable		= yes
#smtp_sasl_password_maps	= hash:/etc/postfix/smtpauth_password
#smtp_sasl_security_options	= noanonymous
#smtp_tls_CAfile		= /etc/postfix/ssl/
#smtp_tls_certfile		= /etc/postfix/ssl/
#smtp_tls_keyfile		= /etc/postfix/ssl/
#smtp_tls_persite		= hash:/etc/postfix/tls_sites
#smtp_use_tls			= yes
#transport_maps			= hash:/etc/postfix/transport
# ====================================================================


# ====================================================================
# smtp incomming
# --------------------------------------------------------------------
#broken_sasl_auth_clients	= yes
disable_vrfy_command		= yes
local_recipient_maps		= $alias_maps,unix:passwd.byname
mydestination			= $myhostname
mynetworks			= 127.0.0.0/8
#permix_mx_backup_networks	= hash:/etc/postfix/mx_backup_networks
#relay_clientcerts		= hash:/etc/postfix/relay_clientcerts
#relay_domains			= hash:/etc/postfix/relay_domains
#relay_recipient_maps		= hash:/etc/postfix/relay_recipient
#relocated_maps			= hash:/etc/postfix/relocated
smtpd_etrn_restrictions		= reject
smtpd_helo_required		= yes
smtpd_recipient_restrictions	=
	reject_non_fqdn_sender, 
	reject_non_fqdn_recipient,
	reject_unknown_sender_domain,
	reject_unknown_recipient_domain,
	permit_mynetworks,
#	permix_mx_backup,
#	permit_sasl_authenticated,
#	permit_tls_clientcerts,
	reject_unauth_destination,
#	reject_sender_login_mismatch,
#	check_recipient_maps,
	reject_unauth_pipelining,
	reject_invalid_hostname,
	reject_non_fqdn_hostname,
#	reject_rbl_client list.dsbl.org,
#	reject_rbl_client proxies.blackholes.wirehub.net,
#	reject_rbl_client proxies.relays.monkeys.com,
#	reject_rbl_client relays.ordb.org,
	permit
#smtpd_sasl_auth_enable		= yes
#smtpd_sasl_local_domain	= $myhostname
#smtpd_sasl_security_options	= noanonymous
#smtpd_sender_login_maps	= hash:/etc/postfix/sender_login
#smtpd_tls_CAfile		= /etc/postfix/ssl/
#smtpd_tls_cert_file		= /etc/postfix/ssl/
#smtpd_tls_key_file		= /etc/postfix/ssl/
#smtpd_use_tls			= yes
swap_bangpath			= no
#virtual_maps			= /etc/postfix/virtual
# ====================================================================



adjusted /etc/postfix/master.cf:

	commented out following line:
		qmgr	fifo	n	-	-	300 1	qmgr

	and uncommented following line:
		qmgr	 fifo	n	-	-	300 1	nqmgr


	this will be a huge performance increasement in case the
	server gets under heavy mail load. it doesn't affect the
	performance under normal load!
----------------------------------------------------------------------




----------------------------------------------------------------------
disabled sync of postfix chroot files	      [ /etc/default/postfix ]
----------------------------------------------------------------------
	# synchronization disabled due to filesystem modifications
	SYNC_CHROOT="n"
----------------------------------------------------------------------




----------------------------------------------------------------------
fixed postfix init script		       [ /etc/init.d/postfix ]
----------------------------------------------------------------------
	replaced

	if [ -n "$NEED_CHROOT" -a -n "$SYNC_CHROOT" ]; then

		with

	if [ "$NEED_CHROOT" = "y" -a "$SYNC_CHROOT" = "y" ]; then


	this stops syncing the chroot area EVERY TIME the daemon is
	restarted (produces filesystem changes and AIDE reports those)
----------------------------------------------------------------------
If you have any questions just post!

Last edited by markus1982; 05-25-2003 at 05:59 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring postfix to work on a LAN zulu8300 Linux - Software 4 06-22-2004 02:42 PM
Configuring Postfix to recieve on a different port?? tamakizu Linux - Networking 4 04-30-2004 01:33 PM
Configuring Maildir with Postfix and Dovecot umbraeOtheisles Linux - Software 0 04-16-2004 09:33 AM
help configuring postfix importboy03 Linux - Software 1 05-01-2003 12:45 AM
Configuring Postfix on Mdk 8.1 JimKyle Linux - General 0 01-16-2002 09:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration