0

I want to disable local mail on my Centos VPS because the I have a web form (on a website which is hosted by the VPS) which is delivering mail to the local mailbox rather than looking at MX records to deliver it to the Exchange Server.

I have looked at some instructions in this question Postifx disable local delivery

How can this be achieved if I am using ZPanel? Does ZPanel handle things differently?

Can someone provide guidance on resolving this?

FYI, Postfix is being used (this was automatically setup by ZPanel).

Here is the output of 'postconf -n'

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
delay_warning_time = 4
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = localhost.$mydomain, localhost
mydomain = gunston.gwsadmin.info
myhostname = gunston.gwsadmin.info
mynetworks = all
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES
recipient_delimiter = +
relay_domains = proxy:mysql:/etc/zpanel/configs/postfix/mysql-relay_domains_maps.cf
sample_directory = /usr/share/doc/postfix-2.2.2/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_use_tls = no
smtpd_client_restrictions =
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated,        permit_mynetwor                                                                                                                               qdn_recipient,        reject_unknown_recipient_domain
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions =
smtpd_use_tls = no
soft_bounce = yes
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/zpanel/configs/postfix/mysql-virtual_alias
virtual_gid_maps = static:12
virtual_mailbox_base = /var/zpanel/vmail
virtual_mailbox_domains = proxy:mysql:/etc/zpanel/configs/postfix/mysql-virtual_
virtual_mailbox_maps = proxy:mysql:/etc/zpanel/configs/postfix/mysql-virtual_mai
virtual_minimum_uid = 101
virtual_transport = dovecot
virtual_uid_maps = static:101
4

1 Answer 1

3

With postfix, it's trivial. Just remove example.com from mysql table. For more info about this table, see parameter

virtual_mailbox_domains = proxy:mysql:/etc/zpanel/configs/postfix/mysql-virtual_

Disclaimer:

  • This change may cause zpanel to explode stop working, because you dared to change the low level of zpanel system.
  • Because this change was unsupported by zpanel, the zpanel system may go berserk override your change. So you'd have to reapply it.
  • Repost comment from EEAA: Anyway, seriously. Get rid of Zpanel. It's only going to make your life more difficult going forward
1
  • 1
    Sorry about the fixup, masegaloeh. Your answer was sufficiently funny it made tea come out of my nose, so I wanted it to be even more perfect. +1 from me!
    – MadHatter
    Dec 10, 2014 at 7:51

Not the answer you're looking for? Browse other questions tagged .