Sending mail to Gmail users via Gmail server?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Sending mail to Gmail users via Gmail server?

Jaroslaw Rafa
Hello,
as Gmail is often putting e-mails from me into recipients' Spam folder, and
there seems to be no solution for this (I tried everything to no avail), I'm
considering an idea of sending e-mail to Gmail users via Gmail server, with
help of a Gmail account specially created for that purpose. (If that doesn't
help then - I guess - nothing helps :( ).

I have a few questions regarding how to configure this in Postfix.

1) It's obvious that Postfix has to authenticate to Google SMTP server to
submit mail through it (with credentials of that specially-created Gmail
account). However, I found in the Postfix docs that SMTP client
authentication works only with Cyrus SASL module, not with Dovecot one. I
have currently Dovecot SASL configured, as Dovecot is running as my IMAP
server, and I don't want to change that. Is it possible to have both SASL
modules (Cyrus and Dovecot) installed and working simultaneously? Or to
have Cyrus module working with Dovecot IMAP server? Well, it is actually
more a generic Linux question than Postfix-specific, but I hope someone here
will be able to answer :)

2) Assuming I have SMTP client authentication working, now I have to setup
transport_maps (and smtp_sasl_password_maps) so that only mail to Gmail is
sent through Gmail server. And here is some tricky part.

While putting the gmail.com domain explicitly as a key in transport(5) table
is no problem, there is a multitude of companies that are using G Suite and
have Gmail-hosted mail with their own domain, and I experience the same
issue with them (ie. my mail being put to Spam by Gmail). So there's a need
to check if the MX for a destination domain is within google.com or
googlemail.com domain, and if yes, to send mail via Gmail server as well.
Is there any way to do it with transport_maps ?
--
Regards,
   Jaroslaw Rafa
   [hidden email]
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail to Gmail users via Gmail server?

Viktor Dukhovni
On Sun, Sep 29, 2019 at 06:16:05PM +0200, Jaroslaw Rafa wrote:

> I'm considering an idea of sending e-mail to Gmail users via Gmail server, with
> help of a Gmail account specially created for that purpose. (If that doesn't
> help then - I guess - nothing helps :( ).

The trouble is that such accounts are generally restricted to a
single envelope sender address, likely with a matching single "From"
address.  You would need to also implement some mechanism to modify
the envelope and header sender addresses to match the login
credentials.

> 1) It's obvious that Postfix has to authenticate to Google SMTP server to
> submit mail through it (with credentials of that specially-created Gmail
> account).

And a matching envelope sender.

> However, I found in the Postfix docs that SMTP client authentication works
> only with Cyrus SASL module, not with Dovecot one.

Yes, Dovecot only supports authentication if incoming email in the
SMTP and (of course) IMAP servers.

> I have currently Dovecot SASL configured, as Dovecot is running as my IMAP
> server, and I don't want to change that. Is it possible to have both SASL
> modules (Cyrus and Dovecot) installed and working simultaneously?

Yes, you can keep using Dovecot for the SMTP server, but use Cyrus for
the SMTP client.  My system does exactly that:

    $ postconf smtp{,d}_sasl_type
    smtp_sasl_type = cyrus
    smtpd_sasl_type = dovecot

> While putting the gmail.com domain explicitly as a key in transport(5) table
> is no problem, there is a multitude of companies that are using G Suite and
> have Gmail-hosted mail with their own domain, and I experience the same
> issue with them (ie. my mail being put to Spam by Gmail). So there's a need
> to check if the MX for a destination domain is within google.com or
> googlemail.com domain, and if yes, to send mail via Gmail server as well.
> Is there any way to do it with transport_maps ?

Postfix has no built-in mechanism for this, and it would be rather
difficult to do this in a performant manner.  Transport resolution
happens in the queue-manager on one recipient address at a time.
Lookups of remote MX hosts, can take multiple seconds, and your
mail queue can suffer congestive collapse even with a small fraction
of email to a domain with DNS lookup problems.

There are further complications, since some of these domains could
use non-standard names (in their own domains) for the Gmail MX
hosts, or just names owned by Google that you might not be aware
of.  For example, you may not yet be aware of mx[1234].smtp.goog
as additional (DNSSEC signed) Gmail MX hosts.

The real solution is to find a way to deliver mail normally,
like everyone else, without going to the Junk folder.  For
that

    * Avoid IPv6, Google's MX hosts are more strict when you
      use IPv6.

    * Don't forward externally original email to Gmail accounts.

    * DKIM sign your outbound mail.

    * Perhaps also publish SPF records for your own domain.

