Virtualmin postfix how to disable authentication to send outgoing mail on local network

It is a new setup virtualmin server and incoming & outgoing mail are all working fine. However, the PC on local netowrk (same subnet with virtualmin) need authentication on smtp. How can I disable on local network smtp authentication?

Thanks in advanced.

[root@mail postfix]# postconf -n
postconf: warning: /etc/postfix/ undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/ undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/ undefined parameter: mua_helo_restrictions
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, mail
mynetworks =,
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sender_dependent_default_transport_maps = hash:/etc/postfix/dependent
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_security_level = may
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtpd_tls_security_level = may
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual

Add your local network to mynetworks. I don’t see any reason you’d need anything else (as far as I know the permit_mynetworks in smtpd_recipient_restrictions should allow sending from mynetworks).

However, it still needs to authentication on email client in same network.

I really don’t know why I can’t send outgoing mail. I just get bounce back about “Server error: ‘454 4.7.1 Relay access denied’”.

Are you absolutely sure your client is actually connecting via the network listed in mynetworks? Is it going through some kind of NAT/MASQ thing before it gets there?

When my outlook client ( specify local server IP (mail server) on smtp address. It can send email out without authentication. But it cannot send email out when smtp server address is “” syntax instead of IP Or it can send email out on using domain name syntax on smtp address if enable smtp authentication on outlook client.

Why would you expect it to work on the public address (I assume that name points to your public address)? That can’t possibly work. That connection would not be coming from the network, and thus is not allowed to relay without auth.

You can either setup views for DNS, or you can add the name to your hosts file, or you can just use authentication.

Oh, and another option if the public IP of your router is static you could add it to mynetworks.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.