postfix/postfix.txt

changeset 146
bc79b3740eb8
child 179
6539a982f682
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/postfix/postfix.txt	Mon Apr 06 23:53:05 2009 +0200
     1.3 @@ -0,0 +1,340 @@
     1.4 +<file name="Makefile">
     1.5 +##
     1.6 +##  @l_prefix@/etc/postfix/Makefile -- maintainance procedures
     1.7 +##
     1.8 +
     1.9 +#   path configuration
    1.10 +PREFIX       = @l_prefix@
    1.11 +SBINDIR      = $(PREFIX)/sbin
    1.12 +ETCDIR       = $(PREFIX)/etc
    1.13 +
    1.14 +#   program configuration
    1.15 +RC           = $(ETCDIR)/rc
    1.16 +POSTALIAS    = $(SBINDIR)/postalias
    1.17 +POSTMAP      = $(SBINDIR)/postmap
    1.18 +POSTFIX      = $(SBINDIR)/postfix
    1.19 +
    1.20 +#   table filename configuration
    1.21 +T_ACCESS     = access
    1.22 +T_CANONICAL  = canonical
    1.23 +T_GENERIC    = generic
    1.24 +T_VIRTUAL    = virtual
    1.25 +T_RELOCATED  = relocated
    1.26 +T_TRANSPORT  = transport
    1.27 +T_ALIASES    = aliases
    1.28 +
    1.29 +#   dependency tracking
    1.30 +TIMESTAMP    = .up-to-date
    1.31 +DEPENDENCIES = Makefile master.cf main.cf $(TABLES)
    1.32 +
    1.33 +#   managed tables:
    1.34 +#   - use extension ".db" for hash tables ("hash")
    1.35 +#   - use no extension for regex tables ("pcre")
    1.36 +TABLES = \
    1.37 +    $(T_ACCESS).db    \
    1.38 +    $(T_CANONICAL).db \
    1.39 +    $(T_GENERIC).db   \
    1.40 +    $(T_VIRTUAL).db   \
    1.41 +    $(T_RELOCATED).db \
    1.42 +    $(T_TRANSPORT).db \
    1.43 +    $(T_ALIASES).db
    1.44 +
    1.45 +#   default target
    1.46 +all: $(TABLES) $(TIMESTAMP)
    1.47 +
    1.48 +#   implicit checking and reloading
    1.49 +$(TIMESTAMP): $(DEPENDENCIES)
    1.50 +	$(POSTFIX) check
    1.51 +	$(POSTFIX) reload >/dev/null 2>&1 || true
    1.52 +	touch $(TIMESTAMP) && chmod 600 $(TIMESTAMP)
    1.53 +
    1.54 +#   explicit checking
    1.55 +check:
    1.56 +	$(POSTFIX) check
    1.57 +
    1.58 +#   hash table update targets
    1.59 +$(T_ACCESS).db: $(T_ACCESS) $(MAKEFILE)
    1.60 +	$(POSTMAP) hash:$(T_ACCESS)
    1.61 +$(T_CANONICAL).db: $(T_CANONICAL) $(MAKEFILE)
    1.62 +	$(POSTMAP) hash:$(T_CANONICAL)
    1.63 +$(T_GENERIC).db: $(T_GENERIC) $(MAKEFILE)
    1.64 +	$(POSTMAP) hash:$(T_GENERIC)
    1.65 +$(T_VIRTUAL).db: $(T_VIRTUAL) $(MAKEFILE)
    1.66 +	$(POSTMAP) hash:$(T_VIRTUAL)
    1.67 +$(T_RELOCATED).db: $(T_RELOCATED) $(MAKEFILE)
    1.68 +	$(POSTMAP) hash:$(T_RELOCATED)
    1.69 +$(T_TRANSPORT).db: $(T_TRANSPORT) $(MAKEFILE)
    1.70 +	$(POSTMAP) hash:$(T_TRANSPORT)
    1.71 +$(T_ALIASES).db: $(T_ALIASES) $(MAKEFILE)
    1.72 +	$(POSTALIAS) hash:$(T_ALIASES)
    1.73 +
    1.74 +#   cleanup target
    1.75 +clean: 
    1.76 +	-rm -f $(TABLES)
    1.77 +	-rm -f $(TIMESTAMP)
    1.78 +
    1.79 +#   process management
    1.80 +start:
    1.81 +	$(RC) postfix start
    1.82 +reload:
    1.83 +	$(RC) postfix reload
    1.84 +stop:
    1.85 +	$(RC) postfix stop
    1.86 +
    1.87 +</file>
    1.88 +<file name="master.cf">
    1.89 +##
    1.90 +##  @l_prefix@/etc/postfix/master.cf -- Postfix master process table
    1.91 +##
    1.92 +# ==========================================================================
    1.93 +# service type  private unpriv  chroot  wakeup  maxproc command + args
    1.94 +#               (yes)   (yes)   (yes)   (never) (100)
    1.95 +# ==========================================================================
    1.96 +smtp       inet  n       -       n       -       -       smtpd
    1.97 +#628       inet  n       -       n       -       -       qmqpd
    1.98 +pickup     fifo  n       -       n       60      1       pickup
    1.99 +cleanup    unix  n       -       n       -       0       cleanup
   1.100 +qmgr       fifo  n       -       n       300     1       qmgr
   1.101 +tlsmgr     unix  -       -       n       1000?   1       tlsmgr
   1.102 +rewrite    unix  -       -       n       -       -       trivial-rewrite
   1.103 +bounce     unix  -       -       n       -       0       bounce
   1.104 +defer      unix  -       -       n       -       0       bounce
   1.105 +trace      unix  -       -       n       -       0       bounce
   1.106 +verify     unix  -       -       n       -       1       verify
   1.107 +flush      unix  n       -       n       1000?   0       flush
   1.108 +proxymap   unix  -       -       n       -       -       proxymap
   1.109 +proxywrite unix  -       -       n       -       -       proxymap
   1.110 +smtp       unix  -       -       n       -       -       smtp
   1.111 +relay      unix  -       -       n       -       -       smtp -o fallback_relay=
   1.112 +showq      unix  n       -       n       -       -       showq
   1.113 +error      unix  -       -       n       -       -       error
   1.114 +retry      unix  -       -       n       -       -       error
   1.115 +local      unix  -       n       n       -       -       local
   1.116 +virtual    unix  -       n       n       -       -       virtual
   1.117 +lmtp       unix  -       -       n       -       -       lmtp
   1.118 +anvil      unix  -       -       n       -       1       anvil
   1.119 +scache     unix  -       -       n       -       1       scache
   1.120 +#maildrop  unix  -       n       n       -       -       pipe flags=DRhu user=@l_nusr@ argv=@l_prefix@/bin/maildrop -d ${recipient}
   1.121 +#cyrus     unix  -       n       n       -       -       pipe user=@l_nusr@ argv=@l_prefix@/bin/cyrdeliver -e -r ${sender} -m ${extension} ${user}
   1.122 +#uucp      unix  -       n       n       -       -       pipe flags=Fqhu user=@l_nusr@ argv=@l_prefix@/bin/uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
   1.123 +#ifmail    unix  -       n       n       -       -       pipe flags=F user=@l_nusr@ argv=@l_prefix@/bin/ifmail -r $nexthop ($recipient)
   1.124 +#bsmtp     unix  -       n       n       -       -       pipe flags=Fq. user=@l_nusr@ argv=@l_prefix@/bin/bsmtp -f $sender $nexthop $recipient
   1.125 +</file>
   1.126 +<file name="main.cf">
   1.127 +##
   1.128 +##  @l_prefix@/etc/postfix/main.cf -- Postfix main configuration
   1.129 +##
   1.130 +##  Run "@l_prefix@/sbin/postconf -n" to see all parameters overriding
   1.131 +##  defaults, run "@l_prefix@/sbin/postconf -d" to see all possible
   1.132 +##  parameters and their defaults and read the following manual
   1.133 +##  pages for description of each parameter: bounce(8), cleanup(8),
   1.134 +##  defer(8), error(8), flush(8), lmtp(8), local(8), master(8),
   1.135 +##  pickup(8), pipe(8), qmgr(8), showq(8), smtp(8), smtpd(8), spawn(8),
   1.136 +##  trivial-rewrite(8).
   1.137 +##
   1.138 +
   1.139 +#   users
   1.140 +mail_owner                    = @l_musr@
   1.141 +setgid_group                  = @l_rgrp@
   1.142 +default_privs                 = @l_nusr@
   1.143 +
   1.144 +#   local host
   1.145 +myhostname                    = mail.example.com
   1.146 +mydomain                      = example.com
   1.147 +myorigin                      = $myhostname
   1.148 +
   1.149 +#   smtp daemon
   1.150 +#smtpd_banner                 = $myhostname ESMTP $mail_name
   1.151 +inet_interfaces               = 127.0.0.1
   1.152 +
   1.153 +#   smtp client
   1.154 +smtp_bind_address             = 127.0.0.1
   1.155 +
   1.156 +#   relaying
   1.157 +mynetworks                    = 127.0.0.0/8
   1.158 +#mydestination                = $myhostname, localhost.$mydomain
   1.159 +#relay_domains                = $mydestination, 
   1.160 +#                               hash:@l_prefix@/etc/postfix/access
   1.161 +#smtpd_recipient_restrictions = permit_mynetworks, 
   1.162 +#                               check_client_access hash:@l_prefix@/etc/postfix/access,
   1.163 +#                               reject_unauth_destination
   1.164 +
   1.165 +#   maps
   1.166 +#canonical_maps               = hash:@l_prefix@/etc/postfix/canonical
   1.167 +#smtp_generic_maps            = hash:@l_prefix@/etc/postfix/generic
   1.168 +#virtual_alias_maps           = hash:@l_prefix@/etc/postfix/virtual
   1.169 +#relocated_maps               = hash:@l_prefix@/etc/postfix/relocated
   1.170 +#transport_maps               = hash:@l_prefix@/etc/postfix/transport
   1.171 +alias_maps                    = hash:@l_prefix@/etc/postfix/aliases
   1.172 +alias_database                = hash:@l_prefix@/etc/postfix/aliases
   1.173 +
   1.174 +#   local delivery
   1.175 +#local_recipient_maps         = proxy:unix:passwd.byname $alias_maps
   1.176 +recipient_delimiter           = +
   1.177 +mailbox_command               = @l_prefix@/bin/procmail -a "$EXTENSION"
   1.178 +
   1.179 +</file>
   1.180 +<file name="access">
   1.181 +##
   1.182 +##  @l_prefix@/etc/postfix/access -- access control for relaying
   1.183 +##
   1.184 +##  Searched for both the client (hostname, parent domains, IP address,
   1.185 +##  networks obtained by stripping least significant octets from IP
   1.186 +##  address) and destination address (resolved destination address,
   1.187 +##  parent domain, or localpart@) in order to allow relaying. Rejects
   1.188 +##  the request if the result is REJECT or "[45]XX text". Permits the
   1.189 +##  request if the result is OK or RELAY or all-numerical.
   1.190 +##
   1.191 +
   1.192 +#   Syntax (see access(5)):
   1.193 +#   | user@domain        action
   1.194 +#   | domain             action
   1.195 +#   | user@              action
   1.196 +#   | net.work.addr.ess  action
   1.197 +#   | net.work.addr      action
   1.198 +#   | net.work           action
   1.199 +#   | net                action
   1.200 +#   where "action" is one of:
   1.201 +#   "[45]NN text", "REJECT", "OK", "restriction..."
   1.202 +#
   1.203 +#   Examples:
   1.204 +#   | mail.example.com OK
   1.205 +#   | example.com      REJECT
   1.206 +#   | 192.168.0.1      OK
   1.207 +#   | 192.168          REJECT
   1.208 +#   | postmaster@      OK
   1.209 +
   1.210 +</file>
   1.211 +<file name="virtual">
   1.212 +##
   1.213 +##  @l_prefix@/etc/postfix/virtual -- virtual address translation
   1.214 +##
   1.215 +##  Searched for virtual addresses user@domain, user and @domain
   1.216 +##  (in this order). It redirect mail for all recipients, local or
   1.217 +##  remote. The mapping affects only envelope recipients.
   1.218 +##
   1.219 +
   1.220 +#   Syntax (see virtual(5)):
   1.221 +#   | user@domain  address, address, ...
   1.222 +#   | user         address, address, ...
   1.223 +#   | @domain      address, address, ...
   1.224 +#   
   1.225 +#   Examples:
   1.226 +#   | @example.com               john@example.com
   1.227 +#   | postmaster@example.com     postmaster
   1.228 +#   | john@example1.com          john1
   1.229 +#   | john@example2.com          john2
   1.230 +
   1.231 +</file>
   1.232 +<file name="aliases">
   1.233 +##
   1.234 +##  @l_prefix@/etc/postfix/aliases -- local mailbox aliases
   1.235 +##
   1.236 +##  Searched for virtual addresses user@domain, user and @domain
   1.237 +##  (in this order). It redirect mail for all recipients, local or
   1.238 +##  remote. The mapping affects only envelope recipients.
   1.239 +##
   1.240 +
   1.241 +#   Syntax (see aliases(5)):
   1.242 +#   | name:         value, value, ...
   1.243 +#   where value is one of:
   1.244 +#   "address", "/file/name", "|command", ":include:/file/name"
   1.245 +#
   1.246 +#   Examples:
   1.247 +#   | john.doe:     john, doe
   1.248 +#   | robot:        |/path/to/robot
   1.249 +#   | archive:      /path/to/archive
   1.250 +#   | users:        :include:/path/to/users.list
   1.251 +#   | owner-users:  john.doe
   1.252 +
   1.253 +#   standard mail targets
   1.254 +nobody:                /dev/null
   1.255 +MAILER-DAEMON:         postmaster
   1.256 +
   1.257 +#   mailbox names for common services, roles and functions
   1.258 +#   (see RFC2142 for more details and expanded list of names)
   1.259 +postmaster:            root
   1.260 +hostmaster:            root
   1.261 +security:              root
   1.262 +abuse:                 root
   1.263 +
   1.264 +#   save unprivileged user storage of careless admins
   1.265 +root:                  /dev/null
   1.266 +
   1.267 +</file>
   1.268 +<file name="canonical">
   1.269 +##
   1.270 +##  @l_prefix@/etc/postfix/canonical -- address canonification on mail receiving
   1.271 +##
   1.272 +##  Searched for canonical addresses for user@domain, user and @domain
   1.273 +##  (in this order).
   1.274 +##
   1.275 +
   1.276 +#   Syntax (see canonical(5)):
   1.277 +#   | user@domain  address
   1.278 +#   | user         address
   1.279 +#   | @domain      address
   1.280 +#
   1.281 +#   Examples:
   1.282 +#   | postmaster@mail.example.com postmaster@example.com
   1.283 +#   | john                        John.Doe
   1.284 +#   | @example.com                @example.com
   1.285 +
   1.286 +</file>
   1.287 +<file name="relocated">
   1.288 +##
   1.289 +##  @l_prefix@/etc/postfix/relocated -- relocate obsolete addresses
   1.290 +##
   1.291 +##  Searched for relocated addresses user@domain, user and @domain
   1.292 +##  (in this order). It bounces mail for all recipients.
   1.293 +##
   1.294 +
   1.295 +#   Syntax (see relocated(5)):
   1.296 +#   | user@domain     address
   1.297 +#   | user            address
   1.298 +#   | @domain         address
   1.299 +#
   1.300 +#   Examples:
   1.301 +#   | john@invalid    john@example.com
   1.302 +#   | john            john@example.com
   1.303 +#   | @invalid        john@example.com
   1.304 +
   1.305 +</file>
   1.306 +<file name="generic">
   1.307 +##
   1.308 +##  @l_prefix@/etc/postfix/generic -- address canonification on mail sending
   1.309 +##
   1.310 +##  Searched for canonical addresses for user@domain, user and @domain
   1.311 +##  (in this order).
   1.312 +##
   1.313 +
   1.314 +#   Syntax (see generic(5)):
   1.315 +#   | user@domain  address
   1.316 +#   | user         address
   1.317 +#   | @domain      address
   1.318 +#
   1.319 +#   Examples:
   1.320 +#   | postmaster@mail.example.com postmaster@example.com
   1.321 +#   | john                        John.Doe
   1.322 +#   | @example.com                @example.com
   1.323 +
   1.324 +</file>
   1.325 +<file name="transport">
   1.326 +##
   1.327 +##  @l_prefix@/etc/postfix/transport -- transport selection
   1.328 +##
   1.329 +##  Searched for domain and .domain (in this order). It selects the
   1.330 +##  specified transport facility for delivery.
   1.331 +##
   1.332 +
   1.333 +#   Syntax (see transport(5)):
   1.334 +#   | domain  transport:nexthop
   1.335 +#   | .domain transport:nexthop
   1.336 +#
   1.337 +#   Examples:
   1.338 +#   | me.example.com             local:
   1.339 +#   | you.example.com            smtp:mail.example.com:2525
   1.340 +#   | example.com                smtp:mail.example.com
   1.341 +#   | .example.com               smtp:mail.example.com
   1.342 +
   1.343 +</file>

mercurial