I think there is a way and it might be pretty easy for you guys to figure out. It’s MailScanner.
MailScanner somehow wraps Postfix into itself and the postfix daemon is not even running. it’s part of MailScanner.
I had it installed before I did this fresh install with virtualmin pro. It’s really cool… because MailScanner is setup to look for clamav and many other virus scanners and spam scanners[b>automatically</b>! It’ll look for them, updates them regularly, and really appears to work great.
It takes a little studying but a chroot is setup and the mail gets dropped in a directory that MailScanner controls and checks it for virus and spam. Then it drops it into a chroot directory for Postfix to send to the right HOME directory for the user.
The issue with me was that the chroot for this process meant adding a /etc, /lib, - so that the proper TIME HOSTNAME et cetera were available to the chroot. That’s not that big a deal, except the virtual domain part of it. It was impratical. But… further study showed that there is a way to extend these things and most especially the passwd file for the virtual domain user. It is the proxy:unix:passwd.byname construct. This was something that I could have done for one domain or two or more; but, I wanted it done for me automatically and decided to check out virtualmin because you guys already have been working on it.
I really like the features of MailScanner. They’re great! And there’s a lot of them that need no set up at all. There is a script the inventor of MailScanner wrote that installs MailScanner and clamav that needs no intervention, (I think it installs spamassasin too). It can be found on the MailScanner site. You could incorporate it into your install.sh, and then tweak the configuration to do the proxy construct for each virtual domain.
I had it going and I like it. There were only two issues that made me feel it was better to let it go and instead go with virtualmin. It used about 58mb of memory for each MailScanner child - i think this is because postfix is somehow meshed with it because the postfix daemon is not running but postfix is what is doing all the MTA. I told it to only use two childs which probably wasn’t enough as the default is five. I was only using 500mb of ram but added another five so I have 1gb now.
The other thing was that I didn’t want to set it up for every virtual domain. I was pretty sure I was going to take advantage of the power/feature of virtualmin anyway, so why not just go with virtualmin because you guys had spamassasin and clamav going anyways. Plus… maybe you might even get on the MailScanner bandwagon at some point.
I’m hoping after reading this post that you’ll get on the MailScanner bandwagon. Again, it has a lot of this stuff done for you automatically. It knows virtually everything about all the spam reporting sites and virus scanner software. It will scan an email with about 20 different virus scanners if you had them all on your system. It works with bit-defender so you could have a virtual domain use MailScanner to check an email with both clamav and bit-defender - (which is what some of the experts that wrote up docs suggest- they actually suggest those two and one pay-for subscription one)
It’s only setback is the constant virtual domain setup-stuff - but that is you guy’s specialty! Also it uses a lot of memory. But, maybe I had something set up wrong. The docs say it should only use 20mb per child. But, it was an older doc so maybe it needs more now.
Anyway, if you looked into it I think you’d figure it out quickly and decide it does a bunch of your work for you and you can concentrate on just tying the virtual domain side of things together instead of the mechanics of calling from the command line, and watching queues, etc.
I hope this helps. I am thinking it will be a plus for all of us and save you some headache and masterminding.
I like the fact that it uses the chroot jail to decide if the mail is even going to get to stay on the server or not. Plus the guy is always making sure it knows how to talk to all the others in the industry that are trying to keep email clean and spam out.