LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-24-2005, 05:48 AM   #1
singying304
Member
 
Registered: Feb 2005
Posts: 106

Rep: Reputation: 15
problem about sendmail...


I can have mails from outside domains, but i can't send mails between
users. Each time i try, I'm having problems with my mail server giving me this message

Feb 24 19:30:49 4-bss sendmail[9546]: j1OBOVDi009546: to=admin@singying.dyndns.org, ctladdr=apache (74/74), delay=00:06:18, xdelay=00:06:18, mailer=relay, pri=30625, relay=localhost.com. [10.11.12.13], dsn=4.0.0, stat=Deferred: Connection timed out with localhost.com.

Does anyone know what is going on?

It seems that sendmail looks for localhost.com but it's not written in
any config file...

I have the same case with php script and apache: sendmail has
relay=localhost.com <- but same not use.

I don't need to send mails outside, but I must send mails on intranet.

What's wrong??


It started a while back...and my logs have just gotten huge, I've also noticed that I'm not receiving any of my reports can this be the culprit?

Any help would be appreciated

This is how my /etc/hosts file looks:

127.0.0.1 localhost.localdomain localhost

it is wrong?, what I need to fix in here?


This is how my cat /etc/mail/access file looks:

localhost.localdomain RELAY
localhost RELAY
192.168.1 RELAY
127.0.0.1 RELAY

And in /etc/mail/local-host-names ( verbatim):
localhost
localhost.localdomain

it is wrong?, what I need to fix in here?

from php.ini

sendmail_path = /usr/sbin/sendmail -t -i

is it right?

should i add DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') to sendmail.mc? or not?

thx a lor

Last edited by singying304; 02-24-2005 at 05:51 AM.
 
Old 02-24-2005, 07:13 AM   #2
singying304
Member
 
Registered: Feb 2005
Posts: 106

Original Poster
Rep: Reputation: 15
does any one help? I have looked all over the interweb and have noticed that its just a glitch that noone knows how to fix or explain
 
Old 02-24-2005, 07:21 AM   #3
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
Quote:
Originally posted by singying304
does any one help? I have looked all over the interweb and have noticed that its just a glitch that noone knows how to fix or explain
your problem is "localhost.com". What is the name of your machine? Have you specified this name anywhere?
 
Old 02-24-2005, 07:27 AM   #4
singying304
Member
 
Registered: Feb 2005
Posts: 106

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by linuxxed
your problem is "localhost.com". What is the name of your machine? Have you specified this name anywhere?
i use mandarke 10,
[root@4-bss singying]# hostname
4-bss.com
 
Old 02-24-2005, 07:31 AM   #5
singying304
Member
 
Registered: Feb 2005
Posts: 106

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by linuxxed
Have you specified this name anywhere?
havn't~
 
Old 02-24-2005, 07:35 AM   #6
singying304
Member
 
Registered: Feb 2005
Posts: 106

Original Poster
Rep: Reputation: 15
should i change the hostname to localhost?
 
Old 02-24-2005, 07:39 AM   #7
singying304
Member
 
Registered: Feb 2005
Posts: 106

Original Poster
Rep: Reputation: 15
now i changed hostname to localhost
 
Old 02-24-2005, 04:53 PM   #8
singying304
Member
 
Registered: Feb 2005
Posts: 106

