Cant receive emails and Can backups be restored on fresh install if req.

I am having serious problems with virtualmin ever since a Centos upgrades were applied.
The problem was apparently MYSQL and PHP upgrades that broke everything!
After excess of 40 hours trying to rebuild the system, I have all the Virtual clients and sites up and running, by downgrading the PHP and MySql.
Now the final problem that has taken 16 of the 40 hours is that NOBODY can receive emails, and yet everyone can send.
I’ve been through dozens of fixes and I’ve run checks and logs etc and everything checks okay.
I had to uninstall and reinstall postfix, mailman, and associated software numerous times to end up with the exact same problem.
I have noted one peculiarity that may mean something to a linux guru and that when I go into webmin>Servers->Read User Mail and select an email the message up top states This user has no message in : /var/mail/theUser@theirDomain.com
When I select the down arrow ALL other options are ~theUser@theirDomain.com/Maildir/.sent or .draft or .spam etc
It may be correcy but seemed odd to me.
I have run VirtualMin->System Settings->Recheck Configuration and initially it had al sorts of problems with postfix and webalizer and spam and av etc but now it all states the its all good!

IF anybody knows a direct solution then I would be forever in your debt. BUT do not tell me to restart the services, or reconfig as I believe I have been through every “Can Send but can’t receive” problem on this site and near everywhere else.

THE FINAL QUESTION
The crunch really is that I have had enough of the problem and it seems that Postfix and Virtualmin are temprmental at times. I am thinking about getting the provider to RESET the VPS and I’ll install a basic virtualmin again until I can at least get an alternative server running.
I HAVE backups of all the virtual servers BUT those backups MAY also be done whilst the server has had these dramas.
IF I reinstall which I unfortunately believe I’ll have to, can I restore these backups, and WILL they mess up a fresh system with POSTFIX etc. If these backup simply restore the settings in the system that are corrupt then there is no point and I’ll simply have to start migrating each domain away from this system.

The system I run is Centos 6.5
Virtualmin version 4.08gpl
Webmin Version 1.69
Its a VPS with 1 Gig ram and 50 Gig storage.

I should note that I am not a linux guru, but am computer literate and can get around the system

Thanks for any help

I received bounce back from test emails saying :The recipient server did not accept our requests to connect. [123.45.67.89]:25: Connection refused]

It’s amazing how modern systems take 24 hours to report an error yet old system report in a matter of minutes!

Anyway no difference so I’ve got to work out how to uninstall everything and re-install so at least I can get the system going again

Howdy,

Hmm, normally CentOS upgrades work very smoothly.

Was there by chance a third party software repository that was enabled? That could cause the problems you’re seeing.

What is the output of this command:

ls /etc/yum.repos.d

It’s possible that somewhere in the process you’ve been through, the config may have been altered, or even reverted back to the default, which could be breaking some things.

What is the output of this command:

postconf -n

That will show your current Postfix config, which will help in troubleshooting the issues you’re seeing.

It’s unlikely that restoring your backups would cause any problems in Postfix, if it came to that.

-Eric

FIXED for now.

Thankyou to andreychek, and you were correct in where the problem lied.

It all started with a request to upgrade php:

The repos were :
CentOS-Base.repo CentOS-Media.repo epel.repo lxcenter.repo
CentOS-Debuginfo.repo CentOS-Vault.repo epel-testing.repo virtualmin.repo remi.repo

The postconf -n results in:

… ALL
… GOOD
… UNTIL
recipient_bcc_maps = hash:/etc/postfix/virtual <- Deleted this line

And
sender_bcc_maps = hash:/etc/postfix/virtual
Changed this to:
sender_bcc_maps = hash:/etc/postfix/bcc

I believe I have finally sorted why and how the problem started.
Initially there was a request for a php upgrade to enable the newer Joomla to run.
This update is only available for centos 6.5 through the remi.repo.
When upgrades were done with remi, it had also updated mysql and other files
These upgrades obviously weren’t compatible with virtualmin.
Files were then downgraded and even though websites began to work. No joy with postfix and friends.

remi has now been removed.

The final way I finally got all the bits sort of working is I bought another VDS - installed centos, upgraded and installed virtualmin etc and compared the config files etc.

The WORKING postconf
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
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, server1.XYZ.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual

The only thing different from my new server is the server host name “Server1.XYZ.com” etc and I noticed that my new setup DOESN’T have localhost in the mydestination setting. ?

I AM going to remove all domains to the new server as the new VDS has 2GB mem and then reset the old VPS and hopefully set that up as a backup possible failsafe for the new. (More headaches coming)

After 31/2 days the have lots of emails.

Howdy,

I’m glad to hear you got it working!

Regarding your comment –

I noticed that my new setup DOESN’T have localhost in the mydestination setting

Yeah, you might wish to add localhost into the mydestination line of your Postfix config.

Also, a note regarding PHP versions –

If you’re interested in using a more recent PHP version, there is a safe way to do that on CentOS. Details on how to set that up are available here:

https://www.virtualmin.com/documentation/web/multiplephp