Link to home
Start Free TrialLog in
Avatar of R7AF
R7AFFlag for Netherlands

asked on

Testing Postfix

I've installed postfix on my local development machine (Ubuntu 10.4). I would like to do a test. I've found the following script, but have problems executing it.

telnet 127.0.0.1 25
EHLO 127.0.0.1
MAIL FROM: <from-email>
RCPT TO: <recipient-email>
DATA
Type message here.
. <Enter>

http://www.linuxquestions.org/questions/linux-software-2/how-do-you-test-postfix-for-sending-mail-out-106027/

I enter the commands line by line and get the following results:

r7af@r7af-ubuntu:~$ telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 r7af-ubuntu ESMTP Sendmail 8.14.3/8.14.3/Debian-9.1ubuntu1; Tue, 6 Jul 2010 17:32:00 +0200; (No UCE/UBE) logging access from: localhost.r7af-ubuntu(OK)-localhost.r7af-ubuntu [127.0.0.1]
EHLO 127.0.0.1
250-r7af-ubuntu Hello localhost.r7af-ubuntu [127.0.0.1], pleased to meet you
250 ENHANCEDSTATUSCODES
MAIL FROM: me@server.com
451 4.3.0 Temporary system failure. Please try again later.

The error log reports the following:

Jul  6 17:13:40 r7af-ubuntu postfix/master[11352]: fatal: bind 0.0.0.0 port 25: Address already in use
Jul  6 17:27:01 r7af-ubuntu sm-mta[11406]: NOQUEUE: SYSERR(root): hash map "access": missing map file /etc/mail/access.db: No such file or directory

What can I do to get this working?
ASKER CERTIFIED SOLUTION
Avatar of TobiasHolm
TobiasHolm
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
...and use 'sudo' too.

sudo chown root:smmsp /etc/mail/access.db
Avatar of R7AF

ASKER

Thanks.

One remark: the file was named "access", not "access.db".
sudo chown root:smmsp /etc/mail/access
Hi,

first are you sure it solve your problm ?

From what I see youre MTA is postfix not sendmail and it seem that you have more than one smtp server on the server.  This would explained the message "Address already in use"

If you want to test postfix only on 127.0.0.1 while some other smtp server is using the ip adresse of the server you will need to bind postfix to 127.0.0.1 only.

To do so

sudo vi /etc/postfix/main.cf

this
inet_interfaces = all

should be like this:
inet_interfaces = 127.0.0.1

and then restart postfix

sudo /etc/init.d/postfix restart

Hope this will help you out.

Bye
Avatar of R7AF

ASKER

I've checked if sendmail is installed, but it is not. I had it installed, but removed it before installing postfix.
So

Do you think the chown command solve your problem ?

If all is working just tell me so.

Bye.