Moving mydomain.com but not mx record issue

Mailsetup problem with postfix (I guess)
Virtualmin setup on ubuntu. I have DNS provided from external machine pointing at external IP. Setup like this:
DNS mydomain.com and www.mydomain.com and mail.mydomain.com (MX record) all pointing at external IP. Everything working fine. Now mydomain.com and www.mydomain.com are put in Another machine with Another IP. DNS is now pointing at new IP but I would like to keep mail at old IP and server so I don´t change DNS for mail.mydomain.com.
Now I can´t send mail.
Any ideas? All help is welcome

We need more details.

Please tell us the actual domain names in question so we can do tests. What IP address do the old and new server have?

Also explain “can’t send mail”. What exactly happens, from where do you send mail to where using addresses, what errors do you get in the client, what gets logged in /var/log/mail.log on the server?

Old ip 178.174.201.2
New to where web content is moved 193.8.37.10
mail.scandoor.com is MX record and dns still Points to old IP
From logfile
/trivial-rewrite[3543]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:48:30 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3543 exit status 1
Apr 4 12:48:30 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:48:36 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:49:30 aserver1 postfix/trivial-rewrite[3546]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:49:31 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3546 exit status 1
Apr 4 12:49:31 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:49:37 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:50:31 aserver1 postfix/trivial-rewrite[3626]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:50:32 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3626 exit status 1
Apr 4 12:50:32 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:50:34 aserver1 postfix/smtpd[3629]: connect from www.cloud.virtualmin.com[108.60.199.107]
Apr 4 12:51:01 aserver1 postfix/smtpd[3630]: connect from unknown[178.124.104.208]
Apr 4 12:51:06 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:51:13 aserver1 postfix/smtpd[3631]: connect from unknown[46.98.129.19]
Apr 4 12:51:24 aserver1 postfix/anvil[991]: statistics: max connection rate 1/60s for (smtp:117.241.120.230) at Apr 4 12:43:23
Apr 4 12:51:24 aserver1 postfix/anvil[991]: statistics: max connection count 3 for (smtp:108.60.199.107) at Apr 4 12:50:34
Apr 4 12:51:24 aserver1 postfix/anvil[991]: statistics: max cache size 14 at Apr 4 12:51:13
Apr 4 12:51:32 aserver1 postfix/trivial-rewrite[3635]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:51:33 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3635 exit status 1
Apr 4 12:51:33 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:51:33 aserver1 postfix/pickup[314]: warning: maildrop/1D03A1621831: error writing C47A91621884: queue file write error
Apr 4 12:51:33 aserver1 postfix/cleanup[316]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:51:34 aserver1 postfix/pickup[314]: DE23D162189C: uid=33 from=
Apr 4 12:52:07 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:52:33 aserver1 postfix/trivial-rewrite[3751]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:52:34 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3751 exit status 1
Apr 4 12:52:34 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:53:08 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:53:18 aserver1 postfix/smtpd[3752]: warning: hostname static.86.57.163.221.grodno.by does not resolve to address 86.57.163.221: Name or service not known
Apr 4 12:53:18 aserver1 postfix/smtpd[3752]: connect from unknown[86.57.163.221]
Apr 4 12:53:18 aserver1 postfix/smtpd[3630]: lost connection after CONNECT from unknown[178.124.104.208]
Apr 4 12:53:18 aserver1 postfix/smtpd[3630]: disconnect from unknown[178.124.104.208]
Apr 4 12:53:35 aserver1 postfix/trivial-rewrite[3755]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:53:36 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3755 exit status 1
Apr 4 12:53:36 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:54:09 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:54:36 aserver1 postfix/trivial-rewrite[3760]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:54:37 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3760 exit status 1
Apr 4 12:54:37 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:55:10 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:55:37 aserver1 postfix/trivial-rewrite[3823]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:55:38 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3823 exit status 1
Apr 4 12:55:38 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:55:40 aserver1 postfix/smtpd[3824]: warning: hostname 134-249-244-119-gprs.kyivstar.net does not resolve to address 134.249.244.119: Name or service not known
Apr 4 12:55:40 aserver1 postfix/smtpd[3824]: connect from unknown[134.249.244.119]
Apr 4 12:56:38 aserver1 postfix/trivial-rewrite[3827]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:56:39 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:56:39 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3827 exit status 1
Apr 4 12:56:39 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:57:14 aserver1 postfix/smtpd[3914]: connect from 189-112-188-205.static.ctbctelecom.com.br[189.112.188.205]
Apr 4 12:57:39 aserver1 postfix/trivial-rewrite[3944]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:57:40 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:57:40 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3944 exit status 1
Apr 4 12:57:40 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:58:40 aserver1 postfix/trivial-rewrite[3947]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:58:41 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:58:41 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3947 exit status 1
Apr 4 12:58:41 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 12:59:41 aserver1 postfix/trivial-rewrite[3950]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 12:59:42 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 12:59:42 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 3950 exit status 1
Apr 4 12:59:42 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 13:00:42 aserver1 postfix/trivial-rewrite[4030]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 13:00:43 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 4030 exit status 1
Apr 4 13:00:43 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 13:00:43 aserver1 postfix/qmgr[3357]: warning: problem talking to service rewrite: Connection timed out
Apr 4 13:01:12 aserver1 postfix/qmgr[3357]: fatal: watchdog timeout
Apr 4 13:01:13 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/qmgr pid 3357 exit status 1
Apr 4 13:01:13 aserver1 postfix/master[313]: warning: /usr/lib/postfix/qmgr: bad command startup – throttling
Apr 4 13:01:23 aserver1 postfix/smtpd[4031]: warning: hostname epmta.epostservice.se does not resolve to address 213.115.0.238: Name or service not known
Apr 4 13:01:23 aserver1 postfix/smtpd[4031]: connect from unknown[213.115.0.238]
Apr 4 13:01:24 aserver1 postfix/smtpd[988]: warning: problem talking to service rewrite: Connection timed out
Apr 4 13:01:24 aserver1 postfix/anvil[991]: statistics: max connection rate 1/60s for (smtp:86.57.163.221) at Apr 4 12:53:18
Apr 4 13:01:24 aserver1 postfix/anvil[991]: statistics: max connection count 4 for (smtp:213.115.0.238) at Apr 4 13:01:23
Apr 4 13:01:24 aserver1 postfix/anvil[991]: statistics: max cache size 16 at Apr 4 12:57:14
Apr 4 13:01:43 aserver1 postfix/trivial-rewrite[4034]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 13:01:44 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 4034 exit status 1
Apr 4 13:01:44 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 13:01:46 aserver1 postfix/smtpd[4035]: connect from e3uspmta191.emarsys.net[91.194.248.191]
Apr 4 13:02:13 aserver1 postfix/qmgr[4141]: 2E887162186F: from=www-data@dk, size=8162, nrcpt=1 (queue active)
Apr 4 13:02:44 aserver1 postfix/trivial-rewrite[4171]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 13:02:45 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 4171 exit status 1
Apr 4 13:02:45 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 13:03:13 aserver1 postfix/qmgr[4141]: warning: problem talking to service rewrite: Connection timed out
Apr 4 13:03:45 aserver1 postfix/trivial-rewrite[4174]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”
Apr 4 13:03:46 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 4174 exit status 1
Apr 4 13:03:46 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling
Apr 4 13:04:14 aserver1 postfix/qmgr[4141]: warning: problem talking to service rewrite: Connection timed out

