Linux
--
Questions
--
Followers
Top Experts
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.
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.
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...






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
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.

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.
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"?
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.
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.