FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 07-09-2008, 02:50 AM
William Case
 
Default sendmail

Tim;

I may be way off base here; I am not up on things dealing with networks
in general and Network Manager in particular. But ...

On Wed, 2008-07-09 at 11:02 +0930, Tim wrote:
> Tim:
> >> An alternative would be to put a restart script into the Network Manager
> >> Dispatcher directory. That way sendmail will be restarted any time the
> >> network goes down and up. A smart script would check whether it should
> >> restart a running service, or do nothing to a deliberately stopped
> >> service.
>
> Knute Johnson:
> > Could you provide a little more detail on exactly how to do this?
>
> I've attached a not-so-intelligent script for restarting the NTP daemon
> (it starts or restarts it, but doesn't "do nothing" if NTPD were
> manually stopped beforehand). When a network interface comes up, it
> starts NTP if it's not already running, it restarts it if were. And
> when the interface goes down, it stops it. The LOGGER bit, in it, is
> about putting entries into /var/log/messages, as well.
>
> You could modify it to start/restart sendmail, or any other service, and
> modify it leave to leave the service running all the time.
I think I had a similar problem with Boinc; got lots of suggestions from
the list. Some of them even worked. I filed a bug against Network
Manager and got the following response:
----------------------------------------------------------------------------
Status|NEW |CLOSED
Resolution| |NOTABUG




------- Additional Comments From dcbw@redhat.com 2008-07-02 19:04 EST
-------
Boinc is probably starting so soon after NetworkManager that the network
is not up yet. It's technically a bug in Boinc that it doesn't wait for
a network connection and periodically re-try to send/grab the data. But
for the moment, you can add the line:

NETWORKWAIT=yes

to /etc/sysconfig/network and startup will block for 10 seconds or until
a network connection is up, whichever is sooner.

This solution avoids the restart. Maybe this will work for sendmail as
well.

--
Regards Bill;
Fedora 9, Gnome 2.22.2
Evo.2.22.2, Emacs 22.2.1

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-09-2008, 02:59 AM
Knute Johnson
 
Default sendmail

William Case wrote:

Tim;

I may be way off base here; I am not up on things dealing with networks
in general and Network Manager in particular. But ...

On Wed, 2008-07-09 at 11:02 +0930, Tim wrote:

Tim:

An alternative would be to put a restart script into the Network Manager
Dispatcher directory. That way sendmail will be restarted any time the
network goes down and up. A smart script would check whether it should
restart a running service, or do nothing to a deliberately stopped
service.

Knute Johnson:
Could you provide a little more detail on exactly how to do this?

I've attached a not-so-intelligent script for restarting the NTP daemon
(it starts or restarts it, but doesn't "do nothing" if NTPD were
manually stopped beforehand). When a network interface comes up, it
starts NTP if it's not already running, it restarts it if were. And
when the interface goes down, it stops it. The LOGGER bit, in it, is
about putting entries into /var/log/messages, as well.

You could modify it to start/restart sendmail, or any other service, and
modify it leave to leave the service running all the time.

I think I had a similar problem with Boinc; got lots of suggestions from
the list. Some of them even worked. I filed a bug against Network
Manager and got the following response:
----------------------------------------------------------------------------
Status|NEW |CLOSED
Resolution| |NOTABUG




------- Additional Comments From dcbw@redhat.com 2008-07-02 19:04 EST
-------
Boinc is probably starting so soon after NetworkManager that the network
is not up yet. It's technically a bug in Boinc that it doesn't wait for
a network connection and periodically re-try to send/grab the data. But
for the moment, you can add the line:

NETWORKWAIT=yes

to /etc/sysconfig/network and startup will block for 10 seconds or until
a network connection is up, whichever is sooner.

This solution avoids the restart. Maybe this will work for sendmail as
well.



Thanks very much, I'll try that one too.

--
Knute Johnson
linux@www.knutejohnson.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-09-2008, 04:17 AM
Knute Johnson
 
Default sendmail

Tim wrote:

Tim:

An alternative would be to put a restart script into the Network Manager
Dispatcher directory. That way sendmail will be restarted any time the
network goes down and up. A smart script would check whether it should
restart a running service, or do nothing to a deliberately stopped
service.


Knute Johnson:
Could you provide a little more detail on exactly how to do this?


