Home > postfix, Slackware, VPS > CentOS 5 at VPS, postfix master.cf no valid IP address found: smtp

CentOS 5 at VPS, postfix master.cf no valid IP address found: smtp

In short,

some of the VPS providers do not let you have eth0 or loopback interfaces.
and when you configure the postfix to send only mode:

root@lb1:[Mon Oct 12 14:53:21]:[/var/adm]$ cat /etc/postfix/main.cf
# CentOS
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = lb1.cable-extenders.com
mydomain = lb1.cable-extenders.com
myorigin = $mydomain
inet_interfaces = loopback-only
unknown_local_recipient_reject_code = 550
relayhost =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES

after service postfix start you got something like this in the log:

root@lb1:[Mon Oct 12 14:55:30]:[/var/adm]$ cat maillog | sed ‘1,4!d’
Oct 11 12:03:42 svac101 postfix/postfix-script: starting the Postfix mail system
Oct 11 12:03:42 svac101 postfix/master[27022]: fatal: /etc/postfix/master.cf: line 18: no valid IP address found: smtp
Oct 11 12:09:26 svac101 postfix/postfix-script: starting the Postfix mail system
Oct 11 12:09:26 svac101 postfix/master[29049]: fatal: /etc/postfix/master.cf: line 2: no valid IP address found: smtp

after some search, i got this post here: http://www.linuxmail.info/postfix-multiple-ip-address-smtp-greeting/

so, the master.cf  looks like :
root@lb1:[Mon Oct 12 14:58:12]:[/var/adm]$ cat /etc/postfix/master.cf
# Slackware
#smtp      inet  n       –       n       –       –       smtpd
217.113.247.122:smtp inet n – n – – smtpd -o myhostname=lb1.cable-extenders.com
pickup    fifo  n       –       n       60      1       pickup
cleanup   unix  n       –       n       –       0       cleanup
qmgr      fifo  n       –       n       300     1       qmgr
tlsmgr    unix  –       –       n       1000?   1       tlsmgr
rewrite   unix  –       –       n       –       –       trivial-rewrite
bounce    unix  –       –       n       –       0       bounce
defer     unix  –       –       n       –       0       bounce
trace     unix  –       –       n       –       0       bounce
verify    unix  –       –       n       –       1       verify
flush     unix  n       –       n       1000?   0       flush
proxymap  unix  –       –       n       –       –       proxymap
proxywrite unix –       –       n       –       1       proxymap
smtp      unix  –       –       n       –       –       smtp
relay     unix  –       –       n       –       –       smtp
-o smtp_fallback_relay=
showq     unix  n       –       n       –       –       showq
error     unix  –       –       n       –       –       error
retry     unix  –       –       n       –       –       error
discard   unix  –       –       n       –       –       discard
local     unix  –       n       n       –       –       local
virtual   unix  –       n       n       –       –       virtual
lmtp      unix  –       –       n       –       –       lmtp
anvil     unix  –       –       n       –       1       anvil
scache    unix  –       –       n       –       1       scache
the Slackware header is because i did copy the master.cf from other VPS i have at San Jose and its Slackware .. 🙂
its much better that this CentOS box because I have full control, including eth0, loopback device and iptables  …
So you comment the line
smtp      inet  n       –       n       –       –       smtpd
and add this one : your_real_IP:smtp inet n – n – – smtpd -o myhostname=your_domain_name

Advertisements
Categories: postfix, Slackware, VPS
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: