System Mail Not Working

Hello

I have OpenSuse 12.1 installed. I have set up some Cron jobs to run and then e-mail me the output. They run, and then the e-mail sits in mailq. I have to do rcpostfix restart and then all the e-mails get sent that are sitting in the queue. The next time I checked mailq it says it is not working again. Again I do rcpostfix restart, and all is well. How do I get it to stay operating? Any help is appreciated.

Thanks
Harpo2

What do you mean with “next time”? After six years, after 10 minutes, after a reboot? When the last is the case, it is most probably that you never have switched the service on. Starting it manualy, it will run until you stop it, or the system stops.

When you want to switch on a service use YaST > System, System services (runlevel). searcj for postfix, select and click the Activate button. OK. YaST will start it and administer it to be switched on on boot.

Thanks hcvv. I did what you suggested. I think that will do the trick.

Harpo2

You are welcome.

Actually, it happened again. What it is, is that I run some cron jobs that e-mail me when finished. They stopped coming to me again. I went into console and checked mailq and it said it wasn’t running. I did a rcpostfix restart, and the e-mails quickly came through. I went to YaST > System, System services (runlevel). searcj for postfix, as I had done before. It says it is running and active. I’m still not sure what I’m missing, and how to make it keep running. Any further ideas?

Harpo2

Next time when you think it isn’t running, first check before you start it manualy

ps -ef|grep post

.
And when it is not running, then check in YaST what it says there. When you do the manual restart, you are no more 100% sure about the situation.

You could also look with

dmesg | grep post

to see if there are any messages there.

And look inside* /var/log/messages*.

Okay, here is the result from dmesg|grep post

1.478703] ACPI: Video Device [VID] (multi-head: yes  rom: no  post: no)

It says post no. If I’m reading that correctly. I am going to run a cron job to see if it mails me. If it doesn’t, then I will run the other commands you had suggested.

Harpo2

That message about video has no connection to what you are looking for. The word post might show in other lines than those we are after.

On 2011-11-27 18:26, Harpo2 wrote:
> before. It says it is running and active. I’m still not sure what I’m
> missing, and how to make it keep running. Any further ideas?

Run “systemctl” and check the status of postfix. Check also the boot log.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

You should not look into dmesg, rather in /var/log/messages. Restart the postfix service, then do a “tail -30 /var/log/messages”.

Services like postfix can have issues with systemd, at boot try F5. then pick System V.

On 2011-11-27 23:36, Knurpht wrote:

I also have that problem in my test system, postfix is not started.

>
> You should not look into dmesg, rather in /var/log/messages. Restart the
> postfix service, then do a “tail -30 /var/log/messages”.

I’m seeing that systemd does not update boot.msg. And I see no entry in the
messages log either.

> Services like postfix can have issues with systemd, at boot try F5.
> then pick System V.

In my test system, ‘systemctl’ says that network failed to start, which is
false. But if network failed, postfix will not be started.


> UNIT                                          LOAD   ACTIVE SUB       JOB DESCRIPTION
>
> network.service                               loaded failed failed        LSB: Configure the localfs depending network interfaces
> NetworkManager.service                        loaded failed failed        Network Manager



Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Hello

Okay, here is what I get after restarting the postfix service and then tail -30 /var/log/messages.

Dec 3 11:00:43 linux-45bs echo[31021]: Starting mail service (Postfix)
Dec 3 11:00:43 linux-45bs systemd[1]: PID 19387 read from file /var/spool/postfix/pid/master.pid does not exist. Your service or init script might be broken.
You have mail in /var/spool/mail/robert

Of course once I restarted the postfix all the messages in the mailq then came through. Any further thoughts on how to fix this?

Thanks
Harpo2

I have just upgraded 11.4->12.1 and same problem here.

postfix                   0:off  1:off  2:off  3:on   4:off  5:on   6:off

echo[20435]: Starting mail service (Postfix)
systemd[1]: PID 20299 read from file /var/spool/postfix/pid/master.pid does not exist. Your service or init script might be broken.


ps ax|grep postfix
20510 ?        Ss     0:00 /usr/lib/postfix/master

On 2011-12-06 12:16, xorock wrote:
>
> I have just upgraded 11.4->12.1 and same problem here.

So, you both consider bugzilla.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

[Bug 727403] New: systemd does not start postfix ?](http://lists.opensuse.org/opensuse-bugs/2011-10/msg05552.html)

Seems that it may be an upgrade related problem (I have the same problem after an upgrade from 11.4 to 12.1).

And it seems that resetting the off/on setting will set it on for the next reboot.

chkconfig postfix off

chkconfig postfix on

At least that’s just worked for me.

Several days ago I I attempted to fix this issue by re-running the yast mail configuration wizard, but it didn’t appear to help, even after rebooting. Given what you have written, perhaps my previously reconfigure of mail, a reboot, plus my disable/reenable via chkconfig, may all have contributed to getting it working again. In my case, I’ve never switched to sysV-init, I’ve had systemd running since the 12.1 upgrade.

This morning I booted up yet again, postfix is running, and mail to root gets forwarded to my login - so I think postfix is working fine now.

If anyone else is experiencing a similar problem, it may help to try some combination of reset/reconfigure/reboot/disable/enable of the mail/postfix, plus switching between sysV-init/systemd. In my case it must have been reconfigure+reboot+disable+enable of postfix only.

I also have this problem, fresh 12.1 install, enabled postfix in yast, wont work.

Using mail command from bash to send me a test mail doesnt work when postfix is running either tho.

Been running different linux types for over 13 years, never had anything as buggy as 12.1, hoping there will be a system upgrade asap.

Have to say this release appears to be broken out of the box. The QA on this appears to have been very poor.

My experience has been if you boot sysv-init then postfix starts, systemd it just sits there comatose. So you’d think the answer would be how do I force a sysv-init on startup as a “bodge” until the obvious bugs with systemd get fixed, wrong!

Do a shutdown -r now and you get messages telling you “runlevel 6 has been reached” and “no more processes left in this runlevel”. In the midst of these messages however you get an “error loading shared libraries: libsystemd.deamon.so.0 cannot open shared object file: no such file or directory” and the system just sits there; implication if you could force a sysv-init then on reboot the server is just going to hang there, which is no good for a remote server.

I’d say this release is in urgent need of fixing and if this is representative of what we can expect with Attachmate’s aquisition of Novell, I’m not impressed.

Pete

All,
It would appear there’s already a bug raised on this (727403). However as a work around for those more used to yast or chkconfig entering
systemctl enable postfix service
from a root shell does work (and leaves it working on the reboot too). It’s just very confusing for those more used to yast or chkconfig and I’d suggest yast (gui and ncurses) needs modifying. This is realy a QA failure.

Did you file a bug report aboutthis on Bugzilla? openSUSE:Submitting bug reports - openSUSE