Testing Postfix

R7AF
R7AF used Ask the Experts™
on
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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I think the reason is a wrong owner for the file 'access.db'. Also check owner for 'aliases.db'.

Correct is the user root. Try:

chown root:smmsp /etc/mail/access.db

If it doesn't work, check owner for the other files and directorys.

A complete decription you can find in "sendmail 8.13 Compandium" from Brian Costales, Chapter 10, Maintain security with sendmail. Or try this link: https://blue-labs.org/software/sm-pgsql/

Regards, Tobias
...and use 'sudo' too.

sudo chown root:smmsp /etc/mail/access.db
Top Expert 2007

Author

Commented:
Thanks.

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

Commented:
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
Top Expert 2007

Author

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

Commented:
So

Do you think the chown command solve your problem ?

If all is working just tell me so.

Bye.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial