Hi! I have a wierd problem. I have recently changed hostname/domain on my server and i am trying to send a mail to a newly created account and it seams like it whants to send mail to the old domain/host. old:mail.xx.net new:mail.yy.se Feb 5 20:31:10 caveguard postfix/smtp[30307]: A386E1A88347: to=<[email protected]>, orig_to=<lerra>, relay=xx.net[69.57.177.58], delay=1868, status=deferred (host xx.net[69.57.177.58] said: 451 Temporary local problem - please try later (in repl This is form my main.cf: myhostname = mail.yy.se mydestination = mail.yy.se, localhost.localdomain, localhost.localdomain, localhost It coud be some other process on the server thats trying to send mail to the old hostname. Any one? The mail is deliverd (not returned atleast) but when i try to check it in my imap/pop nothing is deliverd. Any tips to what configfiles to change in where mail shud be send to? Geting this in my logs too: Feb 5 20:31:08 caveguard postfix/qmgr[30056]: A386E1A88347: from=<[email protected]>, size=665, nrcpt=1 (queue active) I have done grep xx.net * in my etc dir but only got a hit at webalizer. And nothing in /etc/postfix
Please post the output of Code: hostname and Code: hostname -f What's in /etc/hosts? Please post the output of Code: netstat -tap Is 69.57.177.58 your server's IP address?
caveguard:~# hostname caveguard.yy.se caveguard:~# hostname -f caveguard.yy.se caveguard:~# netstat -tap Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 *:imaps *:* LISTEN 4662/inetd tcp 0 0 *op3s *:* LISTEN 4662/inetd tcp 0 0 localhost.localdo:mysql *:* LISTEN 4717/mysqld tcp 0 0 *op3 *:* LISTEN 4662/inetd tcp 0 0 *:imap2 *:* LISTEN 4662/inetd tcp 0 0 *:81 *:* LISTEN 5447/ispconfig_http tcp 0 0 caveguard.infona:domain *:* LISTEN 28029/named tcp 0 0 localhost.locald:domain *:* LISTEN 28029/named tcp 0 0 *:ftp *:* LISTEN 5689/proftpd: (acce tcp 0 0 *:smtp *:* LISTEN 1053/master tcp 0 0 localhost.localdoma:953 *:* LISTEN 28029/named tcp6 0 0 *:www *:* LISTEN 13232/apache2 tcp6 0 0 *:ssh *:* LISTEN 4876/sshd tcp6 0 0 *:smtp *:* LISTEN 1053/master tcp6 0 0 ip6-localhost:953 *:* LISTEN 28029/named tcp6 0 0 *:https *:* LISTEN 13232/apache2 caveguard:~# No, 88.80.2.82. My old hostname was mail.xx.net Seams like i found the problem what was mailing to it, a snort daemon with wrong mail But still, i cant recive mail to my domain:/ Working on it now.. will come back with some more detailed logs/confs.
Do you mean xx.net? This is because it's pointing to the wrong IP address (69.57.177.58). Code: ~# dig mx xx.net ; <<>> DiG 9.2.1 <<>> mx xx.net ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4572 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3 ;; QUESTION SECTION: ;xx.net. IN MX ;; ANSWER SECTION: xx.net. 14400 IN MX 0 xx.net. ;; AUTHORITY SECTION: xx.net. 14400 IN NS ns1.thecpanel.com. xx.net. 14400 IN NS ns2.thecpanel.com. ;; ADDITIONAL SECTION: xx.net. 14400 IN A [B][COLOR="Red"]69.57.177.58[/COLOR][/B] ns1.thecpanel.com. 172800 IN A 69.57.177.58 ns2.thecpanel.com. 172800 IN A 69.57.177.59 ;; Query time: 267 msec ;; SERVER: 81.169.163.104#53(81.169.163.104) ;; WHEN: Mon Feb 6 09:45:25 2006 ;; MSG SIZE rcvd: 139
No. yy.se is the new hostname. Now, i tryed to mail to a mail that i created and i getting this from my bb to my new mail. The Postfix program <[email protected]> (expanded from <[email protected]>): [88.80.2.82.yy.se]: Name or service not known Final-Recipient: rfc822; [email protected] Original-Recipient: rfc822; [email protected] Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; [88.80.2.82.yy.se]: Name or service not known ---------- Forwarded message ---------- From: Lezgin aa <[email protected]> To: [email protected] Date: Mon, 6 Feb 2006 10:11:55 +0100 Subject: test -- MVH Lezgin aa ----------------------------- mail.info log says: Feb 6 10:11:59 caveguard postfix/smtpd[25826]: connect from uproxy.bb.com[66.249.92.194] Feb 6 10:11:59 caveguard postfix/smtpd[25826]: lost connection after CONNECT from uproxy.bb.com[66.249.92.194] Feb 6 10:11:59 caveguard postfix/smtpd[25826]: disconnect from uproxy.bb.com[66.249.92.194] Feb 6 10:11:59 caveguard postfix/smtpd[25828]: connect from uproxy.bb.com[66.249.92.199] Feb 6 10:11:59 caveguard postfix/smtpd[25828]: 42A071A883C9: client=uproxy.bb.com[66.249.92.199] Feb 6 10:11:59 caveguard postfix/cleanup[25830]: 42A071A883C9: message-id=<[email protected]> Feb 6 10:11:59 caveguard postfix/qmgr[1057]: 42A071A883C9: from=<[email protected]>, size=1269, nrcpt=1 (queue active) Feb 6 10:11:59 caveguard postfix/smtp[25831]: warning: no MX host for mail.yy.se has a valid A record Feb 6 10:11:59 caveguard postfix/smtp[25831]: 42A071A883C9: to=<[email protected]>, orig_to=<[email protected]>, relay=none, delay=0, status=bounced ([88.80.2.82.yy.se]: Name or service not known) Feb 6 10:11:59 caveguard postfix/cleanup[25830]: 7AB6B1A883E8: message-id=<[email protected]> Feb 6 10:11:59 caveguard postfix/qmgr[1057]: 7AB6B1A883E8: from=<>, size=3106, nrcpt=1 (queue active) Feb 6 10:11:59 caveguard postfix/qmgr[1057]: 42A071A883C9: removed Feb 6 10:12:02 caveguard postfix/smtp[25831]: 7AB6B1A883E8: to=<[email protected]>, relay=bb-smtp-in.l.google.com[64.233.183.27], delay=3, status=sent (250 2.0.0 OK 1139217119 k24si2092808nfc) Feb 6 10:12:02 caveguard postfix/qmgr[1057]: 7AB6B1A883E8: removed Feb 6 10:12:29 caveguard postfix/smtpd[25828]: disconnect from uproxy.bb.com[66.249.92.199] --------------- From the server: caveguard:~# dig aa.se mx ; <<>> DiG 9.2.4 <<>> aa.se mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6423 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;aa.se. IN MX ;; ANSWER SECTION: aa.se. 604800 IN MX 10 mail.aa.se. ;; AUTHORITY SECTION: aa.se. 604800 IN NS ns.devilscave.org. aa.se. 604800 IN NS ns.hyp.net. ;; ADDITIONAL SECTION: mail.aa.se. 604800 IN A 88.80.2.82 ns.hyp.net. 60312 IN A 194.63.248.53 ;; Query time: 126 msec ;; SERVER: 130.237.209.20#53(130.237.209.20) ;; WHEN: Mon Feb 6 10:14:56 2006 ;; MSG SIZE rcvd: 140 and caveguard:~# dig yy.se mx ; <<>> DiG 9.2.4 <<>> yy.se mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25343 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3 ;; QUESTION SECTION: ;yy.se. IN MX ;; ANSWER SECTION: yy.se. 604800 IN MX 10 mail.yy.se. ;; AUTHORITY SECTION: yy.se. 565501 IN NS ns.hyp.net. yy.se. 565501 IN NS ns1.yy.se. ;; ADDITIONAL SECTION: mail.yy.se. 604800 IN A 88.80.2.82 ns.hyp.net. 60251 IN A 194.63.248.53 ns1.yy.se. 531839 IN A 88.80.2.82 ;; Query time: 6 msec ;; SERVER: 130.237.209.20#53(130.237.209.20) ;; WHEN: Mon Feb 6 10:15:57 2006 ;; MSG SIZE rcvd: 141 And yes, I have checked both zones if there realy is a A record and it is...tryed to reload them a few times to.
Wierd, I dont whant mail sent to [email protected] but i have now created mx record for mail.yy.se too but now i get The Postfix program <[email protected]> (expanded from <[email protected]>): [88.80.2.82.yy.se]: Name or service not known Returned Logs says: Feb 6 10:20:09 caveguard postfix/smtpd[25955]: connect from bay110-f6.bay110.cc.com[65.54.229.16] Feb 6 10:20:10 caveguard postfix/smtpd[25955]: 4EEA31A883C9: client=bay110-f6.bay110.cc.com[65.54.229.16] Feb 6 10:20:10 caveguard postfix/cleanup[25956]: 4EEA31A883C9: message-id=<[email protected]> Feb 6 10:20:10 caveguard postfix/qmgr[1057]: 4EEA31A883C9: from=<[email protected]>, size=887, nrcpt=1 (queue active) Feb 6 10:20:10 caveguard postfix/smtp[25958]: warning: no MX host for mail.yy.se has a valid A record Feb 6 10:20:10 caveguard postfix/smtp[25958]: 4EEA31A883C9: to=<[email protected]>, orig_to=<[email protected]>, relay=none, delay=0, status=bounced ([88.80.2.82.yy.se]: Name or service not known) Feb 6 10:20:10 caveguard postfix/cleanup[25956]: CECAE1A883E8: message-id=<[email protected]> Feb 6 10:20:10 caveguard postfix/qmgr[1057]: CECAE1A883E8: from=<>, size=2728, nrcpt=1 (queue active) Feb 6 10:20:10 caveguard postfix/qmgr[1057]: 4EEA31A883C9: removed Feb 6 10:20:10 caveguard postfix/smtpd[25955]: disconnect from bay110-f6.bay110.cc.com[65.54.229.16] Feb 6 10:20:12 caveguard postfix/smtp[25958]: CECAE1A883E8: to=<[email protected]>, relay=mx3.cc.com[65.54.244.72], delay=2, status=sent (250 <[email protected]> Queued mail for delivery) Feb 6 10:20:12 caveguard postfix/qmgr[1057]: CECAE1A883E8: removed
What's in /etc/postfix/main.cf? You should also create an A record for caveguard.yy.se because the IP address 88.80.2.82 is associated with caveguard.yy.se ( Code: ~# dig -x 88.80.2.82 ; <<>> DiG 9.2.1 <<>> -x 88.80.2.82 ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20241 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;82.2.80.88.in-addr.arpa. IN PTR ;; ANSWER SECTION: 82.2.80.88.in-addr.arpa. 3600 IN PTR caveguard.yy.se. ;; AUTHORITY SECTION: 2.80.88.in-addr.arpa. 36000 IN NS ns1.prqinet.net. 2.80.88.in-addr.arpa. 36000 IN NS ns2.prqinet.net. ;; ADDITIONAL SECTION: ns1.prqinet.net. 172618 IN A 194.145.248.2 ns2.prqinet.net. 172618 IN A 194.145.251.1 ;; Query time: 72 msec ;; SERVER: 81.169.163.104#53(81.169.163.104) ;; WHEN: Mon Feb 6 14:49:26 2006 ;; MSG SIZE rcvd: 156 ), but caveguard.yy.se doesn't exist: Code: ~# dig caveguard.yy.se ; <<>> DiG 9.2.1 <<>> caveguard.yy.se ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 16666 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;caveguard.yy.se. IN A ;; AUTHORITY SECTION: yy.se. 10800 IN SOA ns.devilscave.org. lerra.kth.se. 2006010127 10800 3600 604800 38400 ;; Query time: 134 msec ;; SERVER: 81.169.163.104#53(81.169.163.104) ;; WHEN: Mon Feb 6 14:49:40 2006 ;; MSG SIZE rcvd: 103
# See /usr/share/postfix/main.cf.dist for a commented, more complete version smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h myhostname = mail.yy.se #myhostname = yy.se alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = mail.yy.se, localhost.localdomain, localhost.localdomain, localhost relayhost = mynetworks = 127.0.0.0/8 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all smtpd_sasl_local_domain = smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination smtpd_tls_auth_only = no smtp_use_tls = yes smtpd_use_tls = yes smtp_tls_note_starttls_offer = yes smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom virtual_maps = hash:/etc/postfix/virtusertable mydestination = /etc/postfix/local-host-names
Wierd? Now i get this Feb 6 15:31:57 caveguard postfix/qmgr[7101]: 362B81A883C9: from=<[email protected]>, size=8070, nrcpt=1 (queue active) Feb 6 15:31:58 caveguard postfix/smtp[7148]: 362B81A883C9: to=<[email protected]>, orig_to=<[email protected]>, relay=none, delay=1, status=bounced (mail for mail.yy.se loops back to myself) Feb 6 15:31:58 caveguard postfix/cleanup[7147]: 730951A883EE: message-id=<[email protected]> Feb 6 15:31:58 caveguard postfix/qmgr[7101]: 730951A883EE: from=<>, size=9894, nrcpt=1 (queue active) Feb 6 15:31:58 caveguard postfix/qmgr[7101]: 362B81A883C9: removed Feb 6 15:32:04 caveguard postfix/smtp[7148]: 730951A883EE: to=<[email protected]>, relay=gmail-smtp-in.l.dd.com[66.249.93.27], delay=6, status=sent (250 2.0.0 OK 1139236319 k1si4250684ugf) What coud i possebly do wrong?
Insert the line: mail.yy.se at the end of the file /etc/postfix/local-host-names (as last line after the comment) and restart postfix: /etc/init.d/postfix restart