On 1/3/24 18:16, Michael Grant wrote:
Here's what I have done in the past from my server to get around this
situation you are having:
1. In my .procmailrc file
:0c:
!exam...@gmail.com
This sends a copy (the c flag in first line) of the message to the
gmail account and leaves a copy in your inbox.
2. From your exam...@gmail.com acct, go to Settings -> Accounts and
Import. Under the section 'Check email from other accounts', Add an
email account. Then add your server's account and use POP to suck
over emails as they arrive. Have it delete the emails once they are
sucked over.
What this does is it causes messages to be forwarded to gmail, but
some small number of them bounce because of whatever decision gmail
makes. But those messages are popped in later, so there's no lost
mail. Gmail de-duplicates the messages so you don't get messages
twice, and it never refuses to pop the messages in. Popping in
messages is slow, so when the forward works (which seems to be most of
the time), mail comes in quick, unless it bounces, in which case, it's
popped in a few minutes, sometimes 10s of minutes, later.
If you are concerned about the bounce messages going back into your
mailbox (gmail doesn't loop here fortunately), you can write a
procmail rule to siphon those off into another folder or into
/dev/null. (Left as exercise for the reader...)
3. You *may* need to do one further thing, you may need to go back
into gmail's Account and Import settings and set up 'Send mail as' and
set up to send mail as your email address on your server. I can't
remember if gmail does this automatically for you in step 2 above or
not.
4. You probably want to then click the radio button "Reply from the
same address to which the message was sent". Otherwise, when you
reply, it'll come from your gmail address and not your server's email
address. These radio buttons only appear once you have at least one
Send As address set up.
Michael Grant
This is super helpful, thank you very much! I was not aware you could
configure GMail to pull from another account, that's incredibly helpful!
I wound up installing PostSRSd
(https://github.com/roehling/postsrsd/tree/main). Now, when I send email
to one of the officers in the non-profit, I have their actual email
address set up in /etc/aliases, and SRSd rewrites the headers so that
GMail at least accepts them now. Before, it was just flat out rejecting
them.
The annoying thing is that when I send email from the mail server I set
up, even though it *passes* SPF, DKIM, and DMARC
(https://imgur.com/a/FuA6HiK), GMail is still dumping into the Spam
folder. It's incredibly irritating. After I marked a handful of them
"not spam," it stopped doing it, but we're going to be sending emails to
the members of the association (and I know several use GMail). I really
don't know what the heck I am supposed to do to get GMail to stop
dropping the messages into the spam folder. I thought you could set up
some sort of DNS TXT record for Google to show that you're a legit
sender, but I can't find documentation for it except for Google Workplaces.
Anyway, thanks everyone for the great suggestions! I learned a lot doing
this, and I was unaware of SRS... That's fantastic info!
--
Thomas