smtp 25/tcp # Simple Mail Transfer Protocol This (Post office web site)
Friday, November 23rd, 2007smtp 25/tcp # Simple Mail Transfer Protocol This defines the TCP port number that is used for SMTP conversations. Port number 25 is the standard defined by the “Assigned Numbers” RFC (RFC-1700). When run in daemon mode, Exim puts itself in the background and waits for connections on the SMTP port. When a connection occurs, it forks, and the child process conducts an SMTP conversation with the peer process on the calling host. The Exim daemon is usually started by invoking it from the rc script at boot time using the following command: /usr/sbin/exim -bd -q15m The -bd flag turns on daemon mode, and -q15m makes it process whatever messages have accumulated in the message queue every 15 minutes. If you want to use inetd instead, your /etc/inetd.conf file should contain a line like this: smtp stream tcp nowait root /usr/sbin/exim in.exim -bs Remember you have to make inetd re-read inetd.conf by sending it an HUP signal after making any changes.116 Daemon and inetd modes are mutually exclusive. If you run Exim in daemon mode, you should make sure to comment out any line in inetd.conf for the smtp service. Equivalently, when having inetd manage Exim, make sure that no rc script starts the Exim daemon. You can check that Exim is correctly set up for receiving incoming SMTP messages by telnetting to the SMTP port on your machine. This is what a successful connect to the SMTP server looks like: $ telnet localhost smtp Trying 127.0.0.1… Connected to localhost. Escape character is ‘^]’. 220 richard.vbrew.com ESMTP Exim 3.13 #1 Sun, 30 Jan 2000 16:23:55 +0600 quit 221 richard.brew.com closing connection Connection closed by foreign host. If this test doesn’t produce the SMTP banner (the line starting with the 220 code), check that you are either running an Exim daemon process or have inetd correctly configured. If that doesn’t reveal the problem, look in the Exim log files (described next) in case there is an error in Exim’s configuration file. If Your Mail Doesn’t Get Through A number of features are available for troubleshooting installation problems. The first place to check is Exim’s log files. On Linux systems they are normally kept in /var/log/exim/log and are named exim_mainlog, exim_rejectlog, and exim_paniclog. On other operating systems, they are often kept in /var/spool/exim/log. You can find out where the log files are by running the command: exim -bP log_file_path The main log lists all transactions, the reject log contains details of messages that were rejected for policy reasons, and the panic log is for messages related to configuration errors and the like. Typical entries in the main log are shown below. Each entry in the log itself is a single line of text, starting with a date and time. They have been split into several lines here in order to fit them on the page: 2000-01-30 15:46:37 12EwYe-0004WO-00 <= jack@vstout.vbrew.com H=vstout.vbrew.com [192.168.131.111] U=exim P=esmtp S=32100 id=38690D72.286F@vstout.vbrew.com 2000-01-30 15:46:37 12EwYe-0004WO-00 => jill