Page 1 of 1

After reinstall mail not working

Posted: 03 Aug 2009, 07:16
by Puma
After a reinstall mail not working (service mail receive / imap /send) active!

I get following log .... is postfix working>???? it sees mail on my provider but does not download it.

Aug 3 12:51:27 bubba dovecot: IMAP(hdroogers): Disconnected: Logged out
Aug 3 12:53:17 bubba fetchmail[13172]: awakened at Mon Aug 3 12:53:17 2009
Aug 3 12:53:17 bubba fetchmail[13172]: 5 messages for hdroogers@*****.nl at pop.***.nl (233434 octets).
Aug 3 12:53:18 bubba fetchmail[13172]: reading message hdroogers@****.nl@pop.***.nl:1 of 5 (4022 octets) (log message incomplete)
Aug 3 12:53:18 bubba fetchmail[13172]: connection to localhost:smtp [127.0.0.1/25] failed: Connection refused.
Aug 3 12:53:18 bubba fetchmail[13172]: SMTP connect to localhost failed
Aug 3 12:53:18 bubba fetchmail[13172]: SMTP transaction error while fetching from hdroogers@casema.nl@pop.***.nl and delivering to SMTP host localhost

Whats going on??


puma

Re: After reinstall mail not working

Posted: 03 Aug 2009, 08:15
by tor
Hi Puma,

It seems like your Postfix, smtp server is not running. Could you try, logged in as admin in the web admin: Select Services
Uncheck "Send and receive" under Mail

Click Update wait for it to complete and then check the service, to start it again, and click update.

Then check if email starts working again.

/Tor

Re: After reinstall mail not working

Posted: 03 Aug 2009, 09:37
by Puma
Tor,

I tried this several times and it is still not working. ;-(

Maybe try a compleet restart??

Puma

Re: After reinstall mail not working

Posted: 04 Aug 2009, 03:07
by tor
Hi again Puma,

Could you please check your permissions of the /var/spool/postfix/public/ directory ie as root:

Code: Select all

ls -la /var/spool/postfix/public/
it should produce something like:

Code: Select all

bubba:/home/tor# ls -la /var/spool/postfix/public/
total 8
drwx--s---  2 postfix postdrop 4096 2009-04-11 14:30 .
drwxr-xr-x 19 root    root     4096 2009-03-30 03:09 ..
srw-rw-rw-  1 postfix postdrop    0 2009-04-11 14:30 cleanup
srw-rw-rw-  1 postfix postdrop    0 2009-04-11 14:30 flush
prw--w--w-  1 postfix postdrop    0 2009-04-21 10:47 pickup
prw--w--w-  1 postfix postdrop    0 2009-04-21 10:45 qmgr
srw-rw-rw-  1 postfix postdrop    0 2009-04-11 14:30 showq
If not something has messed this up.

/Tor

Re: After reinstall mail not working

Posted: 04 Aug 2009, 13:34
by Puma
Hello Tor,

This is the reply I get:

bubba:/home/hdroogers# ls -la /var/spool/postfix/public/
total 8
drwx--s--- 2 avahi netdev 4096 Jul 31 12:28 .
drwxr-xr-x 19 root root 4096 Jul 31 12:28 ..
srw-rw-rw- 1 avahi netdev 0 Jul 31 12:28 cleanup
srw-rw-rw- 1 avahi netdev 0 Jul 31 12:28 flush
prw--w--w- 1 avahi netdev 0 Jul 31 12:54 pickup
prw--w--w- 1 avahi netdev 0 Jul 31 12:53 qmgr
srw-rw-rw- 1 avahi netdev 0 Jul 31 12:28 showq

Does this means it is messed up??

----
After this I did a full new install with bubba2 and storage.
- Used the script to format bubbastorage.
- Replaced backup (settings via webinterface)
- Again raid1 installed via webinterface.

Everything is working except the SMTP server?? No mail....
Please can you help with this problem.


Puma

Re: After reinstall mail not working

Posted: 05 Aug 2009, 04:55
by tor
Hi again Puma,

Unfortunately the above ls confirms that the ownership of the files are messed up :(

The reason for this problem, is that the system backup is not entirely compatible between major releases. (This due to a limitation/bug in how we backup user data. We will have to look into this)

For now you have three possible options for solving this.

1. Install a clean version of an older version, ie the 1.1 image http://update.excito.net/install/bubba-two/image-1.1/, do the upgrade via web admin. Which should work. And then restore your systems settings.

2. Manually edit the file /etc/passwd and /etc/group on the current system to fix the numerical user/group ids.

3. Reinstall Bubba as you have done before but don't use the system settings restore.

Alternative no 2 needs command line access and is somewhat complicated. A short untested description (Note also that this info is only valid when having a system bavckup from an 1.1.x system and migrating to 1.2.0):

Log into Bubba via ssh and beome root.

Run: nano /etc/passwd The file /etc/passwd contains all user and system accounts, one account per line.

One needs to verify the numerical uid and gid which is column 3 and 4 in this file. An version with only the relevant fields on how it should look on a 1.2.0 install is:

Code: Select all

mysql			:100:102:
mediatomb	:101:103:
dovecot		:102:104:
postfix		:103:106:
proftpd		:104:65534:
ftp			:105:65534:
fetchmail		:106:65534:
sshd			:107:65534:
messagebus	:108:110:
avahi		:109:111:
mt-daapd		:110:65534:
dnsmasq		:111:65534:
ntp			:112:113:
squeezecenter	:113:65534:
If the numbers in your file does not match this you have to change them. When done save the file and exit nano. Ie [ctrl+o] and [ctrl+x]

When done you have to do the same for the /etc/group file. Do nano /etc/group Below is an excerpt from a 1.2.0 group file with only the relevant groups.

Code: Select all

nogroup:x:65534:
mysql:x:102:
mediatomb:x:103:
dovecot:x:104:
postfix:x:106:
messagebus:x:110:
avahi:x:111:
ntp:x:113:
Again if values doesnt match you will have to change them. When done save the file and exit nano. Ie [ctrl+o] and [ctrl+x]

To make sure that all applications pick up this change reboot your unit.

Hopefully this will solve your problems.

/Tor

Re: After reinstall mail not working

Posted: 05 Aug 2009, 06:25
by Puma
Tor,

Thanks for your fast and detailed answer.

I will try option 2 this evening.

Strange is however that I did following:

1. I had an bubba2 with 500Gb disk on version 1.20
2. I bought bubbastorage and 2x 1T disks for extra storage with Raid1.
3. I made an USB image disk WITH a backup of settings from v1.20
4. I installed the bubba2 with the 1Tb disk and applied the restore option.
5. I then formatted the bubbastorage and applied RAID1 functionality.

The thing I don't understand is that I used a backup of the settings from the same version.

I still have the 500Gb disk which when I place this in the b2 is fully working on v1.20

I let you know if the ssh option 3 works but I am still puzzled.

Puma

Re: After reinstall mail not working

Posted: 10 Aug 2009, 06:29
by Puma
Tor,

I first tried to solve it with ssh:
-/etc/passwd
- /etc/group

It was indeed messed up!
I changed the values and booted again.
Result - I got errors again starting up in mailerr.log.

Then I did a complete new install with raid1 and WITHOUT rerstore settings function.
Result - Everything works well even mail so at least succes problem solved!

But I think you have to look at the backup/restore function due to the fact that I did restore from an 1.2 system (which of course started with 1.08 but nevertheless..)

Excito thanks for your help solving this matter!

Puma