I've attached a not-so-intelligent script for restarting the NTP daemon
(it starts or restarts it, but doesn't "do nothing" if NTPD were
manually stopped beforehand). When a network interface comes up, it
starts NTP if it's not already running, it restarts it if were. And
when the interface goes down, it stops it. The LOGGER bit, in it, is
about putting entries into /var/log/messages, as well.

You could modify it to start/restart sendmail, or any other service, and
modify it leave to leave the service running all the time.




Tim:

That worked like a charm, thanks very much.

--

Knute Johnson
linux@www.knutejohnson.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-09-2008, 04:19 AM
Knute Johnson
 
Default sendmail

William Case wrote:

Tim;

I may be way off base here; I am not up on things dealing with networks
in general and Network Manager in particular. But ...

On Wed, 2008-07-09 at 11:02 +0930, Tim wrote:

Tim:

An alternative would be to put a restart script into the Network Manager
Dispatcher directory. That way sendmail will be restarted any time the
network goes down and up. A smart script would check whether it should
restart a running service, or do nothing to a deliberately stopped
service.

Knute Johnson:
Could you provide a little more detail on exactly how to do this?

I've attached a not-so-intelligent script for restarting the NTP daemon
(it starts or restarts it, but doesn't "do nothing" if NTPD were
manually stopped beforehand). When a network interface comes up, it
starts NTP if it's not already running, it restarts it if were. And
when the interface goes down, it stops it. The LOGGER bit, in it, is
about putting entries into /var/log/messages, as well.

You could modify it to start/restart sendmail, or any other service, and
modify it leave to leave the service running all the time.

I think I had a similar problem with Boinc; got lots of suggestions from
the list. Some of them even worked. I filed a bug against Network
Manager and got the following response:
----------------------------------------------------------------------------
Status|NEW |CLOSED
Resolution| |NOTABUG




------- Additional Comments From dcbw@redhat.com 2008-07-02 19:04 EST
-------
Boinc is probably starting so soon after NetworkManager that the network
is not up yet. It's technically a bug in Boinc that it doesn't wait for
a network connection and periodically re-try to send/grab the data. But
for the moment, you can add the line:

NETWORKWAIT=yes

to /etc/sysconfig/network and startup will block for 10 seconds or until
a network connection is up, whichever is sooner.

This solution avoids the restart. Maybe this will work for sendmail as
well.



William:

That worked too but on the laptop where the network will be started and
stopped I think Tim's solution is going to work better for me.


Thanks very much for chiming in though, I did learn something new.

--

Knute Johnson
linux@www.knutejohnson.com

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-09-2008, 04:28 AM
Tim
 
Default sendmail

On Tue, 2008-07-08 at 22:50 -0400, William Case wrote:
> Boinc is probably starting so soon after NetworkManager that the
> network is not up yet. It's technically a bug in Boinc that it
> doesn't wait for a network connection and periodically re-try to
> send/grab the data.

I'd agree with that. Likewise for other services, particularly if you
have a configuration to listen to all interfaces, without specifying
addresses for them.

> But for the moment, you can add the line:
>
> NETWORKWAIT=yes
>
> to /etc/sysconfig/network and startup will block for 10 seconds or
> until a network connection is up, whichever is sooner.
>
> This solution avoids the restart. Maybe this will work for sendmail
> as well.

Though, what will happen with the various services if the network goes
down and up again? (As it can.) Will they stall, will they recover
automatically?

