dovecot or exim and google problem

PaulM

Verified User
Joined
Nov 6, 2009
Messages
3
Hi, I have dedicated server and decided to move all emails to google business account. In case somebody doesn't know, google mail allows small businesses create an account so that all emails for *@yourdomain.com will be serviced at google. It is convenient for me but I have an issue setting this properly up.

I changed MX records from "mail" to "ALT1.ASPMX.L.GOOGLE.COM." like it was told in google. So now all emails which are sent to my address @mydomain.com go to google and everything works fine. But if I send an email from the inside of my server, but using mail command

echo "This is sent from my server" | mail -s "Hello world" [email protected]

this message doesn't go to google servers, it goes to my local dovecot/exim so that I have to connect to pop3 and grab the message. So I am thinking where I should go:

1. Should I uninstall dovecot completely?
2. Should I uninstall vmpop3 completely?
3. If I uninstall them, will I have opportunity to send emails from the inside of my server by using "mail" command? I need it.
4. How can I know which program does "mail" use - dovecot or exim?
5. How can I make my server forget about its own mail server and work correctly with google?

Thanks!
 
Hello,

As far as I know, it's not possible to use both dovecot and vmpop3, if you switched your server to dovecot, then vmpop3 is no more used. Both of them (the first or the second at one time) allows to read email from via POP3/IMAP protocols. So it's OK if you remove them, but you should know for sure what you're doing, as there is no built in directadmin function to "uninstall" them. So you might want to disable them from auto-starting (you did not specified your OS distro). And remove from directadmin service monitoring.

Command "mail" comes separately from Exim/Dovecot/vm-POP3, at least on CentOS. In my case it's a package called

mailx-8.1.1-44.2.2

But I guess you need to keep Exim working, at least there is another way to make your server to use Google as smart host.
 
I changed MX records from "mail" to "ALT1.ASPMX.L.GOOGLE.COM." like it was told in google. So now all emails which are sent to my address @mydomain.com go to google and everything works fine. But if I send an email from the inside of my server, but using mail command

echo "This is sent from my server" | mail -s "Hello world" [email protected]

this message doesn't go to google servers, it goes to my local dovecot/exim so that I have to connect to pop3 and grab the message. So I am thinking where I should go:

1. Should I uninstall dovecot completely?
Generally no, but as user zEitEr mentions, you can stop it from running if you want, and you can firewall off the imap and pop3 ports.
2. Should I uninstall vmpop3 completely?
As zEitEr mentions, you shouldn't have both Dovecot and vmpop3 on your server. If you do you can safely remove vmpop3. If both are running there's a problem with your build.
3. If I uninstall them, will I have opportunity to send emails from the inside of my server by using "mail" command? I need it.
Yes. Neither has anything to do with the mail command.
4. How can I know which program does "mail" use - dovecot or exim?
The mail program uses exim, probably through the built-in sendmail interface. Dovecot doesn't have anything to do with sending email; only with receiving it.
5. How can I make my server forget about its own mail server and work correctly with google?
First set up MX records. It appears you may have already done that.

Second, on a per-user basis, log into DirectAdmin and click on MX Records and make sure the box Use this server to handle my emails is unchecked, and save.

If your user-level DirectAdmin control panel doesn't have an MX Records link, then turn on DNS control for the domain.

Do this for each domain.

Jeff
 
I was writing my reply at the same time user ditto was writing his.

Jeff
 
Back
Top