LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   HELP! Sendmail Config for xxx.domain.com where xxx is not domain, but want act like 1 (https://www.linuxquestions.org/questions/linux-newbie-8/help-sendmail-config-for-xxx-domain-com-where-xxx-is-not-domain-but-want-act-like-1-a-86578/)

rld1025 08-28-2003 08:57 AM

HELP! Sendmail Config for xxx.domain.com where xxx is not domain, but want act like 1
 
Hello,

I am trying to do 2 things with sendmail.. but first a little background.

Environment: RedHat 7.3 system, Sendmail 8.11.6-3 (know I need to upgrade this)

Sendmail is up and running fine for me, I have several entries in my local-host-names that are acutal registered domains and corresponding entries in trusted-users for each domain. All e-mails sent to the user cs@local-host-names entry are piped to a program and all is fat and happy. When mail is sent to this, I get a log entry similar to this:

Aug 28 09:26:20 data sendmail[13038]: h7SDQKa13038: from=<me@yahoo.com>, size=529, class=0, nrcpts=1, msgid=<20030828132619.34035.qmail@web9904.mail.yahoo.com>, proto=SMTP, daemon=MTA, relay=web9904.mail.yahoo.com [216.136.129.247]
Aug 28 09:26:21 data sendmail[13039]: h7SDQKa13038: to=|loademail, ctladdr=<cs@local-host-names.domain.com> (8/0), delay=00:00:01, xdelay=00:00:00, mailer=prog, pri=30201, dsn=2.0.0, stat=Sent


note the ctladdr entry is going to cs@entry in my local-host-names file..


Until I try to implement the following scenerio..

I want to make have mail sent to user@voicemail.mydomain.com go to my sendmail server and have all mail saved in a file on my box.

I put a CNAME entry in for voicemail.mydomain.com pointing at the hostname of my mail server. DNS resolves correctly. When I send mail to someone@voicemail.domain.com, the log entry shows that sendmail resolves the cname to real domain name.com.
Here is a log entry for mail sent to user@voicemail.domain.com

Aug 28 09:28:45 data sendmail[13060]: h7SDSja13060: from=<me@yahoo.com>, size=510, class=0, nrcpts=1, msgid=<20030828132832.39025.qmail@web9901.mail.yahoo.com>, proto=SMTP, daemon=MTA, relay=web9901.mail.yahoo.com [216.136.129.36]
Aug 28 09:28:45 data sendmail[13061]: h7SDSja13060: to=<me@hostname.domain.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30158, dsn=2.0.0, stat=Sent


** note that it is to=me@hostname.domain.com, rather than me@voicemail.domain.com


that is the 1st part of the question.. how to get mail sento to voicemail.domain.com to not have the cname translated by dns to realdomain.com.


Part 2.

Once part 1 is working, as I said, I need all e-mal sent to anyuser@voicemail.domain.com to go to 1 file.

I have put an entry in vitusertable (tab deliminated)
@voicemail.domain.com voicemail
done a make on virtusertable and have my virtusertable.db

Then put an alias entry
voicemail /path/to/file

I really think I can get the part 2 working if my part 1 would work, but would appreciate anyone that can give me any pointers.


Thanks for any input and help!!

Bob:confused:

Sticky Toejam 09-10-2003 10:42 PM

----------------------------------------------------------------------------------------
hat is the 1st part of the question.. how to get mail sento to voicemail.domain.com to not have the cname translated by dns to realdomain.com.
-----------------------------------------------------------------------------------------

Answer, part one: Wax the CNAME entry for voicemail.domain.com unless you need it. Have an MX record for voicemail.domain.com pointing to your unix box.

Answer, part two: You need to add "voicemail.domain.com" to either the /etc/mail/sendmail.cw or to the "cw" variable in /etc/mail/sendmail.cf. Once done (so Sendmail knows to suck in mail for that domain) you will then need to add an entry int
/etc/mail/virtusertable as such:

@voicemail.domain.com voicemail

This will be the userid "voicemail" on that box. You do not need to add an entry into /etc/mail/aliases for this to happe. If you want all mail to "voicemail.domain.com" to go somewhere else (ie, say myvoicemail@other.domain.com) the virtusertable entry would read:

@voicemail.domain.com myvoicemail@other.domain.com

Then "makemap -v hash virtusertable <virtusertable" and you should be home free.

rld1025 09-11-2003 07:53 AM

Thanks,

I got this worked out end of last week.. my mistake was my entry in my cf file, i did not have virtusrtable -hash..., and I had removed the CNAME, I read the RFC. I do appreciate the response. This was a good sendmail lesson for me..


All times are GMT -5. The time now is 03:56 PM.