Please enclose shell listings in [code][/code] tags, as to preserve line breaks and monospace font. Otherwise they become nearly unreadable.

Also please answer all of my questions: What exactly happens when you try to send mail, from where do you send mail to where using which addresses, what errors do you get in the client

Can not conect to server.

Server: ‘scandoor.com
Windows Live Mail Fel-ID: 0x800CCC0E
Protokoll: POP3
Port: 110
Secure (SSL): Nej
Socket-fel: 10060

I repeat:

Please enclose shell listings in [code][/code] tags, as to preserve line breaks and monospace font. Otherwise they become nearly unreadable.

Apr 4 13:24:07 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 5274 exit status 1

Apr 4 13:24:07 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

Apr 4 13:25:07 aserver1 postfix/trivial-rewrite[5346]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”

Apr 4 13:25:08 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 5346 exit status 1

Apr 4 13:25:08 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

Apr 4 13:25:34 aserver1 postfix/smtpd[2562]: warning: problem talking to service rewrite: Connection timed out

Apr 4 13:25:57 aserver1 postfix/postfix-script[5444]: warning: /var/spool/postfix/etc/hosts and /etc/hosts differ

Apr 4 13:26:08 aserver1 postfix/trivial-rewrite[5469]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”

Apr 4 13:26:09 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 5469 exit status 1

