VPS + Virtualmin + Google Apps: Mail

5 posts / 0 new
Last post
#1 Mon, 05/09/2011 - 11:46
EZ

VPS + Virtualmin + Google Apps: Mail

Hi,

Google Apps' main benefit is excellent free email service: huge mailboxes, web interface, SMTP/POP/IMAP access, very good spam and virus filtering, and very good reliability. Another advantage is that there are less chances Google mail servers get blacklisted, as often happens with shared servers.

If local mailboxes are not needed, then POP/IMAP access is redundant and there's no need for spam and virus filtering.

However, even if users' email is handled by Google, there are cases where mail is generated by web site scripts, eg. forum notifications, mailing lists, etc. In some cases such scripts can be configured to use remote SMTP server, but in many cases they assume a local MTA is available (eg. PHP's mail() function).

If I understand correctly these are the steps to disable local mailboxes and related services:

  1. For every existing server and sub-server - Uncheck the following: Edit Virtual Server -> Enabled Features -> Mail for domain enabled.

  2. For every domain: Ensure that domain name is not listed in /etc/postfix/virtual - if it does then delete all lines that contain the domain, and finally run postmap /etc/postfix/virtual

  3. Uncheck the following: Virtualmin -> System Settings -> Features and Plugins ->
    Mail for domain
    Spam filtering
    Virus filtering
    New mailbox signup.

  4. Select (check) and click Disable Now and On Boot the following: Webmin -> System -> Bootup and Shutdown ->
    clamav-daemon
    clamav-freshclam
    dovecot
    spamassassin

Questions:

  1. How to delete existing email directories?
  2. Are there any other services that can/should be disabled?
  3. If Postfix is only used to send mail from the local server, can saslauthd be disabled? If yes, then what changes are required in Postfix configuration?
  4. Anything else I missed?

Thanks,

Eyal.

Mon, 05/09/2011 - 12:09
andreychek

generated by web site scripts, eg. forum notifications, mailing lists, etc. In some cases such scripts can be configured to use remote SMTP server, but in many cases they assume a local MTA is available

Yeah, there's a lot of functionality that depends on their being an MTA running on a server. In addition to the above is also Cron (any cron output is sent via email).

So while you can get rid of a lot of things, I wouldn't suggest getting rid of Postfix.

As far as the steps you listed go -- that all looks good. As for your questions --

How to delete existing email directories?

You'd have to delete $HOME/Maildir manually.

Are there any other services that can/should be disabled?

I think you got most of the big ones... you may not need Mailman either though. You can stop that service and disable the Mailman feature.

If Postfix is only used to send mail from the local server, can saslauthd be disabled? If yes, then what changes are required in Postfix configuration?

I'm not entirely certain, but I think saslauthd can be disabled in your case. You may need to edit /etc/postfix/master.cf, and comment out the lines associated with Submission and SMTPS, then restart Postfix.

-Eric

Mon, 05/09/2011 - 12:17
Locutus

A note about Mailman: I recently fell for a little caveat when disabling Mailman on a system which does not send email.

Mailman uses a number of cron jobs which do not get disabled when disabling the mailing lists feature in Virtualmin. You need to manually go and disable them if you wish to fully prevent Mailman from doing any stuff. :)

Wed, 01/09/2013 - 04:00
Yourname

This is exactly my issue. I have a lot of domains that simply host landing pages and don't have users to rcv email on or send to.

However, each of these domains run WordPress, fail2ban, etc amongst other scripts/software that send me (the admin who has a yahoo email address) emails of logs, activity, etc. So all I'd need is domain@devserver.com or domain@domain.com to send me these emails.

I've followed your clear and concise steps for removing everything thats not needed, but how do I use Postfix to send email via Google Apps (that one of the domains on this server has for our users for email) to me? Also, can the sending email work in a way so:

a) I know what domain it belongs to b) Doesn't land in my spam folder?

Thanks a ton!

Sat, 06/01/2013 - 20:45 (Reply to #4)
exius

Hey "Yourname",

I am looking for this solution as well: the ability to successfully send emails through my Google Apps domain through virtual severs within my VPS running Virtualmin.

I have taken the steps to resolve SPF issues and now I receive "pass" statuses within email headers, but for whatever reason, emails still land in spam. The DKIM auth doesn't seem to show up in the header. I plan on manually configuring php_mail() to use gmail's SMTP. That might solve authentication issues.

The question still remains...

Topic locked