POSTFIX - Configuration de Postfix : Différence entre versions

De PedroWiki
(Nouvelle page : = /etc/postfix/main.cf = # SOFT BOUNCE # #soft_bounce = no # LOCAL PATHNAME INFORMATION # #queue_directory = /var/spool/postfix # The command_directory parameter specifi...)
 
m
Ligne 77 : Ligne 77 :
 
  #mynetworks = $config_directory/mynetworks
 
  #mynetworks = $config_directory/mynetworks
 
  #mynetworks = hash:/etc/postfix/network_table
 
  #mynetworks = hash:/etc/postfix/network_table
  mynetworks = 127.0.0.0/8
+
  '''mynetworks = 127.0.0.0/8'''
 
   
 
   
 
  #relay_domains = $mydestination
 
  #relay_domains = $mydestination
Ligne 200 : Ligne 200 :
 
   
 
   
 
  # configuration spécifique lors de la formation
 
  # configuration spécifique lors de la formation
  mydestination = $mydomain
+
  '''mydestination = $mydomain'''
  myorigin = $mydomain
+
  '''myorigin = $mydomain'''
  mydomain = ploplo.fr
+
  '''mydomain = ploplo.fr'''
  myhostname = smtp
+
  '''myhostname = smtp'''
  local_recipient_maps = proxy:unix:passwd.byname $alias_maps ldap:/etc/postfix/ldapusers.conf
+
  '''local_recipient_maps = proxy:unix:passwd.byname $alias_maps ldap:/etc/postfix/ldapusers.conf'''
  masquerade_domains = !smtp.ploplo.fr,$mydomain
+
  '''masquerade_domains = !smtp.ploplo.fr,$mydomain'''
  maquerade_domains =  
+
  '''maquerade_domains = '''
  canonical_maps = hash:/etc/postfix/canonicalmap
+
  '''canonical_maps = hash:/etc/postfix/canonicalmap'''
  sender_canonical_maps = hash:/etc/postfix/sendercanonical
+
  '''sender_canonical_maps = hash:/etc/postfix/sendercanonical'''
  recipient_canonical_maps = hash:/etc/postfix/recipientcanonical
+
  '''recipient_canonical_maps = hash:/etc/postfix/recipientcanonical'''
  relocated_maps = hash:/etc/postfix/reloc
+
  '''relocated_maps = hash:/etc/postfix/reloc'''
  mailbox_transport =  
+
  '''mailbox_transport = '''
  debug_peer_list =  
+
  '''debug_peer_list = '''
  fallback_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
+
  '''fallback_transport = lmtp:unix:/var/run/cyrus/socket/lmtp'''
  smtpd_sasl_auth_enable = yes
+
  '''smtpd_sasl_auth_enable = yes'''
  broken_sasl_auth_clients = yes
+
  '''broken_sasl_auth_clients = yes'''
  smtpd_client_restrictions = hash:/etc/postfix/net-ok,permit_sasl_authenticated,reject
+
  '''smtpd_client_restrictions = hash:/etc/postfix/net-ok,permit_sasl_authenticated,reject'''
  smtpd_sender_login_maps = ldap:/etc/postfix/ldap-loginsasl.conf
+
  '''smtpd_sender_login_maps = ldap:/etc/postfix/ldap-loginsasl.conf'''
  smtpd_sender_restrictions = reject_sender_login_mismatch
+
  '''smtpd_sender_restrictions = reject_sender_login_mismatch'''
  content_filter = mon_transport_pour_filtrage:[127.0.0.1]:10024
+
  '''content_filter = mon_transport_pour_filtrage:[127.0.0.1]:10024'''
  
 
= /etc/postfix/master.cf =
 
= /etc/postfix/master.cf =

Version du 25 septembre 2008 à 14:15

/etc/postfix/main.cf

# SOFT BOUNCE
#
#soft_bounce = no

# LOCAL PATHNAME INFORMATION
#
#queue_directory = /var/spool/postfix

# The command_directory parameter specifies the location of all
# postXXX commands.
#
command_directory = /usr/sbin

# The daemon_directory parameter specifies the location of all Postfix
# daemon programs (i.e. programs listed in the master.cf file). This
# directory must be owned by root.
#
daemon_directory = /usr/lib/postfix

# QUEUE AND PROCESS OWNERSHIP
#
#mail_owner = postfix

# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
#default_privs = nobody

# INTERNET HOST AND DOMAIN NAMES
# 
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
#mydomain = domain.tld

# SENDING MAIL
# 
#myorigin = /etc/mailname
#myorigin = $myhostname
#myorigin = $mydomain

# RECEIVING MAIL

#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost

#proxy_interfaces =
#proxy_interfaces = 1.2.3.4

# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for.
#
#mydestination = $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
#	mail.$mydomain, www.$mydomain, ftp.$mydomain

# REJECTING MAIL FOR UNKNOWN LOCAL USERS
#
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =

unknown_local_recipient_reject_code = 550

# TRUST AND RELAY CONTROL

#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host

#mynetworks = 168.100.189.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
mynetworks = 127.0.0.0/8

#relay_domains = $mydestination

# INTERNET OR INTRANET

#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]

# REJECTING UNKNOWN RELAY USERS
#
#relay_recipient_maps = hash:/etc/postfix/relay_recipients

# INPUT RATE CONTROL
# 
#in_flow_delay = 1s

# ADDRESS REWRITING

# ALIAS DATABASE
#
#alias_maps = dbm:/etc/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases

#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases

# ADDRESS EXTENSIONS (e.g., user+foo)
#
#recipient_delimiter = +

# DELIVERY TO MAILBOX
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
 
#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail

#mailbox_command = /usr/bin/procmail
#mailbox_command = /usr/bin/procmail -a "$EXTENSION"

#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus

#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =

#luser_relay = $user@other.host
#luser_relay = $local@other.host
#luser_relay = admin+$local
  
# JUNK MAIL CONTROLS
#
#header_checks = regexp:/etc/postfix/header_checks

# FAST ETRN SERVICE
# 
#fast_flush_domains = $relay_domains

# SHOW SOFTWARE VERSION OR NOT
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)

