sendmail

Tim ignored_mailbox at yahoo.com.au
Wed Jul 9 06:47:58 UTC 2008


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






More information about the fedora-list mailing list