Postfix

From Edgar BV Wiki
Revision as of 15:03, 16 May 2008 by Red (talk | contribs)
Jump to navigation Jump to search
Check configuration
postconf -n

/etc/postfix/virtual
# In order to translate any mailbox address from one domain to a mapped user on another domain add the following entries:

# account1@olddomain.ext account1
# account2@olddomain.ext account2
# newdomain.ext DOMAIN
# @newdomain.ext @olddomain.ext

# this will ensure that account1@olddomain.ext AND account1@newdomain.ext is delivered to account1 and account2@[newdomain or olddomain].ext goes to account2

# After changing this file run
# postmap virtual

Catchalls are set up with
@domain.ext	userid

/etc/postfix/virtual-domains
# This file contains the domains for which postfix will accept email
# It's not a hash file, so no need to run postmap on it.

To accept messages in the mailqueue and defer them untill the primary MX server is up again,
add the domain.ext to /etc/postfix/relay-domains and in transport add
domain.ext	etrn-only:

The mail will then be delivered when sendmail -q is sent, or when telnet mailserver 25, 
helo originating.domain
etrn defermaildomain.ext

mails get defered - you can see them in mailq
also in /var/spool/postfix/flush/

(see also
http://lists.freebsd.org/pipermail/freebsd-questions/2006-February/112246.html
http://www.postfix.org/ETRN_README.html
http://archives.neohapsis.com/archives/postfix/2001-07/0730.html)

postfix reload reloads the config

http://wiki.ev-15.com/debian:mail_system for how to set up squirrelmail and cyrus for IMAP with postfix

You can also force the queue delivery by running postqueue -f

or deliver a specific message by postsuper -r queue_id