Operating System - HP-UX
1834156 Members
2879 Online
110064 Solutions
New Discussion

sendmail / user DB and Cc:

 
SOLVED
Go to solution
Fred Martin_1
Valued Contributor

sendmail / user DB and Cc:

I have a user DB set up, so that outgoing email from my sendmail server has the "From" address re-written.

Basically, email from "xfm" is re-written to be from "fmartin@mydomain.com" and incoming mail to "fmartin" is delivered to "xfm".

This all works swell. The problem is with Cc: addresses or multiple addresses on the To: line.

Example:

From: xfm
To: willy@aol.com
Cc: xdd,xkt

Willy sees the mail as coming from fmartin@mydomain.com, but the Cc: addresses are not changed.

If Willy does a "reply-to-all" he gets delivery errors on the other addresses.

Surely this bridge has been crossed,
Fred
fmartin@applicatorssales.com
7 REPLIES 7
Geoff Wild
Honored Contributor

Re: sendmail / user DB and Cc:

Do you have the DM macro set to:

DMmydomain.com

in sendmail.cf?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: sendmail / user DB and Cc:

I think there may be missing entries for xdd and xkt in the /etc/mail/virtusertable and /etc/mail/genericstable database.

The aliases can also be set up in /etc/mail/aliases

To put the changes into use for sendmail.cf you might need a script: http://www.hpux.ws/buildmail.hpux.text

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fred Martin_1
Valued Contributor

Re: sendmail / user DB and Cc:

No. If memory serves me, the reason is because this server masquerades for three different domains. Forgot to mention that twist...one server for three companies.

DNS points MX records for three different domains to this one server.

The user DB has three different domains depending on which of our three companies the person works for. So the domain in mailname entry for a particular user may vary from other users.

xfm:mailname fmartin@mydomain.com
fmartin:maildrop xfm
xdd:mailname ddube@otherdomain.com
ddube:maildrop xdd

I think if I put a DM in there, the domain would appear incorrect for two thirds of the users - although, of course, the server would accept and deliver the mail just fine.
fmartin@applicatorssales.com
Fred Martin_1
Valued Contributor

Re: sendmail / user DB and Cc:

Have I stumped the panel? :)

I tried the DM macro. Yes, that fixes it, however it does have the affect that -all- users, even those that are from the masqueraded domains, get the domain that is called out in DM.

Is there anything more clever that I could do? It would need to extract the appropriate domain from the user DB, somehow.
fmartin@applicatorssales.com
Fred Martin_1
Valued Contributor

Re: sendmail / user DB and Cc:

Well, I say it works...but DM only affects the domain part of the address. So the real login ID is not masked:

Cc: xfm@mydomain.com, xdd@mydomain.com

Where I'd really like to see:

Cc: famrtin@mydomain.com, ddube@otherdomain.com

As I said the former is deliverable, it's just not pretty, and in the case of the two masqueraded domains, the domain shown is incorrect.
fmartin@applicatorssales.com
Scott Mitchell
Advisor
Solution

Re: sendmail / user DB and Cc:

Fred, the sendmail user database *only* converts the "From" address ('mailname' of xfm gets changed to fmartin@mydomain.com) on outgoing emails. *No changes are made to the "To, CC or BCC" addressees on outgoing emails.*

On incoming emails, if there is a recognized 'maildrop' name, *only* that name (or names) get changed in the "To" (or CC/BCC) addresses ('maildrop' of fmartin@mydomain.com gets changed to xfm).

In order for Willy to get the correct email addresses for xdd and xkt, you'll have to use the full "public" address in your outgoing email - ddang@mydomain.com, ktang@otherdomain.com ( where ddang@mydomain.com is the maildrop for xdd and ktang@otherdomain.com is the maildrop for xkt).

Been over the bridge with HP and that was their answer on the other side ...

Scott
Fred Martin_1
Valued Contributor

Re: sendmail / user DB and Cc:

Thanks. I'll probably fill out the DM macro anyway, even though for two of the companies the domain will be wrong; at least it will be deliverable. And, I'll (try to) train users to fully qualify Cc: addresses.
fmartin@applicatorssales.com