A network can go down (especially if you're on dialup or wireless), and
DHCP servers can change IPs on you.

--
(This computer runs FC7, my others run FC4, FC5 & FC6, all using Gnome
in case that's important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-09-2008, 04:31 AM
Tim
 
Default sendmail

On Tue, 2008-07-08 at 21:17 -0700, Knute Johnson wrote:
> That worked like a charm, thanks very much.

Good to hear.

Well, it seems like bugzillas should be added for sendmail and NTP that
either they need to automatically recover from not having a network
available when started, or they need to put restart scripts in the
network manager dispatcher. Same for any other services that mismanage
this. The user shouldn't have to manually go fixing a pile of services
to overcome deficiencies in the default setup of the OS.

--
(This computer runs FC7, my others run FC4, FC5 & FC6, all using Gnome
in case that's important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-09-2008, 05:30 AM
Antonio Olivares
 
Default sendmail

--- On Tue, 7/8/08, Tim <ignored_mailbox@yahoo.com.au> wrote:

> From: Tim <ignored_mailbox@yahoo.com.au>
> Subject: Re: sendmail
> To: "For users of Fedora" <fedora-list@redhat.com>
> Date: Tuesday, July 8, 2008, 9:28 PM
> On Tue, 2008-07-08 at 22:50 -0400, William Case wrote:
> I'd agree with that. Likewise for other services,
> particularly if you
> have a configuration to listen to all interfaces, without
> specifying
> addresses for them.
> Though, what will happen with the various services if the
> network goes
> down and up again? (As it can.) Will they stall, will
> they recover
> automatically?
>
> A network can go down (especially if you're on dialup
> or wireless), and
> DHCP servers can change IPs on you.
>
> --

/* I apologize ahead of time, this is not a hijacking but a related problem with sendmail, if anyone feels offended, I'll start a new thread upon request */

I have had some problems trying to update a machine with sendmail. I have applied your script but changed the ntpd service to sendmail.

I have NetworkManager running, but it does not do anything. I use dialup to connect and technically do not use it. I ran the modified script with sendmail in place of ntpd and I got

[root@localhost Documents]# ./sendmail-script
./sendmail-script: line 14: [: ==: unary operator expected
./sendmail-script: line 26: [: ==: unary operator expected

I tried to edit it to find what I did wrong, but

[root@localhost Documents]# gedit sendmail-script &
[1] 15012

I could not find where or what was wrong. So I manually checked the status of sendmail and I got the following:

[root@localhost Documents]# service sendmail status
sendmail (pid 21862) is running...
sm-client (pid 21871) is running...
[1]+ Done gedit sendmail-script
[root@localhost Documents]# service sendmail restart
Shutting down sm-client: [ OK ]
Shutting down sendmail: [ OK ]
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]
[root@localhost Documents]# service sendmail status
sendmail (pid 15092) is running...
sm-client (pid 15101) is running...


I now try to update the machine to linux counter and I get:

[olivares@localhost Documents]$ ./machine-update -i
/bin/df: `/home/olivares/.gvfs': Transport endpoint is not connected
Here you can specify some info that the script can't know for itself
Your Linux Counter reg#, if any [381662]:
Your machine's counter reg#, if any [382519]:
--------------------------------------------------------
This is what will be sent to the Linux Counter if you
run the program with the -m switch. Now, NOTHING IS SENT
--------------------------------------------------------
< snip removed to save space >

[olivares@localhost Documents]$ ./machine-update -m
/bin/df: `/home/olivares/.gvfs': Transport endpoint is not connected

I tried the machine-update-beta script from linux counter and I got:

[olivares@localhost Documents]$ chmod +x machine-update-beta
[olivares@localhost Documents]$ ./machine-update-beta -i
Can't locate Mail/Sendmail.pm in @INC (@INC contains: /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at ./machine-update-beta line 16.
BEGIN failed--compilation aborted at ./machine-update-beta line 16.

I have checked the queue and I got

[root@localhost ~]# mailq
/var/spool/mqueue (5 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
m695ImTl015224 4997 Wed Jul 9 00:18 <olivares@localhost.localdomain>
(Deferred: Connection timed out with beth.counter.li.org.)
<machine-registration@counter.li.org>
m652mvBl022327* 50 Fri Jul 4 21:48 <olivares@localhost.localdomain>
(host map: lookup (gmail.com): deferred)
<olivares14031@gmail.com>
m652PGXN021917 5094 Fri Jul 4 21:25 <olivares@localhost.localdomain>
(host map: lookup (counter.li.org): deferred)
<machine-registration@counter.li.org>
m652nEUF022367 5094 Fri Jul 4 21:49 <olivares@localhost.localdomain>
(host map: lookup (counter.li.org): deferred)
<machine-registration@counter.li.org>
m652ikWX022255 15 Fri Jul 4 21:44 <olivares@localhost.localdomain>
(host map: lookup (gmail.com): deferred)
<olivares14031@gmail.com>
<olivares14031@yahoo.com>
Total requests: 5


I tried to send sample mail to my yahoo mail(this one) and the one at gmail and the message(s) did not get through.

I have known that at certain times the linux counter site is down or does not accept incoming mail. But I have not been successfull for a while to update either of my machines and I wanted to successfully update the machines and update the latest one that I have.

TIA,

Antonio




--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-09-2008, 06:47 AM
Tim
 
Default sendmail

On Tue, 2008-07-08 at 22:30 -0700, Antonio Olivares wrote:

> I have had some problems trying to update a machine with sendmail. I
> have applied your script but changed the ntpd service to sendmail.
>
> I have NetworkManager running, but it does not do anything. I use
> dialup to connect and technically do not use it. I ran the modified
> script with sendmail in place of ntpd and I got
>
> [root@localhost Documents]# ./sendmail-script
> ./sendmail-script: line 14: [: ==: unary operator expected
> ./sendmail-script: line 26: [: ==: unary operator expected

Show us the script that you're using. But the problem's most likely
down to you expecting to run stand-alone.

When the network manager dispatcher runs the script, it runs it with two
parameters, the name of the interface, and its status. You should do
the same if running it manually.

i.e. sendmail-script eth0 down

> [root@localhost ~]# mailq
> /var/spool/mqueue (5 requests)
> -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
> m695ImTl015224 4997 Wed Jul 9 00:18 <olivares@localhost.localdomain>
> (Deferred: Connection timed out with beth.counter.li.org.)
> <machine-registration@counter.li.org>
> m652mvBl022327* 50 Fri Jul 4 21:48 <olivares@localhost.localdomain>
> (host map: lookup (gmail.com): deferred)
> <olivares14031@gmail.com>
> m652PGXN021917 5094 Fri Jul 4 21:25 <olivares@localhost.localdomain>
> (host map: lookup (counter.li.org): deferred)
> <machine-registration@counter.li.org>
> m652nEUF022367 5094 Fri Jul 4 21:49 <olivares@localhost.localdomain>
> (host map: lookup (counter.li.org): deferred)
> <machine-registration@counter.li.org>
> m652ikWX022255 15 Fri Jul 4 21:44 <olivares@localhost.localdomain>
> (host map: lookup (gmail.com): deferred)
> <olivares14031@gmail.com>
> <olivares14031@yahoo.com>
> Total requests: 5

That's exactly the sort of thing that I was seeing when sendmail wasn't
able to use my network, because the network came alive *after* sendmail
started up. Even logwatch mails sent to root@localhost failed.

It's been quite some time since I used dialup, but it had a similar
feature to the dispatcher: When the ppp connection was made, the dialup
system would also run a script, if it found one, at a known location.

I think the user scripts were /sbin/ifup-local & /sbin/ifdown-local (for
post scripts) and they'd be called by /etc/sysconfig/network-scripts/ifup-post
& /etc/sysconfig/network-scripts/ifdown-post.

And there were /sbin/ifup-pre-local & /sbin/ifdown-pre-local for doing
things before the interfaces were pulled up and down.

Start by reading the /sbin/ifup and /sbin/ifdown scripts, and read all
the other scripts that they refer to. There's a chain of events that
happen when the interfaces go up or down.

--
[tim@localhost ~]$ uname -r
2.6.25.9-76.fc9.i686

Don't send private replies to my address, the mailbox is ignored. I
read messages from the public lists.



--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-09-2008, 04:35 PM
Bill Davidsen
 
Default sendmail

chloe K wrote:

Hi all

how can I resend the undeliverable from 5 days to 3 days

Doesn't your sendmail retry by itself every once in a while? Mine all
do, I'll occasionally get a warning email that a message couldn't be
delivered for 4 hours, and later I get a reply, so I know it was delivered.


I think my FC[89] sendmail is stock, save for listening on all addresses
so I can get incoming mail.


--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-09-2008, 05:53 PM
Antonio Olivares
 
Default sendmail

--- On Tue, 7/8/08, Tim <ignored_mailbox@yahoo.com.au> wrote:

> From: Tim <ignored_mailbox@yahoo.com.au>
> Subject: Re: sendmail
> To: olivares14031@yahoo.com, "For users of Fedora" <fedora-list@redhat.com>
> Date: Tuesday, July 8, 2008, 11:47 PM
> On Tue, 2008-07-08 at 22:30 -0700, Antonio Olivares wrote:
>
> > I have had some problems trying to update a machine
> with sendmail. I
> > have applied your script but changed the ntpd service
> to sendmail.
> >
> > I have NetworkManager running, but it does not do
> anything. I use
> > dialup to connect and technically do not use it. I
> ran the modified
> > script with sendmail in place of ntpd and I got
> >
> > [root@localhost Documents]# ./sendmail-script
> > ./sendmail-script: line 14: [: ==: unary operator
> expected
> > ./sendmail-script: line 26: [: ==: unary operator
> expected
>
> Show us the script that you're using. But the
> problem's most likely
> down to you expecting to run stand-alone.

I'll send it later today if possible. Thank you for your advice.

Regards,

Antonio
> --





--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 09:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org