The only creative solution (gross hack, along the lines you suggest)
that comes to mind is to implement a DNS filter that modifies MX
records and/or A/AAAA records to redirect connections to Gmail
servers to a dedicated Postfix instance:

    http://www.postfix.org/postconf.5.html#smtp_dns_reply_filter
    http://www.postfix.org/MULTI_INSTANCE_README.html

in which:

    * The envelope sender and "From" header are changed to match
      the dedicated Gmail account.  This only works if you're
      the *only user* of your mail server.

    * The default_transport is "relay:[smtp.gmail.com]:587"

    * Appropriate SASL credentials are configured to authenticate
      submission.

I would not recommend this "solution".  Instead find a way to send
email that Gmail will not routinely consider to be junk.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail to Gmail users via Gmail server?

Wietse Venema
In reply to this post by Jaroslaw Rafa
Jaroslaw Rafa:

> Hello,
> as Gmail is often putting e-mails from me into recipients' Spam folder, and
> there seems to be no solution for this (I tried everything to no avail), I'm
> considering an idea of sending e-mail to Gmail users via Gmail server, with
> help of a Gmail account specially created for that purpose. (If that doesn't
> help then - I guess - nothing helps :( ).
>
> I have a few questions regarding how to configure this in Postfix.
>
> 1) It's obvious that Postfix has to authenticate to Google SMTP server to
> submit mail through it (with credentials of that specially-created Gmail
> account). However, I found in the Postfix docs that SMTP client
> authentication works only with Cyrus SASL module, not with Dovecot one. I
> have currently Dovecot SASL configured, as Dovecot is running as my IMAP
> server, and I don't want to change that. Is it possible to have both SASL
> modules (Cyrus and Dovecot) installed and working simultaneously? Or to
> have Cyrus module working with Dovecot IMAP server? Well, it is actually
> more a generic Linux question than Postfix-specific, but I hope someone here
> will be able to answer :)

The Dovecot authentication server has information about local users.
This may explain why there is no SASL client implementation for
Dovecot to log ino a remote server.

> 2) Assuming I have SMTP client authentication working, now I have to setup
> transport_maps (and smtp_sasl_password_maps) so that only mail to Gmail is
> sent through Gmail server. And here is some tricky part.
>
> While putting the gmail.com domain explicitly as a key in transport(5) table
> is no problem, there is a multitude of companies that are using G Suite and
> have Gmail-hosted mail with their own domain, and I experience the same
> issue with them (ie. my mail being put to Spam by Gmail). So there's a need
> to check if the MX for a destination domain is within google.com or
> googlemail.com domain, and if yes, to send mail via Gmail server as well.
> Is there any way to do it with transport_maps ?

There are two places where Postfix can do MX lookups for a remote
recipient:

- In the SMTP client.

- In the SMTP server (check_recipient_mx_access).

You can use check_recipient_mx_access to return 'filter:gmail-submission',
and have a gmail-submission transport in master.cf that always sends
mail through the gmail submission server.

The example below uses 'filter', which would conflict with other
'filter' settings for spam blocking etc. If you would have that
conflict, you would need to set up a separate Postfix instances for
inbound and outbound mail, and apply the example below to the
outbound Postfix instance.

Disclaimers:

- It applies the filter to all recipients including those
  that aren't hosted at Google.

- untested example

/etc/postfix/main.cf:
    smtpd_recipient_restrictions =
        check_recipient_mx_access hash:/etc/postfix/rcpt_access

/etc/postfix/rcpt_access:
    # Assumes parent_domain_matches_subdomains = ...smtpd_access_maps...
    googlemail.com      filter gmail-submission:smtp.gmail.com
    google.com          filter gmail-submission:smtp.gmail.com

/etc/postfix/master.cf:
    smtp      unix  -       -       n       -       -       smtp
        -o smtp_sasl_auth_enable=yes
        -o smtp_sasl_password_maps=whatever

If you don't have other 'filter' settings then you can implement
the above example in the Postfix instance that receives inbound
mail.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail to Gmail users via Gmail server?

Jaroslaw Rafa
In reply to this post by Viktor Dukhovni
Dnia 29.09.2019 o godz. 13:21:53 Viktor Dukhovni pisze:
>
> The trouble is that such accounts are generally restricted to a
> single envelope sender address, likely with a matching single "From"
> address.

You can define in Gmail account settings alternate sender addresses that
this account is allowed to send mail as. That's what I plan to use. As I
use very few sender addresses, I guess that would be sufficient.

