Hi,

I have setup a internal postfix server that relays mail from our external DMZ server to internal mail hosts, it should accept mail the example.com but allow relaying from selected lan hosts to external domains for instance o2.co.uk etc, whenever I attempt to relay through the postfix server to an external domain it returns Relaying Access Denied can anyone help ?

I have posted my main.cf

bounce_notice_recipient = mail.info
2bounce_notice_recipient = mail.info
delay_notice_recipient = mail.info
error_notice_recipient = mail.info
max_idle = 30s
max_use = 20
header_size_limit = 65536
message_size_limit = 104857600
mailbox_size_limit = 209715200

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix

mail_owner = postfix
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname
mynetworks = 194.81.151.0/24
relay_domains = example.com
relayhost =

readme_directory = /usr/share/doc/packages/postfix/README_FILES
smtp_generic_maps = pcre:/etc/postfix/smtp_generic_maps
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
transport_maps = regexp:/etc/postfix/transport.regexp
virtual_maps = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual_alias

unknown_local_recipient_reject_code = 450

smtpd_banner = $myhostname SMTP

debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
html_directory = no
readme_directory = no
smtpd_helo_required = yes

smtpd_client_restrictions = reject_unauth_pipelining, reject_multi_recipient_bounce, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, reject_non_fqdn_sender, reject_invalid_hostname, reject_unknown_sender_domain

smtpd_recipient_restrictions = permit_mynetworks, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, check_sender_access hash:/etc/postfix/access, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_destination

strict_rfc821_envelopes = yes
disable_vrfy_command = yes
smtpd_etrn_restrictions = reject
notify_classes = resource,software
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
allow_percent_hack = no
swap_bangpath = no
resolve_dequoted_address = yes
require_home_directory = yes
maps_rbl_reject_code = 571
smtpd_soft_error_limit = 1
smtpd_hard_error_limit = 2
smtpd_timeout=50s
smtpd_error_sleep_time=10s
smtpd_delay_reject=yes
smtpd_client_connection_rate_limit=10
smtpd_client_message_rate_limit=20
smtpd_client_recipient_rate_limit=20

Reply via email to