From owner-freebsd-questions@FreeBSD.ORG Wed Jul 20 11:25:02 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A7CD106564A for ; Wed, 20 Jul 2011 11:25:02 +0000 (UTC) (envelope-from ssgriffonuser@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id DF75F8FC1A for ; Wed, 20 Jul 2011 11:25:01 +0000 (UTC) Received: by pvg11 with SMTP id 11so138178pvg.13 for ; Wed, 20 Jul 2011 04:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=BajyrChZKqIZTZaDfR6+MqvrrNOT1hXf/eZEQ8AOkW4=; b=RFfs5tiN6jyHUlwRdO7vHQJC+PyvRqJA/cUUtTKKVdDP3ifukFT63ckEkubj6/7MSH A6Kx7v2t87MhKNtzFt7CUpsQkmZnAKr65Up/zh2anNs/OpRV32DV7LnRlvHIl56+NXyW X23OZzZFK4Odc1n3grgTS5xWFRaMhLldX+1bc= Received: by 10.68.12.3 with SMTP id u3mr10295664pbb.403.1311161100958; Wed, 20 Jul 2011 04:25:00 -0700 (PDT) Received: from [192.168.1.5] (ip24-251-146-122.ph.ph.cox.net [24.251.146.122]) by mx.google.com with ESMTPS id l7sm90240pbh.26.2011.07.20.04.24.59 (version=SSLv3 cipher=OTHER); Wed, 20 Jul 2011 04:25:00 -0700 (PDT) Message-ID: <4E26589B.9070406@gmail.com> Date: Tue, 19 Jul 2011 21:24:59 -0700 From: ssgriffonuser User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.17) Gecko/20110610 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <201107191631.p6JGVu6V034273@mail.r-bonomi.com> In-Reply-To: <201107191631.p6JGVu6V034273@mail.r-bonomi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Sendmail not accepting connections on port 25 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2011 11:25:02 -0000 On 07/19/11 09:31, Robert Bonomi wrote: >> Date: Tue, 19 Jul 2011 00:03:58 -0700 >> From: ssgriffonuser >> Subject: Sendmail not accepting connections on port 25 >> >> Hi all, >> >> I'm having difficulty getting sendmail set up on my server. I can send >> and receive to localhost and I can send to external networks but I can >> not receive from external networks (I receive a 550: Address rejected). > What does the sendmail LOG FILE show? > >> Netstat says sendmail is listening on port 25 but I cannot telnet to it. > Netstat just says "something" has port 25 open on 'any' address -- this may, > or may *not* be the sendmail instance you think is running. It probably > *IS*, but you need to be sure. > >> When I do a port scan of the server, nmap does not show anything on port >> 25 but does show smtp on 587. > May I recommend 'lsof'? > > The command-line "lsof -n -P |grep IPv" will show exactly what processes > have have what ports, on what addresses, open. > >> As far as configuration goes, I added my hostname to >> /etc/mail/local-host-names and created a /etc/host/virtusertable that >> looks like: >> >> admin@host.com shane >> shane@host.com shane >> >> then I ran 'make all install restart' . > *Unless* you modified the .mc file, I believe 'virtusertable' should be in > /etc/mail, not /etc/host. > > what does 'grep Kvirtuser /etc/mail/sendmail.cf' show? > > Lastly, you need to run 'makemap hash virtusertable' in the directory where > the virtusertable file lives. > > First of all, thanks everybody for the help and suggestions. Let me just clarify that the problem is: I cannot submit mail to my sendmail server (i.e sending mail from gmail to my server). Answers to the questions that were presented are below. *sendmail_enable and sendmail_submit_enable are set to YES in my rc.conf. *ISP is not blocking port 25. *The sendmail log file doesn't show anything useful which makes me believe that the connections are not getting to sendmail. *lsof shows that sendmail is listening on port 25. *The virtusertable file is in /etc/mail and not /etc/host. That was a typo. *'grep Kvirtuser /etc/mail/sendmail.cf': Kvirtuser hash -o /etc/mail/virtusertable *The correct files (i.e access.db, virtusertable.db, aliases.db and sendmail.cf) are being generated before sendmail is started. *I noticed the following line in /etc/defaults/rc.conf: sendmail_submit_flags="-L sm-mta -bd -q30m -ODaemonPortOptions=Addr=localhost" # Flags for localhost-only MTA That line seems to describe the problem I am having, however when I move that line to /etc/rc.conf and change the address from localhost to gatanova.com I still can't telnet in from an external network. Some relevant files are shown below: /etc/rc.conf: hostname="gatanova.com" ifconfig_re0="DHCP" apache22_enable="YES" apache22_http_accept_enable="YES" mysql_enable="YES" sendmail_enable="YES" sendmail_submit_enable="YES" sendmail_submit_flags="-L sm-mta -bd -q30m -ODaemonPortOptions=Addr=gatanova.com" /etc/hosts: ::1 localhost localhost.gatanova.com 127.0.0.1 localhost localhost.gatanova.com 10.12.32.90 rootbsdinternal /etc/mail/local-host-names: gatanova.com gatanova /etc/mail/virtusertable: admin@gatanova.com shane shane@gatanova.com shane @gatanova.com shane /etc/mail/access: #Empty, everything is commented out Sorry for the long winded email, I wanted to make sure that enough information was available.