> > While putting the gmail.com domain explicitly as a key in transport(5) table
> > is no problem, there is a multitude of companies that are using G Suite and
> > have Gmail-hosted mail with their own domain, and I experience the same
> > issue with them (ie. my mail being put to Spam by Gmail). So there's a need
> > to check if the MX for a destination domain is within google.com or
> > googlemail.com domain, and if yes, to send mail via Gmail server as well.
> > Is there any way to do it with transport_maps ?
>
> Postfix has no built-in mechanism for this, and it would be rather
> difficult to do this in a performant manner.  Transport resolution
> happens in the queue-manager on one recipient address at a time.
> Lookups of remote MX hosts, can take multiple seconds, and your
> mail queue can suffer congestive collapse even with a small fraction
> of email to a domain with DNS lookup problems.

Seems no problem for me as this is very low volume mail server, it serves
only a few accounts.

Is it possible to somehow use a script in place of the lookup table for
transport_maps ? Thus I could write a script that checks the MX and returns
the appropriate result.

> There are further complications, since some of these domains could
> use non-standard names (in their own domains) for the Gmail MX
> hosts, or just names owned by Google that you might not be aware
> of.  For example, you may not yet be aware of mx[1234].smtp.goog
> as additional (DNSSEC signed) Gmail MX hosts.

Thanks for pointing that out, do you know of any other such names?

> The real solution is to find a way to deliver mail normally,
> like everyone else, without going to the Junk folder.  For
> that
[...]
> I would not recommend this "solution".  Instead find a way to send
> email that Gmail will not routinely consider to be junk.

If only I could find a way to send mail to Gmail without having it marked as
spam, I would certainly do it! But I couldn't.

I have tried everything what you suggested, to no avail (didn't I already
write this in first email)? I never used IPv6. I didn't have DKIM and SPF on
my domain but I added that recently, after I started to have problems (by
the way SPF is evil, and this article is still valid, despite being written
in 2005: http://david.woodhou.se/why-not-spf.html - that's why I avoided SPF
as long as I could). The only thing I can't do is I cannot completely avoid
forwarding mail to Gmail accounts, because there are some addresses on my
server that need to be kept as forwarding addresses after people moved to
Gmail; but as I see from server logs, very small number of messages is
coming to these addresses and gets forwarded to Gmail.

I registered my domain with Google's "Postmaster Tools" that allow to check
the "reputation" of a given sender domain, but the tool won't show any data
because the volume of mail from my domain is too low (according to their
help page, you need at least hundreds of messages per day, which is far more
than I would ever send :)).

Of course, what I would like is to be able to
deliver mail to Gmail normally, but it seems the issue is on Google's side,
as more and more people are experiencing this issue. Please look for example
at this:
https://www.tablix.org/~avian/blog/archives/2019/04/google_is_eating_our_mail/
or this (this is from 2015!):
https://battlepenguin.com/tech/how-google-and-microsoft-made-email-unreliable/
And that are only two of many, many similar examples I found when searching
the net. Basically, perfectly legitimate emails from properly configured
mailservers get randomly classified as spam or even SMTP rejected by Google.
Nobody knows what it depends on and it seems nobody can do anything about
this. Of course there is no possibility to contact Google with regard to
such issues, why would they care about non-Gmail users out there on the
Internet at all? ;-> They want everyone to be on Gmail, then there will be
"no problems"...

My emails were delivered to Gmail without any problems for long time.
Suddenly they started to go to spam. I didn't send any spam and my server
wasn't relaying any. Now my emails still go without problems to people with
whom I corresponded previously, but for the Gmail accounts to which I never
wrote previously, and write to them for the first time, they go straight to
spam. I tried this on three freshly created Gmail accounts one after the
other. My emails sent to these accounts landed right away in spam. Google
said that "message is similar to the ones already caught as spam", which I
understand is probably a generic catch-all phrase they use for all cases, as
all the messages were different and similar neither to each other nor to
anything spam-like. BTW, Gmail indicated that SPF, DKIM and DMARC tests
passed. Clicking "This isn't spam" on one account fixed the problem for
that account, but didn't have any influence on other accounts. So I'm
stuck, for over a week I was trying everything that I could, and still
nothing changed.

The "solution" I was suggesting here is a heavily flawed workaround - I am
completely aware of this - but this seems to be the last resort, as it seems
to be no way to send mail to Gmail "normally".
--
Regards,
   Jaroslaw Rafa
   [hidden email]
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail to Gmail users via Gmail server?

Jaroslaw Rafa
In reply to this post by Wietse Venema
Dnia 29.09.2019 o godz. 13:30:38 Wietse Venema pisze:

>
> There are two places where Postfix can do MX lookups for a remote
> recipient:
>
> - In the SMTP client.
>
> - In the SMTP server (check_recipient_mx_access).
>
> You can use check_recipient_mx_access to return 'filter:gmail-submission',
> and have a gmail-submission transport in master.cf that always sends
> mail through the gmail submission server.

Looks like it's of no use to me, as most mail I send is sent via local
/usr/lib/sendmail submission (from mutt) and not via SMTP client.

Is it possible to use some script in transport_maps= parameter to check MX
of a domain and return appropriate result?
--
Regards,
   Jaroslaw Rafa
   [hidden email]
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail to Gmail users via Gmail server?

Viktor Dukhovni
In reply to this post by Jaroslaw Rafa
On Sun, Sep 29, 2019 at 09:50:12PM +0200, Jaroslaw Rafa wrote:

> Is it possible to somehow use a script in place of the lookup table for
> transport_maps ? Thus I could write a script that checks the MX and returns
> the appropriate result.

    http://www.postfix.org/socketmap_table.5.html

> > There are further complications, since some of these domains could
> > use non-standard names (in their own domains) for the Gmail MX
> > hosts, or just names owned by Google that you might not be aware
> > of.  For example, you may not yet be aware of mx[1234].smtp.goog
> > as additional (DNSSEC signed) Gmail MX hosts.
>
> Thanks for pointing that out, do you know of any other such names?

A quick (partial) search through my DNSSEC survey database for names that
resolve into one Google's address block, turns up many MX hosts that CNAME
to:

    ghs.google.com
    ghs4.google.com
    ghs46.google.com
    ghs6.google.com
    aspmx.l.google.com
    alt2.aspmx.l.google.com
    alt4.aspmx.l.google.com
    googlemail.l.google.com
    googlemail-imap.l.google.com
    mail.google.com
    ghs.googlehosted.com
    ghs4.googlehosted.com
    ghs46.googlehosted.com
    ghs6.googlehosted.com
    aspmx3.googlemail.com
    aspmx5.googlemail.com

or use less familiar Google-owned names such as:

    alt0.aspmx.l.google.com
    alt1.aspmx.l.google.com
    alt10.aspmx.l.google.com
    alt14.aspmx.l.google.com
    alt21.aspmx.l.google.com
    alt31.aspmx.l.google.com
    alt41.aspmx.l.google.com
    alt5.aspmx.l.google.com
    alt7.aspmx.l.google.com
    alt1.gmail-smtp-in.l.google.com
    alt2.gmail-smtp-in.l.google.com
    gmail-smtp-in.l.google.com
    alt1.gmr-smtp-in.l.google.com
    alt4.gmr-smtp-in.l.google.com
    googlemail.l.google.com
    alt2.aspmx2.googlemail.com
    aspmx2.googlemail.com
    alt3.aspmx3.googlemail.com
    alt1.aspmx5.googlemail.com
    mx1.smtp.goog
    mx2.smtp.goog
    mx3.smtp.goog
    mx4.smtp.goog