Original Poster
Rep: Reputation: 15
[root@4-bss mail]# cat /var/log/syslog
Feb 25 01:05:45 4-bss sendmail[7298]: j1OH5jqm007298: from=apache, size=382, class=0, nrcpts=1, msgid=<200502241705.j1OH5jqm007298@singying.dyndns.org>, relay=apache@localhost
Feb 25 01:05:50 4-bss sendmail[7299]: STARTTLS=server, relay=[221.127.31.254], version=TLSv1/SSLv3, verify=NO, cipher=DHE-RSA-AES256-SHA, bits=256/256
Feb 25 01:05:50 4-bss sendmail[7298]: STARTTLS=client, relay=singying.dyndns.org., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Feb 25 01:05:50 4-bss sendmail[7299]: j1OH5oc9007299: ruleset=check_rcpt, arg1=<kahong@hgcbroadband.com>, relay=[221.127.31.254], reject=550 5.7.1 <kahong@hgcbroadband.com>... Relaying denied. IP name lookup failed [221.127.31.254]
Feb 25 01:05:50 4-bss sendmail[7298]: j1OH5jqm007298: to=kahong@hgcbroadband.com, ctladdr=apache (74/74), delay=00:00:05, xdelay=00:00:05, mailer=relay, pri=30382, relay=singying.dyndns.org. [221.127.31.254], dsn=5.7.1, stat=User unknown
Feb 25 01:05:50 4-bss sendmail[7299]: j1OH5oc9007299: from=<apache@singying.dyndns.org>, size=382, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=[221.127.31.254]
Feb 25 01:05:50 4-bss sendmail[7298]: j1OH5jqm007298: j1OH5jqn007298: DSN: User unknown
Feb 25 01:05:50 4-bss sendmail[7299]: j1OH5ocB007299: from=<>, size=2565, class=0, nrcpts=1, msgid=<200502241705.j1OH5jqn007298@singying.dyndns.org>, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=[221.127.31.254]
Feb 25 01:05:50 4-bss sendmail[7298]: j1OH5jqn007298: to=apache, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31406, relay=singying.dyndns.org. [221.127.31.254], dsn=2.0.0, stat=Sent (j1OH5ocB007299 Message accepted for delivery)
Feb 25 01:05:50 4-bss sendmail[7300]: j1OH5ocB007299: SYSERR(root): hash map "generics": missing map file /etc/mail/genericstable.db: No such file or directory
Feb 25 01:05:50 4-bss sendmail[7300]: j1OH5ocB007299: to=<apache@singying.dyndns.org>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32831, dsn=2.0.0, stat=Sent


-------
i have gotten a new error message
 
Old 02-24-2005, 08:31 PM   #9
odious1
Member
 
Registered: Jun 2003
Location: Virginia, USA
Distribution: Slackware
Posts: 252

Rep: Reputation: 30
could you post your sendmail.cf file. if i understand your set up this machine is handling smtp and pop services on a private network with no need to forward to another machine on port 25. if so then it should not be trying to relay. post your file and we will have a look. only the top of the file to where message rewriting begins is pertinent.

Tom
 
Old 02-25-2005, 08:05 PM   #10
singying304
Member
 
Registered: Feb 2005
Posts: 106

Original Poster
Rep: Reputation: 15
##### $Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp $ #####

# level 10 config file format
V10/Berkeley

# override file safeties - setting this option compromises system security,
# addressing the actual file configuration problem is preferred
# need to set this before any file actions are encountered in the cf file
#O DontBlameSendmail=safe

# default LDAP map specification
# need to set this now before any LDAP maps are defined
#O LDAPDefaultSpec=-h localhost

##################
# local info #
##################

# my LDAP cluster
# need to set this before any LDAP lookups are done (including classes)
#D{sendmailMTACluster}$m

Cwlocalhost
# file containing names of hosts for which we receive email
Fw/etc/mail/local-host-names

# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM

# host/domain names ending with a token in class P are canonical
CP.

# "Smart" relay host (may be null)
DS


# operators that cannot be in local usernames (i.e., network indicators)
CO @ % !

# a class with just dot (for identifying canonical names)
C..

