Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
postfix [2006/02/20 21:34] 193.77.56.193 some useful links |
postfix [2012/07/31 12:45] (current) greebo old revision restored |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Postfix ====== | ====== Postfix ====== | ||
| - | ==== Useful links ==== | ||
| - | * [[http:// | ||
| + | ==== Useful links ==== | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| ===== TODO ===== | ===== TODO ===== | ||
| * **berljivost clanka** | * **berljivost clanka** | ||
| + | * **RAZLICNI SCENARIJI** | ||
| * vrstni red | * vrstni red | ||
| * razlicni scenariji | * razlicni scenariji | ||
| Line 19: | Line 25: | ||
| * append_dot_mydomain = yes | * append_dot_mydomain = yes | ||
| * pcre | * pcre | ||
| - | * IGNORE deletes lines in headers(?) | + | |
| + | unverified_recipient_reject_code = 550 | ||
| + | unverified_sender_reject_code = 550 | ||
| + | |||
| + | |||
| + | smtpd_discard_ehlo_keywords = silent-discard, | ||
| + | |||
| + | ===== Different Setups ===== | ||
| + | * [[postfix: | ||
| + | * [[postfix: | ||
| + | * [[postfix: | ||
| + | * [[postfix: | ||
| + | * [[postfix: | ||
| Line 26: | Line 44: | ||
| here are some tips .. | here are some tips .. | ||
| - | ==== Hide internal address ==== | + | ==== Making postfix only send through 'smart relayhost' |
| + | |||
| + | I use this construction to have a fallback option when the direct connected ADSL-line is down: replace ' | ||
| + | |||
| + | ==== Hide internal/ | ||
| See [[http:// | See [[http:// | ||
| Line 39: | Line 61: | ||
| /^received: / IGNORE | /^received: / IGNORE | ||
| /^X-Sender: / IGNORE | /^X-Sender: / IGNORE | ||
| + | /^Received: .*\[192\.168\.101\..*\]\)/ | ||
| + | /^Received: .*\[127\.0\.0\.1\]\)/ | ||
| - | **Still looking for a better way?!** | + | keeping only the headers that you want: |
| + | / | ||
| + | /./ IGNORE | ||
| + | |||
| + | |||
| + | ==== LMTP and over-quota ==== | ||
| + | '' | ||
| + | |||
| + | 2008-02-06 (b) Not necessarily. If you use reject_unverified_recipient, | ||
| ---------------- | ---------------- | ||
| + | |||
| + | |||
| ===== Unsorted stuff ===== | ===== Unsorted stuff ===== | ||
| - | owner_request_special = no | + | |
| - | show_user_unknown_table_name = no | + | show_user_unknown_table_name = no |
| - | # | + | |
| - | reject_rhsbl_sender | + | reject_rhsbl_sender |
| === | === | ||
| - | smepd_error_sleep_time | + | smtpd_error_sleep_time |
| - | Timh to wait in seconds before sending a 4xx or 5xx server error response. | + | Time to wait in seconds before sending a 4xx or 5xx server error response. |
| - | smtpd_soft_error_limit | + | |
| When an SMTP client has made this number of errors, wait error_count seconds before responding to any client request. | When an SMTP client has made this number of errors, wait error_count seconds before responding to any client request. | ||
| - | smtpd_hard_error_limit | + | |
| Disconnect after a client has made this number of errors. | Disconnect after a client has made this number of errors. | ||
| - | smtpd_junk_command_limit | + | |
| Limit the number of times a client can issue a junk command such as NOOP, VRFY, ETRN or RSET in one SMTP session before it is penalized with tarpit delays. | Limit the number of times a client can issue a junk command such as NOOP, VRFY, ETRN or RSET in one SMTP session before it is penalized with tarpit delays. | ||
| === | === | ||
| + | tired of " | ||
| + | |||
| + | add to / | ||
| + | |||
| + | mechlist: plain login crammd5 digestmd5 | ||
| + | |||
| + | or try this: | ||
| + | cd / | ||
| + | mkdir deactivated | ||
| + | mv *otp* deactivated | ||
| + | # for good measure | ||
| + | mv *ntlm* deactivated | ||
| + | |||
| ============= | ============= | ||
| Line 82: | Line 129: | ||
| #postfix on ircnet | #postfix on ircnet | ||
| - | konrads> | + | '' |
| - | weasel> 250 no problem | + | tail .. master.cf: |
| - | weasel> | + | devnull unix - |
| - | weasel> | + | flags=R user=nobody argv=/ |
| - | weasel> | + | where bin/devnull is something like |
| - | weasel> | + | #!/bin/sh |
| - | weasel> | + | cat > /dev/null |
| - | weasel> | + | then set local_transport to devnull'' |
| - | weasel> | + | |
| ============== | ============== | ||
| How to change sender/ | How to change sender/ | ||
| - | canonical_maps = hash:/ | + | |
| - | recipient_canonical_maps = | + | recipient_canonical_maps = |
| - | sender_canonical_maps = hash:/ | + | sender_canonical_maps = hash:/ |
| - | / | + | |
| - | @thisisfakedomain.foo | + | @thisisfakedomain.foo |
| - | / | + | |
| - | # this server is sending, but not receiving e-mail | + | # this server is sending, but not receiving e-mail |
| - | # so we reroute the error msgs to the postmaster :] | + | # so we reroute the error msgs to the postmaster :] |
| - | eVecer@[195.246.18.38] | + | eVecer@[195.246.18.38] |
| =========== | =========== | ||
| Line 115: | Line 162: | ||
| out that many clients won't accept a REJECT after the (HELO|MAIL | out that many clients won't accept a REJECT after the (HELO|MAIL | ||
| FROM: | FROM: | ||
| + | |||
| + | ===== ABKO ==== | ||
| + | |||
| + | check_*_mx_access cidr:/ | ||
| + | |||
| + | 0.0.0.0/ | ||
| + | 10.0.0.0/ | ||
| + | 127.0.0.0/ | ||
| + | 169.254.0.0/ | ||
| + | 172.16.0.0/ | ||
| + | 192.0.2.0/ | ||
| + | 192.168.0/ | ||
| + | 224.0.0.0/ | ||
| + | 240.0.0.0/ | ||
| + | 248.0.0.0/ | ||
| + | |||
| + | source - IPv4 bogon list - http:// | ||
| ========== | ========== | ||
| / | / | ||
| - | alias_maps = hash:/ | + | |
| - | alias_database = $alias_maps | + | alias_database = $alias_maps |
| - | smtpd_banner = $myhostname ESMTP http:// | + | |
| - | mail_name = smtpd | + | mail_name = smtpd |
| - | # what kind of errors should postmaster receive | + | |
| - | # notify_classes = resource, | + | # notify_classes = resource, |
| - | # default is: notify_classes = resource, | + | # default is: notify_classes = resource, |
| - | # postfix tries to get hostname from the system, but it usually failes, because the hostname | + | |
| - | # is not FQDN | + | # is not FQDN |
| - | myhostname = host.domain.org | + | myhostname = host.domain.org |
| - | # default is: | + | |
| - | # myorigin = $myhostname | + | # myorigin = $myhostname |
| - | # mydomain = domain part of $myhostname | + | # mydomain = domain part of $myhostname |
| - | # what domains are LOCAL to this server | + | |
| - | # DO NOT list virtual domains here! | + | # DO NOT list virtual domains here! |
| - | # Use virtual_maps for virtual domains | + | # Use virtual_maps for virtual domains |
| - | mydestination = $myhostname, | + | mydestination = $myhostname, |
| - | # | + | |
| - | # | + | |
| - | # for Mailman Mailing-list | + | # for Mailman Mailing-list |
| - | # virtual domains | + | |
| - | virtual_maps = hash:/ | + | virtual_maps = hash:/ |
| - | # Reject unknown local/ | + | |
| - | # proxy (v2.x) local_recipient_maps = proxy: | + | # proxy (v2.x) local_recipient_maps = proxy: |
| - | local_recipient_maps = unix: | + | local_recipient_maps = unix: |
| - | mynetworks = 127.0.0.0/8 192.168.0.0/ | + | |
| - | mynetworks_style = host | + | mynetworks_style = host |
| - | mailbox_size_limit = 0 | + | |
| - | recipient_delimiter = + | + | recipient_delimiter = + |
| - | # Maildir format | + | |
| - | # if you use Courier IMAP/POP | + | # if you use Courier IMAP/POP |
| - | home_mailbox = Maildir/ | + | home_mailbox = Maildir/ |
| - | #if you use maildrop | + | |
| - | # | + | # |
| - | # | + | # |
| - | delay_warning_time = 3h | + | |
| - | smtpd_helo_required = yes | + | |
| - | biff = no | + | biff = no |
| - | disable_vrfy_command = yes | + | disable_vrfy_command = yes |
| - | strict_rfc821_envelopes = no | + | strict_rfc821_envelopes = no |
| - | transport_maps = hash:/ | + | |
| - | message_size_limit = 40960000 | + | message_size_limit = 40960000 |
| - | maps_rbl_domains = | + | |
| list.dsbl.org, | list.dsbl.org, | ||
| relays.ordb.org | relays.ordb.org | ||
| - | body_checks = regexp:/ | + | |
| - | header_checks = regexp:/ | + | header_checks = regexp:/ |
| - | # smart-relay server | + | |
| - | # probably smtp server of your ISP | + | # probably smtp server of your ISP |
| - | #relayhost = [smtp.isp.com] | + | #relayhost = [smtp.isp.com] |
| - | # smtp server to use if we get errors sending directly | + | |
| - | # | + | # |
| - | # use it to TEST(!) your new config | + | |
| - | # smtp will issue 4xx (temporary error) instead of 5xx (permanent) thus allowing | + | # smtp will issue 4xx (temporary error) instead of 5xx (permanent) thus allowing |
| - | # transmission later | + | # transmission later |
| - | # | + | # |
| - | #broken PIX/cisco firewall | + | |
| - | smtp_always_send_ehlo = no | + | #smtp_always_send_ehlo = no |
| - | smtpd_client_restrictions = hash:/ | + | |
| - | smtpd_helo_restrictions = hash:/ | + | |
| - | smtpd_sender_restrictions = | + | |
| regexp:/ | regexp:/ | ||
| smtpd_recipient_restrictions = | smtpd_recipient_restrictions = | ||
| - | reject_unauth_pipelining, | + | # reject_unauth_pipelining, |
| reject_non_fqdn_sender, | reject_non_fqdn_sender, | ||
| reject_non_fqdn_recipient, | reject_non_fqdn_recipient, | ||
| Line 220: | Line 284: | ||
| reject_rbl_client dnsbl.sorbs.net | reject_rbl_client dnsbl.sorbs.net | ||
| reject_unauth_destination | reject_unauth_destination | ||
| + | |||
| + | smtpd_data_restrictions = | ||
| + | reject_unauth_pipelining | ||
| # | # | ||
| Line 232: | Line 299: | ||
| #### | #### | ||
| / | / | ||
| - | # amis | + | |
| - | 212.18.32.4 | + | 212.18.32.4 |
| - | 212.18.32.14 | + | 212.18.32.14 |
| - | # triera | + | # triera |
| - | 213.161.0.24 | + | 213.161.0.24 |
| - | 213.161.0.25 | + | 213.161.0.25 |
| - | # volja | + | # volja |
| - | 217.72.64.59 | + | 217.72.64.59 |
| - | 217.72.64.60 | + | 217.72.64.60 |
| - | # softnet | + | # softnet |
| - | 212.103.128.68 | + | 212.103.128.68 |
| - | # mojnet | + | # mojnet |
| - | 212.93.226.6 | + | 212.93.226.6 |
| - | # telemach | + | # telemach |
| - | 213.143.65.10 | + | 213.143.65.10 |
| - | # netsi | + | # netsi |
| - | 212.72.100.100 | + | 212.72.100.100 |
| - | # siol | + | # siol |
| - | 193.189.160.25 | + | 193.189.160.25 |
| - | 193.189.160.18 | + | 193.189.160.18 |
| - | # perftech | + | # perftech |
| - | 195.246.0.20 | + | 195.246.0.20 |
| - | 195.246.0.21 | + | 195.246.0.21 |
| - | 195.246.0.22 | + | 195.246.0.22 |
| - | # arnes | + | # arnes |
| - | 193.2.1.74 | + | 193.2.1.74 |
| - | 193.2.1.75 | + | 193.2.1.75 |
| - | # | + | # |
| - | BSN-77-157-5.dsl.siol.net | + | BSN-77-157-5.dsl.siol.net |
| - | 193.77.157.5 | + | 193.77.157.5 |
| - | # | + | # |
| - | dsl.siol.net | + | dsl.siol.net |
| - | dial-up.siol.net | + | dial-up.siol.net |
| - | dial-up.volja.net | + | dial-up.volja.net |
| - | dial.netsi.net | + | dial.netsi.net |
| - | dial-up.arnes.si | + | dial-up.arnes.si |
| - | dial-up.moj.net | + | dial-up.moj.net |
| - | dialup.amis.net | + | dialup.amis.net |
| - | adsl.amis.net | + | adsl.amis.net |
| - | dsl.net | + | |
| + | |||
| + | | ||
| + | |||
| + | |||
| + | **B wrote** | ||
| + | To matchne vsak hostname, v katerem se pojavi " | ||
| + | |||
| + | ali ce hoces bit natancen: | ||
| + | / | ||
| / | / | ||
| - | / | + | |
| - | / | + | / |
| - | / | + | / |
| - | / | + | / |
| / | / | ||
| - | your_fqdn_hostname_here | + | |
| + | A.B.C.D | ||
| + | [A.B.C.D] | ||
| - | / | ||
| - | virtual_domain.com whatever_that_is_not_used | ||
| - | abuse@virtual_domain.com root | ||
| - | postmaster@virtual_domain.com root | ||
| - | hostmaster@virtual_domain.com root | ||
| - | fu@virtual_domain.com other@email.com | ||
| - | fuu@virtual_domain.com local_user | ||
| - | # all e-mails go into one/single mbox | + | / |
| - | v_domain.org whatever_that_is_not_used | + | virtual_domain.com whatever_that_is_not_used |
| - | @v_domain.org hegetsallmailfor@domena.org | + | abuse@virtual_domain.com root |
| + | postmaster@virtual_domain.com root | ||
| + | hostmaster@virtual_domain.com root | ||
| + | fu@virtual_domain.com other@email.com | ||
| + | fuu@virtual_domain.com local_user | ||
| + | |||
| + | | ||
| + | v_domain.org whatever_that_is_not_used | ||
| + | @v_domain.org hegetsallmailfor@domena.org | ||
| / | / | ||
| - | # NIMDA | + | |
| - | / | + | / |
| - | / | + | / |
| - | # | + | # |
| - | / | + | / |
| - | # | + | # |
| - | / | + | / |
| - | # SIRCAM | + | # SIRCAM |
| - | #/ | + | #/ |
| - | # HYBRIS | + | # HYBRIS |
| - | #/ | + | #/ |
| - | # ALIZ | + | # ALIZ |
| - | #/ | + | #/ |
| - | # SPAM | + | # SPAM |
| - | #/ | + | #/ |
| - | #NextPart | + | #NextPart |
| - | #/ | + | #/ |
| / | / | ||
| - | / | + | / |
| /^begin [0-9]+*\.(scr|pif|exe|com|bat|shs|shb|vxd|rm|chm|vbs|ini|cmd|hta|reg|lnk|js|jse)/ | /^begin [0-9]+*\.(scr|pif|exe|com|bat|shs|shb|vxd|rm|chm|vbs|ini|cmd|hta|reg|lnk|js|jse)/ | ||
| / | / | ||
| Line 325: | Line 405: | ||
| #or even more restrictive: | #or even more restrictive: | ||
| - | /< | + | |
| + | / | ||

