I have several email accounts. To make things easier, I have had Gmail use POP3 to retrieve the emails so that I can benefit from its spam filters and organize more easily.
Gmail is removing this feature and I’m wondering what is a good alternative.
They suggest I forward emails to my gmail. If I recall, this is an issue because everything including spam will get forwarded and eventually my domain will be considered a spam domain by google.
I also recall there was some issue with DKIM DMARC SPF.
I’m guess I’m not the only one that does this. I wonder what others are doing to workaround googles newly created headache for everyone.
This is because virtualmin does not have SRS which rewrites the emails headers/envelope to compensate that it is now virtualmin effectively sending this email to Gmail, but keeping all of the original emails details.
I beleiev ARC also helped with this, but it has been a moment since I looked at this and I am not sure how widesprrad the adoption of this technology is.
So if I understand, they use pop3/imap to get your emails. Then I guess Gmail has an API that allows you to insert emails. Interesting. I wonder if there are any open projects out there that let me just do this on my on VPS directly. Technically it could just access my email directly without pop3 since I’m running it on the server.
That sounds like it could be a better solution than an external service or forwarding and messing with the headers.
I did some AI searches for projects
This looks like a direct replacement for the pop3 fetching and easiest to setup
This looks a little better because I don’t think it polls, so no delay.
This seems the most elegant as I think it interfaces with postfix/exim directly but probably the most complicated to setup
I’m going to start looking into these, looks promising
Doing it on your own google cloud instances avoids the security review too
Reporting back, I tried gmail-api-client and it worked.
One nice thing is that its tied into the transport so arriving emails are instantly sent to gmail vs waiting for gmail pop3
Setting up the software was really quick. It sets up a temp web server to make the inital setup easier and is hardcoded to port 8080 so I had to change it since its in use.
The hard part was getting it to work with postfix as I’m not familiar. That took hours of trial and error. Initially, I tried running the binary through a standard postfix alias, but it failed because those commands run as nobody. This prevented the binary from accessing config files. I defined the bridge in master.cf using a dedicated Unix user. I moved the domains to virtual_mailbox_domains set virtual_mailbox_base = /var/spool/postfix to prevent local delivery and bogus mailbox errors.
I used virtual_alias_map to redirect all aliases to the primary account
transport_map as an exit point to catch the primary email address and explicitly route it to the custom filter which I defined in master.cf
I set mydestination = localhost, $myhostname and removed local domains to bypass local agent
I set my domains in virtual_mailbox_domains
The only issue I see is that this probably will break if I try to use virtualmin to manage anything.
ok thanks for letting me know. I only have 3 domains. and they are all personal domains that dont have that much activity.
If anyone has recommendations for how to properly install this with virtualmin, I’d appreciate it. My immediate goal was to get something working before google decided to cut off pop3 and I didnt know how to get around the errors
It seems to be working ok. I think the negative effect is that I don’t think it is compatible with virtualmin so I can no longer use virtualmin to manage my email or aliases. I haven’t tested it though.
The very first thing I had tried was using using the “execute command” option when creating an alias to pipe it over but it gets run as “nobody” and thus doesnt have permissions to read the config files. At that point I wasnt sure what to try and asked AI for help and that’s what it came up with. When I get more time, I’ll look more closely at host postfix and virtualmin works to see if I can come up with a better way.