Hi,

The sendmail configuration is as below.

#####################sendmail.mc##########################################
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl
define(`confDEF_USER_ID',``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
FEATURE(promiscuous_relay)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
##########################################################################
#######################virtusertable######################################
[EMAIL PROTECTED]   [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED]   [EMAIL PROTECTED]
@yahoo.com  [EMAIL PROTECTED]
@hotmail.com   [EMAIL PROTECTED]
@msn.com  [EMAIL PROTECTED]
[EMAIL PROTECTED]  [EMAIL PROTECTED]
##########################################################################
###########################local-host-names################################
# local-host-names - include all aliases for your machine here.
guru.com
server1.guru.com
server1
domain.com
#########################################################################

=> Here is the command output.
-----------------------------------------------------------------------
#sendmail -bv [EMAIL PROTECTED]
[EMAIL PROTECTED]... deliverable: mailer esmtp, host yahoo.com.guru.com., user [EMAIL PROTECTED]
-----------------------------------------------------------------------

It should return [EMAIL PROTECTED] and not [EMAIL PROTECTED]
 
also removing always_add_domain from sendmail.mc does helping.

TnR
Hiren

On 3/26/06, Hiren Dave <[EMAIL PROTECTED]> wrote:
Hi,
 
Thank you for your reply. Now I understant it.

TnR
Hiren
 
On 3/26/06, Boyd Stephen Smith Jr. <[EMAIL PROTECTED] > wrote:
On Saturday 25 March 2006 06:50, "Hiren Dave" < [EMAIL PROTECTED] > wrote
about 'Re: [gentoo-user] Sendmail virtusertable':
> Here I have used yahoo.com domain but it can be any domain lets say
> domain.com . My network is not connected to Internet. Still do you think
> that the following will not work if guru.com exists and domain.com does
> not exists physically.

Here's how mail delivery normally works:
1. Message is composed, and sending is initiatied.
2. (Optional) message is handed off to a MTA, this might be local, remote
via SMTP, or a separate part of the same application.
3. The domain part of each of the destination addresses is queried for an
MX record from DNS; if no MX record exists the A record is used instead.
4. An SMTP connection is made to the host (MX) or address (A) and the
message is delivered there.
5. The MDA on that server decides what to do with the message.  The may
involve forwarding (going back to step 2), local delivery (THIS IS WHERE
THE VIRTUAL USER TABLE [or equivalent] IS QUERIED), or other actions.
6. Once final delivery is made to a mailbox (or the mailboxes), the
recipients use POP, IMAP, Web, mbox, maildir, and/or other methods to read
the mail.

Does that help?

If you are truly isolated from the internet, you can indeed make sure that
the DNS MX record for yahoo.com points to your MDA and deliver
[EMAIL PROTECTED] to a local mailbox, but it involves more than just your
virtual user table.

--
"If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability."
-- Gentoo Developer Ciaran McCreesh
--
[email protected] mailing list



Reply via email to