# a class with just a left bracket (for identifying domain literals)
C[[

# access_db acceptance class
C{Accept}OK RELAY
# possible access_db RHS for spam friends/haters
C{SpamTag}SPAMFRIEND SPAMHATER

# Resolve map (to check if a host exists in check_mail)
Kresolve host -a<OKR> -T<TEMP>
C{ResOk}OKR


# Hosts for which relaying is permitted ($=R)
FR-o /etc/mail/relay-domains

# arithmetic map
Karith arith
# macro storage map
Kmacro macro
# possible values for TLS_connection in access map
C{tls}VERIFY ENCR





# dequoting map
Kdequote dequote

# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root
C{TrustAuthMech}LOGIN PLAIN

# who I masquerade as (null for no masquerading) (see also $=M)
DMlocalhost.localdomain

# my name for error messages
DnMAILER-DAEMON


# Mailer table (overriding domains)
Kmailertable hash /etc/mail/mailertable

# Virtual user table (maps incoming users)
Kvirtuser hash -o /etc/mail/virtusertable

# Generics table (mapping outgoing addresses)
Kgenerics hash /etc/mail/genericstable

CPREDIRECT

# Access list database (for spam stomping)
Kaccess hash -T<TMPF> /etc/mail/access

# MX map (to allow relaying to hosts that we MX for)
Kmxserved bestmx -z: -T<TEMP>


# Configuration version number
DZ8.12.11


###############
# Options #
###############

# strip message body to 7 bits on input?
O SevenBitInput=False

# 8-bit data handling
#O EightBitMode=pass8

# wait for alias file rebuild (default units: minutes)
O AliasWait=30

# location of alias file
O AliasFile=/etc/aliases

# minimum number of free blocks on filesystem
O MinFreeBlocks=100

# maximum message size
#O MaxMessageSize=1000000

# substitution for space (blank) characters
O BlankSub=.

# avoid connecting to "expensive" mailers on initial submission?
O HoldExpensive=False

# checkpoint queue runs after every N successful deliveries
#O CheckpointInterval=10

# default delivery mode
O DeliveryMode=background

# error message header/file
#O ErrorHeader=/etc/mail/error-header

# error mode
#O ErrorMode=print

# save Unix-style "From_" lines at top of header?
#O SaveFromLine=False

# queue file mode (qf files)
#O QueueFileMode=0600

# temporary file mode
O TempFileMode=0600

# match recipients against GECOS field?
#O MatchGECOS=False

# maximum hop count
#O MaxHopCount=25

# location of help file
O HelpFile=/etc/mail/helpfile

# ignore dots as terminators in incoming messages?
#O IgnoreDots=False

# name resolver options
#O ResolverOptions=+AAONLY

# deliver MIME-encapsulated error messages?
O SendMimeErrors=True

# Forward file search path
O ForwardPath=$z/.forward.$w:$z/.forward

# open connection cache size
O ConnectionCacheSize=2

# open connection cache timeout
O ConnectionCacheTimeout=5m

# persistent host status directory
#O HostStatusDirectory=.hoststat

# single thread deliveries (requires HostStatusDirectory)?
#O SingleThreadDelivery=False

# use Errors-To: header?
O UseErrorsTo=False

# log level
O LogLevel=9

# send to me too, even in an alias expansion?
#O MeToo=True

# verify RHS in newaliases?
O CheckAliases=False

# default messages to old style headers if no special punctuation?
O OldStyleHeaders=True

# SMTP daemon options
O DaemonPortOptions=Port=smtp, Address=0.0.0.0, Name=MTA
#O DaemonPortOptions=Name=MTA
#O DaemonPortOptions=Port=25, Name=MSA, M=E

# SMTP client options
#O ClientPortOptions=Family=inet, Address=0.0.0.0

# Modifiers to define {daemon_flags} for direct submissions
#O DirectSubmissionModifiers

# Use as mail submission program? See sendmail/SECURITY
#O UseMSP

# privacy flags
O PrivacyOptions=goaway,restrictqrun,restrictmailq

# who (if anyone) should get extra copies of error messages
#O PostmasterCopy=Postmaster

# slope of queue-only function
#O QueueFactor=600000

# limit on number of concurrent queue runners
#O MaxQueueChildren

# maximum number of queue-runners per queue-grouping with multiple queues
#O MaxRunnersPerQueue=1

# priority of queue runners (nice(3))
#O NiceQueueRun

# shall we sort the queue by hostname first?
#O QueueSortOrder=priority

# minimum time in queue before retry
#O MinQueueAge=30m

# how many jobs can you process in the queue?
#O MaxQueueRunSize=10000

# perform initial split of envelope without checking MX records
#O FastSplit=1

# queue directory
O QueueDirectory=/var/spool/mqueue

# key for shared memory; 0 to turn off
#O SharedMemoryKey=0



# timeouts (many of these)
#O Timeout.initial=5m
O Timeout.connect=1m
#O Timeout.aconnect=0s
#O Timeout.iconnect=5m
#O Timeout.helo=5m
#O Timeout.mail=10m
#O Timeout.rcpt=1h
#O Timeout.datainit=5m
#O Timeout.datablock=1h
#O Timeout.datafinal=1h
#O Timeout.rset=5m
#O Timeout.quit=2m
#O Timeout.misc=2m
#O Timeout.command=1h
#O Timeout.ident=5s
#O Timeout.fileopen=60s
#O Timeout.control=2m
O Timeout.queuereturn=5d
#O Timeout.queuereturn.normal=5d
#O Timeout.queuereturn.urgent=2d
#O Timeout.queuereturn.non-urgent=7d

O Timeout.queuewarn=4h
#O Timeout.queuewarn.normal=4h
#O Timeout.queuewarn.urgent=1h
#O Timeout.queuewarn.non-urgent=12h

#O Timeout.hoststatus=30m
#O Timeout.resolver.retrans=5s
#O Timeout.resolver.retrans.first=5s
#O Timeout.resolver.retrans.normal=5s
#O Timeout.resolver.retry=4
#O Timeout.resolver.retry.first=4
#O Timeout.resolver.retry.normal=4
#O Timeout.lhlo=2m
#O Timeout.auth=10m
#O Timeout.starttls=1h

# time for DeliverBy; extension disabled if less than 0
#O DeliverByMin=0

# should we not prune routes in route-addr syntax addresses?
#O DontPruneRoutes=False

# queue up everything before forking?
O SuperSafe=True

# status file
O StatusFile=/etc/mail/statistics

# time zone handling:
# if undefined, use system default
# if defined but null, use TZ envariable passed in
# if defined and non-null, use that info
#O TimeZoneSpec=

# default UID (can be username or userid:groupid)
O DefaultUser=mail:mail

# list of locations of user database file (null means no lookup)
#O UserDatabaseSpec=/etc/mail/userdb

# fallback MX host
#O FallbackMXhost=fall.back.host.net

# if we are the best MX host for a site, try it directly instead of config err
O TryNullMXList=true

# load average at which we just queue messages
#O QueueLA=100

# load average at which we refuse connections
#O RefuseLA=100

# load average at which we delay connections; 0 means no limit
#O DelayLA=0

# maximum number of children we allow at one time
#O MaxDaemonChildren=0

# maximum number of new connections per second
#O ConnectionRateThrottle=0

# work recipient factor
#O RecipientFactor=30000

# deliver each queued job in a separate process?
#O ForkEachJob=False

# work class factor
#O ClassFactor=1800

# work time factor
#O RetryFactor=90000

# default character set
#O DefaultCharSet=iso-8859-1

# service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
#O ServiceSwitchFile=/etc/mail/service.switch

# hosts file (normally /etc/hosts)
#O HostsFile=/etc/hosts

# dialup line delay on connection failure
#O DialDelay=10s

# action to take if there are no recipients in the message
#O NoRecipientAction=add-to-undisclosed

# chrooted environment for writing to files
#O SafeFileEnvironment=/arch

# are colons OK in addresses?
#O ColonOkInAddr=True

# shall I avoid expanding CNAMEs (violates protocols)?
#O DontExpandCnames=False

# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=$j Sendmail $v/$Z; $b

# UNIX initial From header format (old $l macro)
O UnixFromLine=From $g $d

# From: lines that have embedded newlines are unwrapped onto one line
#O SingleLineFromHeader=False

# Allow HELO SMTP command that does not include a host name
#O AllowBogusHELO=False

# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
#O MustQuoteChars=.

# delimiter (operator) characters (old $o macro)
O OperatorChars=.:%@!^/[]+

# shall I avoid calling initgroups(3) because of high NIS costs?
#O DontInitGroups=False

# are group-writable :include: and .forward files (un)trustworthy?
# True (the default) means they are not trustworthy.
#O UnsafeGroupWrites=True


# where do errors that occur when sending errors get sent?
#O DoubleBounceAddress=postmaster

# where to save bounces if all else fails
#O DeadLetterDrop=/var/tmp/dead.letter

# what user id do we assume for the majority of the processing?
#O RunAsUser=sendmail

# maximum number of recipients per SMTP envelope
#O MaxRecipientsPerMessage=100

# limit the rate recipients per SMTP envelope are accepted
# once the threshold number of recipients have been rejected
#O BadRcptThrottle=20

# shall we get local names from our installed interfaces?
O DontProbeInterfaces=true

# Return-Receipt-To: header implies DSN request
#O RrtImpliesDsn=False

# override connection address (for testing)
#O ConnectOnlyTo=0.0.0.0

# Trusted user for file ownership and starting the daemon
#O TrustedUser=root

# Control socket for daemon management
#O ControlSocketName=/var/spool/mqueue/.control

# Maximum MIME header length to protect MUAs
#O MaxMimeHeaderLength=2048/1024

# Maximum length of the sum of all headers
#O MaxHeadersLength=32768

# Maximum depth of alias recursion
#O MaxAliasRecursion=10

# location of pid file
#O PidFile=/var/run/sendmail.pid

# Prefix string for the process title shown on 'ps' listings
#O ProcessTitlePrefix=prefix

# Data file (df) memory-buffer file maximum size
#O DataFileBufferSize=4096

# Transcript file (xf) memory-buffer file maximum size
#O XscriptFileBufferSize=4096

# lookup type to find information about local mailboxes
#O MailboxDatabase=pw

# list of authentication mechanisms
O AuthMechanisms=LOGIN PLAIN

# default authentication information for outgoing connections
#O DefaultAuthInfo=/etc/mail/default-auth-info

# SMTP AUTH flags
O AuthOptions=A p y

# SMTP AUTH maximum encryption strength
#O AuthMaxBits

# SMTP STARTTLS server options
#O TLSSrvOptions

# Input mail filters
#O InputMailFilters


# CA directory
O CACertPath=/etc/ssl/sendmail
# CA file
O CACertFile=/etc/ssl/sendmail/CAcert.pem
# Server Cert
O ServerCertFile=/etc/ssl/sendmail/MYcert.pem
# Server private key
O ServerKeyFile=/etc/ssl/sendmail/MYkey.pem
# Client Cert
O ClientCertFile=/etc/ssl/sendmail/MYcert.pem
# Client private key
O ClientKeyFile=/etc/ssl/sendmail/MYkey.pem
# DHParameters (only required if DSA/DH is used)
#O DHParameters
# Random data source (required for systems without /dev/urandom under OpenSSL)
#O RandFile

############################
# QUEUE GROUP DEFINITIONS #
############################


###########################
# Message precedences #
###########################

Pfirst-class=0
Pspecial-delivery=100
Plist=-30
Pbulk=-60
Pjunk=-100

#####################
# Trusted users #
#####################

# this is equivalent to setting class "t"
#Ft/etc/mail/trusted-users
Troot
Tdaemon
Tuucp
 
Old 02-25-2005, 08:23 PM   #11
singying304
Member
 
Registered: Feb 2005
Posts: 106

Original Poster
Rep: Reputation: 15
i found a new problem ...

because from my error message ,i saw realy = "my real ip"

so i must add "my real ip" to /etc/mail/acces =relay .......

if not ,i cant send any mail out~~

how to i make relay = 127.0.0.1 ,because my ip always change
 
Old 03-02-2005, 09:04 PM   #12
odious1
Member
 
Registered: Jun 2003
Location: Virginia, USA
Distribution: Slackware
Posts: 252

Rep: Reputation: 30
the localhost directive on your access file will take care of the sendmail server. if your local clients are going to be able to relay on this server they will have to be added to /etc/mail/access as well. are your making the access.db by makemap hash < access access.db

you are also using authentication that is possibly not necessary since port 25 (i assume) is not available to the internet. i would keep is simple until you get it working and then add ssl if needed. how is mail going to be accessed by clients (imap, pop)?

definately add your local net to access, makemap and restart

Tom
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail Problem hansi umayangan Linux - Networking 3 01-17-2005 05:53 AM
Sendmail Problem eggoz Linux - General 2 04-01-2004 01:23 PM
problem processing sendmail.mc to sendmail.cf ...help... lucastic Linux - Networking 1 09-21-2003 10:08 AM
Sendmail problem: sm-client permissions problem d3funct Linux - Software 0 08-12-2003 05:00 PM
little problem with sendmail ... AGAIN MiB_24 Linux - General 6 01-03-2002 07:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration