PDA

View Full Version : I broke postfix on a production server


godsdog
25th May 2006, 18:05
Hi. I changed IP information for a virtual domain on my server last night to an external IP and changed MX records to suit. I also changed the mailserver setting to external while playing around with an physically separate server.

Today I realize that mail is building up in user folders (eg: /home/www/web1/user/admin/Maildir/new) except mail clients (including IMAP & UebiMiau) fail to recognize any mail at all. I have since removed that domains DNS records and complete site from the server and reboot to no avail.

Please help...spanx.....

godsdog
25th May 2006, 19:05
<blush> I just remembered that I had a catch all email account on another domain forwarding all email to a catch all account on the domain that I moved/deleted/messed with. It seems that because mail wasn't being forwarded, it locked everything else up.

godsdog
25th May 2006, 19:53
But mail is still stuck in the new folders for everyone...back to searching the forums....

godsdog
25th May 2006, 20:04
It seems that mail being sent to a deleted account (even removed from Recycle Bin) is still trying to be forwarded to another Mail Server IP...

(BTW: I find the following commands very handy...)

postsuper -r ALLThen check your mail log with

tail -f /path/to/maillog

till
25th May 2006, 20:17
It seems that mail being sent to a deleted account (even removed from Recycle Bin) is still trying to be forwarded to another Mail Server IP...

Is the deleted account still listed in /etc/postfix/virtusertable?

godsdog
25th May 2006, 20:24
HI till, thanx for the response.

It wasn't until I recreated it. I think what I saw from using tail -f /var/log/maillog was stuff queued up from before. It kept saying 447 messages queued up. Now it says 1

I'm back to square one now with mail accumulating in the new folders of everyone's mail dirs. I think something else has frozen up...

godsdog
25th May 2006, 21:55
I think I'm stuck. When I connect to any account via IMAP, I see amongst various mail folders a dir named Maildir. Under that is new and then each mail message apears as a folder. What's going wrong here? I tried a reinstall of ispconfig to no avail. Please help.

godsdog
25th May 2006, 23:32
When I send myself a test email, here's the tail of maillog

May 25 13:28:45 localhost postfix/smtpd[4157]: warning: 206.116.63.178: hostname s206-116-63-178.gateway.bcsolutions.ca verification failed: Name or service not known
May 25 13:28:45 localhost postfix/smtpd[4157]: connect from unknown[206.116.63.178]
May 25 13:28:45 localhost postfix/smtpd[4157]: 687E7BB8066: client=unknown[206.116.63.178]
May 25 13:28:49 localhost postfix/smtpd[4157]: 699E1BB8066: client=unknown[206.116.63.178]
May 25 13:28:49 localhost postfix/cleanup[4161]: 699E1BB8066: message-id=<004401c68039$d3e8fa30$2d9b2805@PISS>
May 25 13:28:49 localhost postfix/qmgr[3757]: 699E1BB8066: from=<admin@bcsolutions.ca>, size=3146, nrcpt=1 (queue active)
May 25 13:28:49 localhost postfix/smtp[4165]: 699E1BB8066: to=<godsdog@localhost.localdomain>, orig_to=<godsdog@evilgrin.ca>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=localhost.localdomain type=A: Host not found)
May 25 13:28:49 localhost postfix/cleanup[4161]: B2BBDBB80EF: message-id=<20060525202849.B2BBDBB80EF@localhost.localdomain>
May 25 13:28:49 localhost postfix/qmgr[3757]: B2BBDBB80EF: from=<>, size=5123, nrcpt=1 (queue active)
May 25 13:28:49 localhost postfix/qmgr[3757]: 699E1BB8066: removed
May 25 13:28:49 localhost postfix/smtpd[4157]: disconnect from unknown[206.116.63.178]
May 25 13:28:54 localhost postfix/smtp[4165]: B2BBDBB80EF: to=<admin@localhost.localdomain>, orig_to=<admin@bcsolutions.ca>, relay=none, delay=5, status=bounced (Host or domain name not found. Name service error for name=localhost.localdomain type=A: Host not found)
May 25 13:28:54 localhost postfix/qmgr[3757]: B2BBDBB80EF: removed

Just checked dnsreport.com and was given the following warning...
mail.bcsolutions.ca claims to be non-existent host localhost.localdomain:
220 localhost.localdomain ESMTP Postfix
I didn't change my hostname...more digging...

godsdog
26th May 2006, 01:25
Okay, I've changed my hostname...still mail keeps building up in each users new folder. Calls from my clients are driving me nuts....

falko
26th May 2006, 02:26
May 25 13:28:49 localhost postfix/smtp[4165]: 699E1BB8066: to=<godsdog@localhost.localdomain>, orig_to=<godsdog@evilgrin.ca>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=localhost.localdomain type=A: Host not found)What's in /etc/hosts?
What's in /etc/postfix/main.cf?

godsdog
26th May 2006, 02:45
OMG...thanks for helping.

/etc/hosts contains # Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

/etc/postfix/main.cf contains
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 550
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.2.2/samples
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
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps

falko
26th May 2006, 03:05
Please run
postconf -e 'myhostname = mail.bcsolutions.ca'
and restart Postfix.

godsdog
26th May 2006, 03:59
I tried that and still no email. Here's some tail of a test email.

May 25 17:55:19 ns postfix/smtpd[3487]: warning: 206.116.63.178: hostname s206-116-63-178.gateway.bcsolutions.ca verification failed: Name or service not known
May 25 17:55:19 ns postfix/smtpd[3487]: connect from unknown[206.116.63.178]
May 25 17:55:19 ns postfix/smtpd[3487]: EB9CCBB80F0: client=unknown[206.116.63.178]
May 25 17:55:23 ns postfix/smtpd[3487]: 23197BB80F0: client=unknown[206.116.63.178]
May 25 17:55:23 ns postfix/cleanup[3494]: 23197BB80F0: message-id=<001901c6805f$114375c0$2d9b2805@PISS>
May 25 17:55:23 ns postfix/qmgr[3120]: 23197BB80F0: from=<godsdog@evilgrin.ca>, size=2873, nrcpt=1 (queue active)
May 25 17:55:23 ns postfix/smtpd[3487]: disconnect from unknown[206.116.63.178]
May 25 17:55:23 ns postfix/smtp[3529]: 23197BB80F0: to=<godsdog@mail.bcsolutions.ca>, orig_to=<godsdog@evilgrin.ca>, relay=none, delay=0, status=bounced (mail for mail.bcsolutions.ca loops back to myself)
May 25 17:55:23 ns postfix/cleanup[3494]: AE171BB80F2: message-id=<20060526005523.AE171BB80F2@mail.bcsolutions.ca>
May 25 17:55:23 ns postfix/qmgr[3120]: AE171BB80F2: from=<>, size=4706, nrcpt=1 (queue active)
May 25 17:55:23 ns postfix/qmgr[3120]: 23197BB80F0: removed
May 25 17:55:29 ns postfix/smtp[3529]: AE171BB80F2: to=<godsdog@mail.bcsolutions.ca>, orig_to=<godsdog@evilgrin.ca>, relay=none, delay=6, status=bounced (mail for mail.bcsolutions.ca loops back to myself)
May 25 17:55:29 ns postfix/qmgr[3120]: AE171BB80F2: removed

Here's one sent from a remote system
May 25 18:01:04 ns postfix/smtpd[3687]: connect from shawidc-mo1.cg.shawcable.net[24.71.223.10]
May 25 18:01:04 ns postfix/smtpd[3687]: 9C711BB80F0: client=shawidc-mo1.cg.shawcable.net[24.71.223.10]
May 25 18:01:04 ns postfix/cleanup[3691]: 9C711BB80F0: message-id=<25dd0b925d805e.25d805e25dd0b9@shaw.ca>
May 25 18:01:04 ns postfix/qmgr[3120]: 9C711BB80F0: from=<evilgrin@shaw.ca>, size=1286, nrcpt=1 (queue active)
May 25 18:01:04 ns postfix/smtpd[3687]: disconnect from shawidc-mo1.cg.shawcable.net[24.71.223.10]
May 25 18:01:04 ns postfix/smtp[3692]: 9C711BB80F0: to=<godsdog@mail.bcsolutions.ca>, orig_to=<godsdog@evilgrin.ca>, relay=none, delay=0, status=bounced (mail for mail.bcsolutions.ca loops back to myself)
May 25 18:01:05 ns postfix/cleanup[3691]: 00852BB80F2: message-id=<20060526010105.00852BB80F2@mail.bcsolutions.ca>
May 25 18:01:05 ns postfix/qmgr[3120]: 00852BB80F2: from=<>, size=3113, nrcpt=1 (queue active)
May 25 18:01:05 ns postfix/qmgr[3120]: 9C711BB80F0: removed
May 25 18:01:06 ns postfix/smtp[3695]: 00852BB80F2: to=<evilgrin@shaw.ca>, relay=idcmail.shaw.ca[64.59.134.8], delay=1, status=sent (250 2.5.0 Ok.)
May 25 18:01:06 ns postfix/qmgr[3120]: 00852BB80F2: removed
May 25 18:01:07 ns postfix/smtpd[3687]: connect from shawidc-mo1.cg.shawcable.net[24.71.223.10]
May 25 18:01:07 ns postfix/smtpd[3687]: 6462EBB80F0: client=shawidc-mo1.cg.shawcable.net[24.71.223.10]
May 25 18:01:07 ns postfix/cleanup[3691]: 6462EBB80F0: message-id=<20060526010105.00852BB80F2@mail.bcsolutions.ca>
May 25 18:01:07 ns postfix/qmgr[3120]: 6462EBB80F0: from=<>, size=4738, nrcpt=1 (queue active)
May 25 18:01:07 ns postfix/smtpd[3687]: disconnect from shawidc-mo1.cg.shawcable.net[24.71.223.10]
May 25 18:01:12 ns postfix/smtp[3692]: 6462EBB80F0: to=<godsdog@mail.bcsolutions.ca>, orig_to=<godsdog@evilgrin.ca>, relay=none, delay=5, status=bounced (mail for mail.bcsolutions.ca loops back to myself)
May 25 18:01:12 ns postfix/qmgr[3120]: 6462EBB80F0: removed
And finally, here's the bounce message derived from this email

This is the Postfix program at host mail.bcsolutions.ca.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The Postfix program

<godsdog@mail.bcsolutions.ca> (expanded from <godsdog@evilgrin.ca>): mail for
mail.bcsolutions.ca loops back to myself

godsdog
26th May 2006, 05:57
Well, I guess if I wanna have email back up for tomorow, I best get backin' up and reinstalling. I'll definitly know better next time than to go messing around with DNS settings for virtual domains on a server I can't afford having downtime on.

falko
26th May 2006, 17:24
<godsdog@mail.bcsolutions.ca> (expanded from <godsdog@evilgrin.ca>): mail for
mail.bcsolutions.ca loops back to myself
Please append mail.bcsolutions.ca to /etc/postfix/local-host-names and restart Postfix.

godsdog
28th May 2006, 18:42
I'm starting to think that this problem might be worthy of a bug report. All I did was take an existing domain that I was using on my local server running the latest upgrade of ISP Config and change it's records to point to a new address. I also set up it's mail config to external. I don't have a test server to duplicate results and I've reinstalled from scratch so...
BTW: I ran a backup of all domains checked everything except for logs, and not 1 single peice of mail was xfered from my IMAP users...Are there improvements slated for the backup function? Maybe I should stop complaining...maybe plesk spoiled me...(btw: I forgot to backup ispconfig's own database...lol you probably hear from people like me all the time.) Oh well, I'm totally commited to ispconfig now and am planning on converting other companies I admin for.

falko
28th May 2006, 23:08
I'm starting to think that this problem might be worthy of a bug report.I don't think it's a bug.

BTW: I ran a backup of all domains checked everything except for logs, and not 1 single peice of mail was xfered from my IMAP users...Are there improvements slated for the backup function?How did you do the backup?
Do you use Maildir or mbox?