Apr 4 13:26:09 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

Apr 4 13:26:13 aserver1 postfix/postfix-script[5564]: warning: /var/spool/postfix/etc/hosts and /etc/hosts differ

Apr 4 13:27:09 aserver1 postfix/trivial-rewrite[5693]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”

Apr 4 13:27:10 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 5693 exit status 1

Apr 4 13:27:10 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

Apr 4 13:28:10 aserver1 postfix/trivial-rewrite[5764]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”

Apr 4 13:28:11 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 5764 exit status 1

Apr 4 13:28:11 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

Apr 4 13:29:11 aserver1 postfix/trivial-rewrite[5796]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”

Apr 4 13:29:12 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 5796 exit status 1

Apr 4 13:29:12 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

You might have to reconfigure your email client to connect to “mail.scandoor.com” (which still points to the old IP), since you moved the hostname “scandoor.com” to the new IP.

Thank you for helping. Can you Point me in the right direction.

how to to reconfigure my email client to connect to "mail.scandoor.com

Sure, but in the right direction for what exactly? What exactly do you need to know?

Uhm, sorry, I have no experience with Windows Live Mail, never used it.

But it should not be that hard I suppose? If you’re operating a mail server of your own, I should think that you should be able to find the right menu option in your email client to change the hostname for incoming and outgoing email. :wink:

All setup right now in client. I can recieve mail but not send.

Apr 4 14:15:59 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

Apr 4 14:16:24 aserver1 postfix/smtpd[8908]: connect from mailout-vancouver.gigahost.dk[71.19.244.164]

Apr 4 14:16:59 aserver1 postfix/trivial-rewrite[8916]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”

Apr 4 14:17:00 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 8916 exit status 1

Apr 4 14:17:00 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

Apr 4 14:18:00 aserver1 postfix/trivial-rewrite[9035]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”

Apr 4 14:18:01 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 9035 exit status 1

Apr 4 14:18:01 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

Apr 4 14:19:01 aserver1 postfix/trivial-rewrite[9084]: fatal: open dictionary: expecting “type:name” form instead of “/etc/postfix/dependent”

Apr 4 14:19:02 aserver1 postfix/master[313]: warning: process /usr/lib/postfix/trivial-rewrite pid 9084 exit status 1

Apr 4 14:19:02 aserver1 postfix/master[313]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup – throttling

You appear to be getting some errors in your email logs, that suggests that there may be a configuration problem in your Postfix config.

Could you paste in the output of the command postconf -n? That will show all the non-default options in your Postfix config.

Also, what Ubuntu version are you using?

And lastly, what what is the output of this command:

dpkg -l 'postfix'

-Eric

root@aserver1:~# postconf -n?
postconf: invalid option – ‘?’
postconf: fatal: usage: postconf [-a (server SASL types)] [-A (client SASL types )] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [ -m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name…]
root@aserver1:~#

root@aserver1:~# dpkg -1 ‘postfix’
dpkg: error: unknown option -1

This is Ubuntu 12.04.4 LTS

It’s postconf -n without the question mark.

root@aserver1:~# postconf -n

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

allow_percent_hack = no

append_dot_mydomain = no

biff = no

broken_sasl_auth_clients = yes

config_directory = /etc/postfix

home_mailbox = Maildir/

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

mailbox_size_limit = 0

mydestination = aserver1, localhost.dk, localhost, aserver1.dk, scandoor.com, localdomain

myhostname = aserver1.dk

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

myorigin = $mydomain

readme_directory = no

recipient_delimiter = +

sender_bcc_maps = hash:/etc/postfix/bcc

smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)

smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

smtpd_sasl_auth_enable = yes

smtpd_sasl_security_options = noanonymous

smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem

smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key

smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache

smtpd_use_tls = yes

virtual_alias_maps = hash:/etc/postfix/virtual

Also, that “dpkg” command is with a lower-case L, not a “1” :slight_smile:

The command should look like this:

dpkg -l 'postfix'

root@aserver1:~# dpkg -l ‘postfix’

Desired=Unknown/Install/Remove/Purge/Hold

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)

||/ Name Version Description

++±==============-==============-============================================

ii postfix 2.9.6-1~12.04. High-performance mail transport agent