Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Email forwarding



On Sat, 29 Jan 2022 at 15:42, Stephen J. Turnbull <stephenjturnbull@example.com> wrote:
Josh Glover writes:

 > How in the world does email forwarding work?

If you can do it at all, the forwarding part is already working.

I expected something along the lines of that response from somewhere. ;)

Email is *fundamentally* a store and forward mechanism, [...]
 
Simple as it is, I can think of a bunch of reasons why this would
fail, mostly having to do with "you're not authorized to do this."

Yup, this is where Gmail is fighting me.

What do you mean by "sender address"?

RFC 821 MAIL FROM: the agent responsible for the message
RFC 822 From: the author, ie, the agent responsible for the content of
    the message.

These two seem to have to match when using Gmail's SMTP server to send mail, and you're not allowed to send MAIL FROM anyone but the user you authenticate as; at least that is what I've concluded based on my experiments.

(The other two are "Original-From" and "Original-Sender" for use when
a message leave the mail system, is processed by some other agent, and
reinjected, such as a forward.)

I've tried messing with these as well. My idea was that maybe I could rewrite the RFC 822 From header to jmglov@example.com, then stick the original From address in one or both of Original-From or Original-Sender. The problem is that I don't remember where in the twisted labyrinth I tried this. It's very possible that when I tried this, something else was wrong.

That's actually bizarre.  Mail *from* a local address that appears to
have originated outside the local administrative domain typically is
flagged as spam (or gets "spam points").

I can't find any documentation on how Gmail wants you to do this sort of thing, so I'm just guessing here.

ISTR AWS doesn't allow you to run an MTA.  Does it?  I wouldn't be
surprised if this setup violates your ToS, it looks awfully close to
an open relay.

I think it's OK because it only sends mail to one destination, which is my account. I'm not using SES to send email, only to receive it. The code that does the sending uses a regular SMTP client to authenticate to Gmail.

But I think this is one of those "ask for forgiveness not permission" things. ;)

But rules be damned, what error or anomolous behavior do you get if
you don't change the "sender"?

Gmail just silently fails to deliver the mail. It doesn't end up in my spam, it just gets /dev/null'd as far as I can tell.

Cheers,
Josh

Home | Main Index | Thread Index