Recimo da imam unutar firme jos neki domen koji opslužuje drugi mail server i usput imam VPN tunel prema njemu.
Zahtev je da mailovi nesmetano prolaze ali ne preko interneta već direktno onda navodim relay domain za taj domen i upisujem IP adresu.
Nemam statičku IP adresu većina servera odbija da primi mail od mene jer nemam sve zapise unutar DNS-a onda tu navodim IP adresu ISP servera i svi
Treba da ostaviš prazno za RELAY jer onda tvoj server uz pomoć DNS traži destinacioni mail server i uspostavlja vezu direktno.
Code:
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.1.5/samples
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
mail_owner = postfix
myhostname = neki.domen.com
myorigin = $mydomain
inet_interfaces = all
## Ovo je relay mail mydestination ne treba da se popuni
mydestination =
local_recipient_maps =
#############################################################################################################################
## Dodato sa sajta: http://www.knowplace.org/pages...h_postfix.php#relay_recipients
#############################################################################################################################
local_transport = error:local mail delivery is disabled
parent_domain_matches_subdomains = debug_peer_list, smtpd_access_maps
relay_recipient_maps = hash:/etc/postfix/maps/relay_recipients.map
show_user_unknown_table_name = no
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination , check_policy_service inet:127.0.0.1:10040
#############################################################################################################################
# TEST
# http://www.mailradar.com/openrelay/
# http://www.mxtoolbox.com/SuperTool.aspx?action=mx%3adomen.com
#
# Radi kako treba ali ne radi MRTG
#
#############################################################################################################################
mynetworks = 192.168.0.0/16 127.0.0.1/32 IP.200.115.124/32 IP.65.196.24/32 IP.200.115.12/32
relay_domains = domen.com domen.rs domen.co.rs
#relayhost = [192.168.IP.210]
smtpd_banner = $myhostname
message_size_limit = 20480000
disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_delay_reject = yes
strict_rfc821_envelopes = yes
address_verify_negative_cache = yes
address_verify_sender =
[email protected]
smtp_skip_4xx_greeting = yes
smtp_skip_5xx_greeting = yes
maximal_queue_lifetime = 2d
delay_warning_time = 2h
content_filter = lmtp:127.0.0.1:10025
header_checks = regexp:/etc/postfix/restrikcije/mime_header_checks.maps
transport_maps = hash:/etc/postfix/maps/transport.map
relocated_maps = hash:/etc/postfix/maps/relocated.map
canonical_maps = hash:/etc/postfix/maps/canonical.map
#virtual_alias_maps = hash:/etc/postfix/maps/virtual.map
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
## Ovo je postavljeno radi TLS/SASL autentikacije
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtpd_helo_restrictions = permit_mynetworks,
check_helo_access regexp:/etc/postfix/restrikcije/whitelist.maps,
# reject_unknown_helo_hostname,
reject_non_fqdn_hostname,
reject_invalid_hostname,
check_helo_access regexp:/etc/postfix/restrikcije/helo_rejections.maps,
# check_policy_service inet:127.0.0.1:12525,
check_policy_service inet:127.0.0.1:10040
# reject
smtpd_sender_restrictions = permit_mynetworks,
check_sender_access regexp:/etc/postfix/restrikcije/whitelist.maps
# reject_non_fqdn_sender,
# reject_unknown_sender_domain,
# reject
smtpd_etrn_restrictions = reject
smtpd_client_restrictions = permit_mynetworks,
check_client_access regexp:/etc/postfix/restrikcije/whitelist.maps,
check_client_access regexp:/etc/postfix/restrikcije/rejections.maps
smtpd_data_restrictions = reject_unauth_pipelining,
reject_multi_recipient_bounce
masquerade_domains = domen.com
#always_bcc =
[email protected]
biff = no
smtpd_recipient_limit = 10
#swap_bangpath = no
append_dot_mydomain = no
#append_at_myorigin = no
allow_percent_hack = no
allow_untrusted_routing = no
hopcount_limit = 20
in_flow_delay = 5
smtpd_error_sleep_time = 3s
smtpd_soft_error_limit = 3
smtpd_hard_error_limit = 5
smtpd_junk_command_limit = 5
unknown_local_recipient_reject_code = 450
debug_peer_list =
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
Ovo ti je postavka MAIL-GATEWAY servera bez korisnika gde se navodi RELAY domain za domene koje ti držiš a razradu gde će biti prosleđeni ide preko transport.maps