(so you'd at least have to CNAME expand the MX hosts) and some that
resolve directly into Google's IP space:

    external-google-mx.samspin.net

though often not actually working SMTP servers.  Reliably detecting
a Google-operated SMTP server may be non-trivial.

> > I would not recommend this "solution".  Instead find a way to send
> > email that Gmail will not routinely consider to be junk.
>
> If only I could find a way to send mail to Gmail without having it marked as
> spam, I would certainly do it! But I couldn't.

Get a new Internet provider with a new address?

> The only thing I can't do is I cannot completely avoid
> forwarding mail to Gmail accounts, because there are some addresses on my
> server that need to be kept as forwarding addresses after people moved to
> Gmail; but as I see from server logs, very small number of messages is
> coming to these addresses and gets forwarded to Gmail.

And yet these, can poison your server's reputation.  Instead of
forwarding reject the mail with a message that contains the new
address.  See the "relocated_maps" parameter.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail to Gmail users via Gmail server?

Viktor Dukhovni
On Sun, Sep 29, 2019 at 05:33:53PM -0400, Viktor Dukhovni wrote:

> Reliably detecting a Google-operated SMTP server may be non-trivial.

That said, the Google SMTP server certificate does provide a crib
for the popular names (resorted):

    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: mx.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: aspmx.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt1.aspmx.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt2.aspmx.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt3.aspmx.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt4.aspmx.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: gmail-smtp-in.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt1.gmail-smtp-in.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt2.gmail-smtp-in.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt3.gmail-smtp-in.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt4.gmail-smtp-in.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: gmr-mx.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: gmr-smtp-in.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt2.gmr-smtp-in.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt3.gmr-smtp-in.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: alt4.gmr-smtp-in.l.google.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: aspmx2.googlemail.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: aspmx3.googlemail.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: aspmx4.googlemail.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: aspmx5.googlemail.com
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: mx1.smtp.goog
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: mx2.smtp.goog
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: mx3.smtp.goog
    posttls-finger: alt1.gmr-smtp-in.l.google.com[2a00:1450:4010:c03::e]:25: subjectAltName: mx4.smtp.goog

Names not listed in the certificate are presumably not nearly as
frequently used.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail to Gmail users via Gmail server?

Jaroslaw Rafa
In reply to this post by Viktor Dukhovni
Dnia 29.09.2019 o godz. 17:33:53 Viktor Dukhovni pisze:
>
>     http://www.postfix.org/socketmap_table.5.html

I know very little about socket programming. Is there some kind of readily-
available "wrapper" around eg. shell script (or anything other that reads
from stdin and writes to stdout) that I can use?

> A quick (partial) search through my DNSSEC survey database for names that
> resolve into one Google's address block, turns up many MX hosts that CNAME
> to:

It's strange, as having MX records that point to CNAME is explicitly
forbidden by RFC. MX name *must* resolve to an A record, not CNAME. However,
thanks for listing the target addresses.

>
> Get a new Internet provider with a new address?

Which means find a new VPS hosting provider (disregarding the fact that I
have already paid up for the entire next year), configure a new server with
all the software and services from scratch (as hosting providers usually do
not support exporting and importing entire customers' VMs) and move all data
to new server. And all this could be ineffective if it turns out that it is
my domain name, and not my IP address, what Google "doesn't like". Even if
this succeeds, there is no guarantee that in the future Google will not go
crazy again and start treating my email as spam.

No, thanks. Trying to configure sending mail via Gmail's server looks like a
much more reasonable alternative compared to this...
--
Regards,
   Jaroslaw Rafa
   [hidden email]
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail to Gmail users via Gmail server?

Viktor Dukhovni
On Mon, Sep 30, 2019 at 01:44:29AM +0200, Jaroslaw Rafa wrote:

> Dnia 29.09.2019 o godz. 17:33:53 Viktor Dukhovni pisze:
> >
> >     http://www.postfix.org/socketmap_table.5.html
>
> I know very little about socket programming. Is there some kind of readily-
> available "wrapper" around eg. shell script (or anything other that reads
> from stdin and writes to stdout) that I can use?

The server side should be persistent and able to handle multiple
requests on a single connection.  Code for this is most simply
written in Python or Perl.  I would not recommend shell scripts in
this context, especially for security reasons.

You'll also need to do DNS lookups of various sorts, after correctly
parsing input email addresses into as localpart@domainpart.

> It's strange, as having MX records that point to CNAME is explicitly
> forbidden by RFC. MX name *must* resolve to an A record, not CNAME. However,
> thanks for listing the target addresses.

That's what the RFC says, but in practice all MTAs support CNAMEs, and
some domains rely on them working.

> Which means find a new VPS hosting provider (disregarding the fact that I
> have already paid up for the entire next year), configure a new server with
> all the software and services from scratch (as hosting providers usually do
> not support exporting and importing entire customers' VMs) and move all data
> to new server.

Yes.

> And all this could be ineffective if it turns out that it is
> my domain name, and not my IP address, what Google "doesn't like".

Most email sender reputation is by IP.

> Even if
> this succeeds, there is no guarantee that in the future Google will not go
> crazy again and start treating my email as spam.

Correct.

> No, thanks. Trying to configure sending mail via Gmail's server looks like a
> much more reasonable alternative compared to this...

Your call of course.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Sending mail to Gmail users via Gmail server?

Stuart Henderson
In reply to this post by Jaroslaw Rafa
On 2019-09-29, Jaroslaw Rafa <[hidden email]> wrote:
>                      The only thing I can't do is I cannot completely avoid
> forwarding mail to Gmail accounts, because there are some addresses on my
> server that need to be kept as forwarding addresses after people moved to
> Gmail; but as I see from server logs, very small number of messages is
> coming to these addresses and gets forwarded to Gmail.

This *will* cause you problems - you'll be forwarding them mail that
results in dmarc failures, and quite likely also the occasional spam
email, tarnishing your IP reputation.

Have those users configure gmail to pull the mail via POP3 instead,
it is the only safe way to do this.