This shows you the differences between two versions of the page.
dev_cache_all [2011/07/27 14:51] k2patel |
dev_cache_all [2020/08/10 02:35] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Catch ALL for testing ====== | ||
- | |||
- | During development you need scenario when all email should goes to only one email.\\ | ||
- | which is most important requirement for developer as they want to test email as well they need confirmation.\\ | ||
- | |||
- | Here is what i have applied on postfix. | ||
- | |||
- | I am sending all email to "k2patel@k2pate.com" | ||
- | |||
- | ==== main.cf ==== | ||
- | Since it is developer machine there is nothing production on that server.\\ | ||
- | All email goes to single user no mater where it is going including local delivery. \\ | ||
- | |||
- | <code ini | /etc/postfix/main.cf> | ||
- | alias_maps = hash:/etc/aliases | ||
- | command_directory = /usr/sbin | ||
- | config_directory = /etc/postfix | ||
- | |||
- | luser_relay = k2patel@k2patel.com | ||
- | |||
- | mailq_path = /usr/bin/mailq.postfix | ||
- | manpage_directory = /usr/share/man | ||
- | |||
- | myhostname = dev.k2patel.com | ||
- | mynetworks_style = host | ||
- | |||
- | newaliases_path = /usr/bin/newaliases.postfix | ||
- | |||
- | queue_directory = /var/spool/postfix | ||
- | |||
- | readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES | ||
- | sample_directory = /usr/share/doc/postfix-2.3.3/samples | ||
- | sendmail_path = /usr/sbin/sendmail.postfix | ||
- | |||
- | smtp_tls_CApath = /etc/pki/tls/certs | ||
- | smtp_tls_loglevel = 1 | ||
- | smtp_tls_note_starttls_offer = yes | ||
- | smtp_tls_security_level = may | ||
- | |||
- | smtpd_banner = $myhostname ESMTP ready | ||
- | |||
- | prepend_delivered_header = forward | ||
- | |||
- | transport_maps = hash:/etc/postfix/transport | ||
- | </code> | ||
- | |||
- | |||
- | ==== transport ==== | ||
- | Create New file which create the map for transporting email.\\ | ||
- | Please replace "vmail.k2patel.com" with whatever email server you want to deliver to.\\ | ||
- | I am using vmail.k2patel.com where my real k2patel@k2patel.com exists. | ||
- | |||
- | <code ini | /etc/postfix/transport > | ||
- | localhost : | ||
- | dev.k2patel.com local:k2patel@dev.k2patel.com | ||
- | k2patel.com smtp:vmail.k2patel.com | ||
- | * local:k2patel@dev.k2patel.com | ||
- | </code> | ||
- | |||
- | You need to create hashmap of this file use following command if you dont know how to. | ||
- | |||
- | <code bash> | ||
- | /usr/sbin/postmap /etc/postfix/transport | ||
- | </code> | ||
- | |||
- | ==== Aliases ==== | ||
- | This is where all internal redirection happens | ||
- | |||
- | |||
- | |||