|
Consider an alias like Sending a message to The message to Gmail is received. The one to Yahoo Mail is not – because Yahoo does not support plus addressing: I made sure the Yahoo Mail address causes the error by directly sending a message to So I would need to prevent the plus addressing being added to the I already tried it with a regex: Any ideas or suggestions? |
Replies: 1 comment
|
There is no configuration that does this today, and the reason your regex could not work is that the tag is re-attached after alias resolution, not during it. In if (!address.includes('+')) return { ..., addresses: forwardingAddresses };
return {
...,
addresses: forwardingAddresses.map((forwardingAddress) => {
if (isFQDN(forwardingAddress) || isIP(forwardingAddress) || isURL(forwardingAddress, config.isURLOptions))
return forwardingAddress;
return `${parseUsername(forwardingAddress)}+${parseFilter(address)}@${parseHostFromDomainOrAddress(forwardingAddress)}`;
})
};That map runs over the destinations your alias already resolved to, so whatever the alias looked like, regex or not, every destination that is an email address gets Chaining does not get you out of it either, since the second hop would see an inbound address that still contains a I checked for a switch and did not find one: nothing per-alias or per-destination governs this, and the closest existing shape is This is from reading the source rather than running it, so worth confirming with the maintainers, but the branch is explicit enough that I would not expect a configuration answer to exist. Worth raising as a feature request given Yahoo is not the only receiver that rejects a plus in the local part. |
There is no configuration that does this today, and the reason your regex could not work is that the tag is re-attached after alias resolution, not during it.
In
helpers/get-forwarding-addresses.jsthe whole thing is decided at the end ofgetForwardingAddresses. If the inbound address has no+it returns the forwarding addresses untouched. If it does, it maps over every one of them: