Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Address Rewrite with a Twist

18 views
Skip to first unread message

clawes

unread,
May 19, 2016, 4:32:07 PM5/19/16
to
My employer provides hosted software solution for several hundred customers.
These customers often send email from these hosted applications.
Here is the problem:
Some receiving SMTP servers reject mail being relayed from our domain because the sender's address does not match our domain.

I'm looking for way to rename the sender's address to reflect our domain. Furthermore, I need to rename the sender's address so that the recipient can decipher the actual sender's email address.

For example:

john...@abc.com should be renamed to john.doe...@mydomain.com
dsm...@acme.com should be renamed to dsmith_...@mydomain.com
..And so on

We have too many customers to maintain a domain lookup table list. So I need a script/method to do the following:

If sender's domain is not mydomain.com then:
- Rename @<sender's domain> to _<senders'domain>
- Then append @mydomain.com the new address.

Again, john...@abc.com should be renamed to john.doe...@mydomain.com

None of the sendmail address write or masquerading examples I have found address my requirements.


I hope explanation is clear enough.

TIA

Carl Byington

unread,
May 19, 2016, 6:57:57 PM5/19/16
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512


On Thu, 19 May 2016 13:32:05 -0700, clawes wrote:

> None of the sendmail address write or masquerading examples I have
> found
> address my requirements.

First, abc.com, mydomain.com and acme.com all exist and are presumably
not yours.

It seems like you are looking for SRS, so
http://bmsi.com/python/milter.html or https://github.com/emsearcy/srs-
milter might be of interest.

Note that there are two places where the "sender" addresses appears:

MAIL FROM:<som...@customer.example.com>
RCPT TO:<tar...@recipient.example.com>
DATA
....
From: Joe <som...@customer.example.com>
Subject: ...
....


Many of these hosted applications end up sending mail as:

MAIL FROM:<apa...@internal.host.example.com>
From: application <som...@customer.example.com>

Where host.example.com and customer.example.com are unrelated. You might
consider setting up SPF records for customer.example.com showing your
internal.host.example.com as an allowed sender. That gets you an SPF
PASS value at Yahoo and others. Then generate DKIM keys and sign the
outgoing message with the key for customer.example.com. Yes, you need to
generate keys for every customer, but that is easily scripted.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEAREKAAYFAlc+RKkACgkQL6j7milTFsFT9ACaAxD7y7OJvZ6oD7HGX6adPsTh
FPQAmwZyPP6P2a8EQ7dkTrUBOb63Cacg
=dgiI
-----END PGP SIGNATURE-----

Claus Aßmann

unread,
May 19, 2016, 10:05:03 PM5/19/16
to
clawes wrote:

> Some receiving SMTP servers reject mail being relayed from our domain because the sender's address does not
> match our domain.

Seriously?

What kind of fubar'ed setup do those "servers" use?
Dont' they have problems with other "hosted" solutions?

This isn't about SPF or DKIM or something like that, is it?


--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.
0 new messages