Hoo Kok Mun wrote: > Hi there, > > Hope some good souls/guru will be able to help me out. > > My config: > *********** > sendmail 8.9.1 > (started with sendmail -bd -q15m, /etc/sendmail.cf has the > DeliveryMode=Background) > kernel 2.0.35 (slackware 3.6) > diald 0.16.5 > > My master.mc file that creates the sendmail.cf (m4 master.mc >/etc/sendmail.cf) > ********************************************** > divert(-1) > include(`../m4/cf.m4') > define(`confDEF_USER_ID',``8:12'') > OSTYPE(`linux') > undefine(`UUCP_RELAY') > undefine(`BITNET_RELAY') > define(`confAUTO_REBUILD') > define(`confTO_CONNECT', `1m') > define(`confTRY_NULL_MX_LIST',true) > define(`confDONT_PROBE_INTERFACES',true) > define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail') > FEATURE(`smrsh',`/usr/sbin/smrsh') > FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable') > FEATURE(redirect) > FEATURE(always_add_domain) > FEATURE(use_cw_file) > FEATURE(local_procmail) > MAILER(procmail) > MAILER(smtp) > dnl HACK(check_mail3,`hash -a@JUNK /etc/mail/deny') > dnl HACK(use_ip,`/etc/mail/ip_allow') > dnl HACK(use_names,`/etc/mail/name_allow') > dnl HACK(use_relayto,`/etc/mail/relay_allow') > dnl HACK(check_rcpt4) > dnl HACK(check_relay3) > FEATURE(`access_db') > FEATURE(`blacklist_recipients') > dnl FEATURE(`relay_based_on_MX') > define(`SMART_HOST',`smtp:[domain.com.sg]') > MASQUERADE_AS(`domain.com.sg') > FEATURE(`masquerade_envelope') > define(RELAY_MAILER, TCP) > FEATURE(`accept_unqualified_senders') > FEATURE(`promiscuous_relay') > > My problem: > *********** > whenever I send a mail whether it's local or internet mail, > the diald program dials out to the ISP. > (local mails were delivered after it connects to the ISP and > internet mails were delivered to the ISP too) > > If I do not start daild, everything works fine. > (local mails were delivered and internet mail was queued at /var/spool/mqueue) > (executing a sendmail -q (when connected to ISP) sent out all the queued > maild to the ISP) > > Solution needed: > **************** > How do I instruct diald to dial only for internet mails and not local mails? > Any other solutions will be appreciated. > > In fact everything works now but I will have to pay huge phone charges > because of the unnecessary dialup for local mails. > I had the same problem, but I am using IMAP to serve mail to my local net, so my .mc is different. I added the following: define(`confBIND_OPTS',`-DNSRCH -DEFNAMES') FEATURE(nocanonify) FEATURE(always_add_domain) FEATURE(accept_unresolvable_domains) The FEATURE(accept_unresolvable_domains) fixes the 550 errors when sending mail from behind your Linux box. You may also want to set the MASQUERADE_AS feature to your ISP's mail server. This will make mail originating within your network look like it came from your ISP. Otherwise, mail originating from the Linux box will look like it comes from [EMAIL PROTECTED], which I assume is fake. The recipient will not be able to reply. Also create a file called /etc/service.switch with the following in it: hosts files dns And lastly, create a file - /etc/mail/relay-domains - containing your local domain name, as defined by the search line in your /etc/resolv.conf. The m4 config file I used to make sendmail.cf is attached for reference. The key, I think, is the service.switch file. A lot of information can be found in /usr/doc/sendmail - README.cf and the operation and installation guide. Bob... -- -------------------------------------------------------- Bob Chiodini [EMAIL PROTECTED] --------------------------------------------------------
divert(-1) # # (C) Copyright 1995 by Carnegie Mellon University # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permission notice appear in # supporting documentation, and that the name of CMU not be # used in advertising or publicity pertaining to distribution of the # software without specific, written prior permission. # # CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING # ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL # CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR # ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. # # Contributed to Berkeley by John Gardiner Myers <[EMAIL PROTECTED]>. # # This sample mc file is for a site that uses the Cyrus IMAP server # exclusively for local mail. # divert(0)dnl VERSIONID(`@(#)cyrusproto.mc 8.3 (Carnegie Mellon) @(#)cyrusproto.mc 8.3') OSTYPE(linux)dnl define(`confBIND_OPTS',`-DNSRCH -DEFNAMES') FEATURE(nouucp) FEATURE(nocanonify) FEATURE(always_add_domain) MAILER(smtp) MAILER(cyrus) MASQUERADE_AS(mail.gnc.net) FEATURE(accept_unresolvable_domains) define(`confLOCAL_MAILER',`cyrus') LOCAL_RULE_0 Rbb + $+ < @ $=w . > $#cyrusbb $: $1
