My current postfix configuration fails the configuration check within Virtualmin however it work perfectly. When I try to comply with the postfix check it breaks postfix.
I don’t want to disable the module because I actually use Virtualmin to manage the virtual user aliases within postfix which is currently working.
Is there a way I can disable the configuration check for the postfix module? Or at least get it to ignore the mydestination line?
Hmm, what error is it giving you exactly?
And can you share the output of “postconf -n”?
The Virtualmin error is
Your Postfix configuration is missing the system’s mail hostname mydomain.com from the mydestination line, which will cause mail to bounce.
Sanitised output is
append_dot_mydomain = yes
broken_sasl_auth_clients = yes
command_directory = /usr/local/sbin
compatibility_level = 2
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/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
html_directory = /usr/local/share/doc/postfix
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailbox_command = /usr/local/bin/procmail
mailbox_transport = cyrus
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 15240000
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = mydomain.com
myhostname = mail.mydomain.com
mynetworks = x.x.x.x, x.x.x.x, …
mynetworks_style = host
myorigin = mydomain.com
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/local/share/doc/postfix
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/usr/local/etc/postfix/relay_passwords
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_tls_CAfile = XXXXX
smtpd_tls_cert_file = XXXXX
smtpd_tls_key_file = XXXXX
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/usr/local/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/usr/local/etc/postfix/virtual
virtual_mailbox_domains = hash:/usr/local/etc/postfix/domains
virtual_mailbox_maps = hash:/usr/local/etc/postfix/mailbox_maps
virtual_transport = lmtp:unix:/var/imap/socket/lmtp
It’s not actually possible to make Virtualmin ignore the warnings there, but we can try to tweak the config so that the warning goes away.
You may want to verify that if you run the command “hostname”, that the output you receive there is included in the “mydestination” line of your main.cf file.
If that doesn’t help, what you may want to do is comment out myorigin, mydomain, myhostname, which should all be set to reasonable defaults on their own. Setting those can in some cases confuse Virtualmin.
Make sure you restart Postfix after making any changes to it.