postfix issue after changing server ips

Status
Not open for further replies.

punchbowl

New Pleskian
Hi,

I recently had to swap server ips. I managed it ok and ran reconfigurator but I've noticed since then that hosted domains are using the old ips. I replaced the ips in main.cf (attached below) thinking that was the issue but it still doesn't work.

Here's a portion of the maillog:

Code:
May  9 16:42:26 host courier-imapd: Connection, ip=[::ffff:127.0.0.1]
May  9 16:42:26 host courier-imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=12, sent=365
May  9 16:42:26 host courier-imaps: Connection, ip=[::ffff:127.0.0.1]
May  9 16:42:26 host courier-imaps: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=12, sent=356
May  9 16:42:26 host courier-pop3d: Connection, ip=[::ffff:127.0.0.1]
May  9 16:42:26 host courier-pop3d: LOGOUT, ip=[::ffff:127.0.0.1]
May  9 16:42:26 host courier-pop3d: Disconnected, ip=[::ffff:127.0.0.1]
May  9 16:42:26 host courier-pop3s: Connection, ip=[::ffff:127.0.0.1]
May  9 16:42:26 host courier-pop3s: LOGOUT, ip=[::ffff:127.0.0.1]
May  9 16:42:26 host courier-pop3s: Disconnected, ip=[::ffff:127.0.0.1]
May  9 16:44:23 host postfix/qmgr[17306]: A78C597D135B: from=<sales@xxxxxxxx.com>, size=1447, nrcpt=1 (queue active)
May  9 16:44:23 host postfix/qmgr[17306]: warning: connect to transport private/217.18.71.176-: Connection refused
May  9 16:44:23 host postfix/error[20485]: A78C597D135B: to=<xxxxxx@gmail.com>, relay=none, delay=193660, delays=193659/0.01/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)

View attachment main.cf.txt

This problem is: May 9 16:44:23 host postfix/qmgr[17306]: warning: connect to transport private/217.18.71.176-: Connection refused

217.18.71.176 is the old ip that I no longer use.

Any ideas where postfix is getting the wrong ip from?


Version Parallels Plesk Panel v11.5.30_build115130819.13 os_CentOS 5
OS CentOS 5.10 (Final)

Thanks in advance.
 
Last edited:
Make sure that you have proper binding of the IP address in the file /etc/postfix/master.cf
 
Hi Igor,

Thanks for the response. In the master.cf I only editted one line where I replaced the old server ip with the new one.

Code:
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_enforce_tls=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628      inet  n       -       n       -       -       qmqpd
pickup fifo n - n 60 1 pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr fifo n - n 1 1 qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
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
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
	-o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     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
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix  -       n       n       -       -       pipe
  flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

plesk_virtual unix - n n - - pipe flags=DORhu user=popuser:popuser argv=/usr/lib64/plesk-9.0/postfix-local -f ${sender} -d ${recipient} -p /var/qmail/mailnames
mailman unix - n n - - pipe flags=R user=mailman:mailman argv=/usr/lib64/plesk-9.0/postfix-mailman ${nexthop} ${user} ${recipient}
plesk_saslauthd unix y y n - 1 plesk_saslauthd status=5 listen=6 dbpath=/var/spool/postfix/plesk/passwd.db




retry     unix  -       -       n       -       -       error
proxywrite unix -       -       n       -       1       proxymap
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy




5.104.226.18- unix - n n - - smtp -o smtp_bind_address=5.104.226.18 -o smtp_bind_address6= -o smtp_address_preference=ipv4

smtp inet n - n - - smtpd 
smtps inet n - n - - smtpd  -o smtpd_tls_wrappermode=yes

submission inet n - n - - smtpd -o smtpd_enforce_tls=yes -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_sender_restrictions=

It's the line 4th from the bottom. I didn't touch anything else as I'm not familiar with postfix settings and that was the only obviously wrong thing.

Anything else I can check? Cheers

Also the issue is only affecting shared ips. I have sites with dedicated ips and they don't have the issue at all.
 
Last edited:
Try to use command:

# postmap -s /var/spool/postfix/plesk/sdd_transport_maps
 
yep - all old ips!

# postmap -s /var/spool/postfix/plesk/sdd_transport_maps
@xxxxxxfy.com 217.18.71.85-:
@xxxxxxno.com 217.18.71.176-:
@xxxxxxal.com 217.18.71.176-:
@xxxxxxits.com 217.18.71.176-:
@xxxxxxsk.com 217.18.71.176-:
@xxxxxxds.com 217.18.71.176-:
@xxxxxxum.com 217.18.71.175-:
@xxxxxxtc.com 217.18.71.176-:
@xxxxxxe.com 217.18.71.176-:
@xxxxxxby.com 217.18.71.176-:
@xxxxxxto.com 217.18.71.176-:
@xxxxxxs.com 217.18.71.176-:
@xxxxxxew.com 217.18.71.176-:
@xxxx.org 217.18.71.176-:
@_.xxxx.com 217.18.71.176-:
@xxxx.com 217.18.71.176-:

Is the a way to rebuild that db or how should I edit it?

Cheers
 
(just testing. i think my reply was sent into the moderation queue. just in case..i'm reposting this:)
Code:
postmap -s /var/spool/postfix/plesk/sdd_transport_maps
@xxxxxy.com     217.18.71.85-:
@xxxxxo.com      217.18.71.176-:
@xxxxxal.com  217.18.71.176-:
@xxxxxs.com   217.18.71.176-:
@xxxxxk.com   217.18.71.176-:
@xxxxxs.com    217.18.71.176-:
@xxxxxum.com   217.18.71.175-:
@xxxxxtc.com      217.18.71.176-:
@xxxxxe.com 217.18.71.176-:
@xxxxxby.com  217.18.71.176-:
@xxxxxto.com   217.18.71.176-:
@xxxxxers.com 217.18.71.176-:
@xxxxxw.com   217.18.71.176-:
@xxxxxt.org 217.18.71.176-:
@xxxxxsk.com 217.18.71.176-:
@xxxxxgo.com     217.18.71.176-:
 
Last edited:
Try to rebuild it with

# /usr/lib(64)/plesk-9.0/mail_restore
 
You are the man Igor!

# /usr/lib64/plesk-9.0/mail_restore
==> Checking for: mailsrv_conf_init... ok
==> Checking for: mail_handlers_init... ok
==> Checking for: mailsrv_entities_dump... ok
==> Checking for: mail_admin_aliases... ok
==> Checking for: mail_auth_dump... ok
==> Checking for: mailman_lists_dump... ok
==> Checking for: mail_kav8_restore... ok
==> Checking for: mail_responder_restore... ok
==> Checking for: vhostidmng... ok
==> Checking for: mail_postfix_transport_restore... ok
==> Checking for: mail_spam_restore... not exists
==> Checking for: mail_grey_restore... ok
==> Checking for: mail_mailbox_restore... ok
==> Checking for: mail_spf_restore... ok
==> Checking for: mail_dk_restore... ok
==> Checking for: mail_drweb_restore... ok

tested and everything is working!

Thanks a million. You are a life saver!
 
Status
Not open for further replies.
Back
Top