Link to home
Create AccountLog in
Linux

Linux

--

Questions

--

Followers

Top Experts

Avatar of psimation
psimation🇿🇦

Generics Domains on Sendmail
HI

I use sendmail and cyrus and also generics domains to check sender address for all smtp traffic.

I have a client who wants to have his 2 domains' mail drop to the same box, and also be able to simply "Reply" to any e-mail received.

My understanding of generics domains is that the server will first authenticate your smpt request, then it will do a reverse e-mail address lookup in the generics-table to see what e-mail address is associated with the username used when authenticating.

If the user receives mail for 2 different domains in his mailbox, and replies to them, depending on which account the mail was addressed to, a simple "Reply" would send the server a different e-mail address than what is listed in the generics table for that username.

So, the question;

can i have 2 entries for the same username in the generics table that allows me to send as 2 domains? ( I don't want to just put it in on the live server, and I don't have a test environment handy atm...)

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of durindildurindil

You can't have two of the same username in the Generics table, because it will only use the last one.  But you could make two separate accounts (like john and john1) and associate each of those with a separate domain (like john@domain.com and john@google.com).  Then, point both of them to the same user name in the virtusertable (for mail acceptance you could use john, for example).

When the user sets up his/her e-mail client, they will get mail deilvered to the "john" account, and can reply with the same account that the mail was sent to (like the john or john1.)  If they want to send an original message under a different account, they just need to add that account to the mail client.

Avatar of psimationpsimation🇿🇦

ASKER

HI
Thx for the reply

What I did so far (and it seems to be working), but I'm not sure...


genericstable:

username                                               addy1@domain1.com , addy2@domain2.com


This seems to work, coz I sent mail to both addy1 and addy2, which in virtusertable gets dropped to account1; the recipient then simply replied to both, and I got both e-mails fine, and at least one of them would have had a e-mail/username missmatch...


Good to hear it works.  By the way, if you solve your question on your own, you can post to the administrative section to have your points refunded.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of psimationpsimation🇿🇦

ASKER

Well, I'm not too sure it's solved, If someone can just "confirm" that this is in fact a proper way of doing it, then I'd still be glad to assign the points, but, don't try to pull a fast one!! ;) Plz give me a link to some official readme's etc so I know I wasn't simply lucky by trying to do it this way...

Avatar of PsiCopPsiCop🇺🇸

See this PAQ for how to configure sendmail like you want --> https://www.experts-exchange.com/questions/21322113/Practical-Modern-Sendmail-Configuration-Info-Question.html

The "genericdomains" is NOT for Virtual Hosting - at least not for RECEIVING E-Mail in a VH configuration. "genericdomains" is used to rewrite the FROM: lines on the headers of OUTGOING E-Mail.

"virtusertable" and "mailertable" are the primary tools for accepting and directing INCOMING E-Mail for a VH environment.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of psimationpsimation🇿🇦

ASKER

Hi PsiCop

That was exactly what my question was about.... The incoming mail has never been a problem, it's the OUTGOING mail that caused a problem; ie. being able to send mail out as either of two addresses for only one account... I understand the incoming part, and that is fine, I just need confimration that my "fix" is indeed a fix and not some hack that will break other things along the line...

Maybe I didn't word my question correctly?

However... Rerading through the PAQ you linked, it seems that my "understanding" of the genericstable was somewhat wrong... It seems the file does a simple one to one replacement, meaning that in my case I *should* be able to get away with simply adding the two addresses for the 2 domains of the client, and it should work, however, is that file a left-to-right replacement, or will it also rewrite "backwards"?

Avatar of PsiCopPsiCop🇺🇸

Broadly, the steps for a genericstable-enabled environment are:

1) Examine the outgoing mail, find the "From:" header, pare it down to the Domain Name portion (the right-hand side, or RHS, of the address, minus any host name)

2) If Domain Name matches an entry from the generic-domains file, consult genericstable; if no match, make no change and pass the mail along to the next process

3) Take the left-hand side (LHS) of the address in the "From:" header and try to match it against a LHS entry in genericstable - use the first matching record

4) If no match is found, make no change, pass the mail along to the next process; if a match is found, rewrite the "From:" header in accordance with the rule presented in the RHS of the matching entry, then pass the mail along to the next process

Note that ONLY the "From:" header is rewritten. Other headers that may include "actual" user or host information, such as "MessageID", "Received" and "Reply-To" are NOT rewritten.

ASKER CERTIFIED SOLUTION
Avatar of PsiCopPsiCop🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account
Linux

Linux

--

Questions

--

Followers

Top Experts

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.