Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jul 2011 21:24:59 -0700
From:      ssgriffonuser <ssgriffonuser@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Sendmail not accepting connections on port 25
Message-ID:  <4E26589B.9070406@gmail.com>
In-Reply-To: <201107191631.p6JGVu6V034273@mail.r-bonomi.com>
References:  <201107191631.p6JGVu6V034273@mail.r-bonomi.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On 07/19/11 09:31, Robert Bonomi wrote:
>> Date: Tue, 19 Jul 2011 00:03:58 -0700
>> From: ssgriffonuser<ssgriffonuser@gmail.com>
>> 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.



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?4E26589B.9070406>