# PARALLEL DELIVERY TO THE SAME DESTINATION
#
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20

# DEBUGGING CONTROL
#
#debug_peer_level = 2

#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain

debugger_command =
	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	 xxgdb $daemon_directory/$process_name $process_id & sleep 5

# debugger_command =
#	PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
#	-dmS $process_name gdb $daemon_directory/$process_name
#	$process_id & sleep 1

# INSTALL-TIME CONFIGURATION INFORMATION
#
sendmail_path = /usr/sbin/sendmail

#newaliases_path =

#mailq_path =

setgid_group = postdrop

# html_directory: The location of the Postfix HTML documentation.
#
#html_directory =

# manpage_directory: The location of the Postfix on-line manual pages.
#
#manpage_directory =

# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
#sample_directory =

# readme_directory: The location of the Postfix README files.
#
#readme_directory =

# configuration spécifique lors de la formation
mydestination = $mydomain
myorigin = $mydomain
mydomain = ploplo.fr
myhostname = smtp
local_recipient_maps = proxy:unix:passwd.byname $alias_maps ldap:/etc/postfix/ldapusers.conf
masquerade_domains = !smtp.ploplo.fr,$mydomain
maquerade_domains = 
canonical_maps = hash:/etc/postfix/canonicalmap
sender_canonical_maps = hash:/etc/postfix/sendercanonical
recipient_canonical_maps = hash:/etc/postfix/recipientcanonical
relocated_maps = hash:/etc/postfix/reloc
mailbox_transport = 
debug_peer_list = 
fallback_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_client_restrictions = hash:/etc/postfix/net-ok,permit_sasl_authenticated,reject
smtpd_sender_login_maps = ldap:/etc/postfix/ldap-loginsasl.conf
smtpd_sender_restrictions = reject_sender_login_mismatch
content_filter = mon_transport_pour_filtrage:[127.0.0.1]:10024

/etc/postfix/master.cf