Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Postfix appears to hang on telnet 25

2 views
Skip to first unread message

mathieu

unread,
Sep 27, 2005, 12:07:27 PM9/27/05
to
Hello,

This must a be a very simple configuration issue, but I was not able
to find it via the usual google seach on this very group.

I have setup postfix to do mail relay from my local server to
another mail server. It seems to be working (mail -s 'bla'
mye...@gmail.com works). But if I try via python the connection just
hangs:

python
>>> import smtplib
>>> server = smtplib.SMTP('localhost')

Or simply doing
$ telnet localhost 25
lead to
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Any idea on what I am doing wrong ?
thanks a bunch,
Mathieu

Info:
System is:
Linux farsight-gentoo 2.6.9-gentoo-r14 #6 SMP Sun Jan 30 20:24:14 EST
2005 x86_64 AMD Opteron(tm) Processor 848 AuthenticAMD GNU/Linux

$ sudo lsof | grep smtp

master 6068 root 12u IPv6 10338
TCP *:smtp (LISTEN)
master 6068 root 13u IPv4 10339
TCP *:smtp (LISTEN)
master 6068 root 46u unix 0x00000103f36dc0c0
10380 private/smtp
master 6068 root 85u unix 0x00000103f3c1f380
10432 private/bsmtp
python 6128 mathieu 3u IPv4 10714
TCP localhost:32777->localhost:smtp (ESTABLISHED)

$ sudo postconf -n

alias_database = hash:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases
append_dot_mydomain = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 2
home_mailbox = .maildir/
html_directory = no
local_destination_concurrency_limit = 2
mail_owner = postfix
mailbox_command = procmail -a "$EXTENSION"
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
myhostname = localhost.localdomain
mynetworks = 127.0.0.0/8
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.5-r2/readme
recipient_delimiter = +
relayhost = mail.rpi.edu
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name
unknown_local_recipient_reject_code = 550

And from syslog I get:
Sep 27 12:03:14 localhost postfix/local[6213]: fatal: open database
/etc/mail/aliases.db: No such file or directory
Sep 27 12:03:15 localhost postfix/master[6068]: warning: process
/usr/lib/postfix/local pid 6213 exit status 1
Sep 27 12:03:15 localhost postfix/master[6068]: warning:
/usr/lib/postfix/local: bad command startup -- throttling

mathieu

unread,
Sep 27, 2005, 3:03:05 PM9/27/05
to
Ok and the answer is:

Sep 27 12:03:14 localhost postfix/local[6213]: fatal: open database
/etc/mail/aliases.db: No such file or directory

I need to run at least once the command newalias. For some reason I
missed that from the gentoo install:

/usr/portage/mail-mta/postfix/postfix-2.1.5-r2.ebuild
if [ ! -e /etc/mail/aliases.db ] ; then
echo
ewarn "You must edit /etc/mail/aliases to suit your needs"
ewarn "and then run /usr/bin/newaliases. Postfix will not"
ewarn "work correctly without it."
fi


sorry for the noise.

0 new messages