postfix

Pierluigi Budel pierl@inwind.it
Mar 9 Mar 2004 12:56:34 CET


Allora... 
Uso una Slackware 9.1, postfix l'ho scaricato e compilato io senza nessuna opzione particolare e funzionava tutto bene fino a quando non ho toccato qualcosa che non ricordo...(Maledizione)

comunque in /etc/ppp/ non ho la directory ip-up.d ma solo lo script ip-up che non fa per niente quello fa il tuo script... questo è il mio:

#!/bin/sh
#
# This file /etc/ppp/ip-up is run by pppd when there's a
# successful ppp connection.
#
# Put any commands you want run after a successful connection
# in this file.
#
# Any commands you want printed to the screen should be directed
# to: >/dev/tty0
#
# Other commands should not be directed to: >/dev/tty0
#
# The companion file is /etc/ppp/ip-down, it's run when the PPP
# connection ends.
#
# This file is created when you run pppsetup: Fri Feb 20 11:09:28 CET 2004
#
# The environment is cleared before executing this script
# so the path must be reset.
#
PATH=/usr/bin:/usr/sbin:/usr/local/bin:/sbin:/bin
export PATH

# This will print to the screen the local & remote IP address when you
# make a successful ppp connection.  $4 = Local IP $5 = Remote IP
#
# The CARRIER speed at which you connected will be reported, if it's in
# the /var/log/messages file.  You also need the programs "tail" "cut"
# "tr" "grep" and "syslogd" running for this to work.
# You may have to add S95=46 to your modem init string
# to get your modem to report the DCE = CARRIER speed.
# Example: AT&FS95=46

if [ -s /var/log/messages ] && ( ps xc 2>/dev/null | grep -q syslogd 2>/dev/null ); then
S=`tail -n 30 /var/log/messages 2>/dev/null | grep "CARRIER[^)]" 2>/dev/null | tr -d "^M" 2>/dev/null | cut -d: -f4 2>/dev/null`
echo -n "$S" >/dev/tty0
echo " Local: $4 -> Remote: $5 $1" >/dev/tty0
else
echo " Local: $4 -> Remote: $5 $1" >/dev/tty0
fi

# If you want to ping the other end to keep the connection open.
# The output from ping will goto >/dev/null, you won't see it.
# Ping -i 60 = send ping every 60 seconds to remote = $5.

#(ping -i 60 $5 &) >/dev/null 2>&1

# If you want sendmail to send any mail in /var/spool/mqueue when
# you connect, remove the # below.

sendmail -q
echo "Sending queued mail..." > /dev/tty0 

# If you want fetchmail to get your mail when you connect and check
# every 300 seconds = 5 minutes for mail, remove the # below.

fetchmail
echo " fetchmail is Activated" > /dev/tty0

# End...

Grazie ancora, Pier


On Tue, 9 Mar 2004 12:39:32 +0100
micky@mesina.net (Micky Del Favero) wrote:

> Pierluigi Budel writes:
> 
> > Seguito il consiglio di commentare la linea ho riavviato posfix
> > (naturalmente) ma il risultato non è quello che volevo! 
> 
> ma aggiorni il resolv.conf della prigione chroot e ricarichi la
> configurazione di postfix dopo esserti collegato? Tanto per essere
> chiari in Debian:
> 
> micky@biancaneve:~$ cat /etc/ppp/ip-up.d/postfix 
> #!/bin/sh -e
> 
> # Called when ppp connects
> # Written by LaMont Jones <lamont@debian.org>
> 
> # start or reload Postfix as needed
> if [ ! -x /sbin/resolvconf ]; then
>         cp /etc/resolv.conf $(postconf -h queue_directory)/etc/resolv.conf
>         /etc/init.d/postfix reload
> fi
> 
> # Force a queue run to unload any mail that is hanging around.
> # Yes, sendmail is a symlink...
> /usr/sbin/sendmail -q
> micky@biancaneve:~$ cat /etc/ppp/ip-down.d/postfix 
> #!/bin/sh -e
> 
> # Called when ppp disconnects
> # Written by LaMont Jones <lamont@debian.org>
> 
> # start or reload Postfix as needed
> if [ ! -x /sbin/resolvconf ]; then
>         cp /etc/resolv.conf $(postconf -h queue_directory)/etc/resolv.conf
>         /etc/init.d/postfix reload
> fi
> 
> exit 0
> micky@biancaneve:~$ 
> 
> > Ogni volta che da sylpheed premo SEND, anche se sono collegato sono
> > obbligato a svuotare la coda per poter inviare la posta.... sempre
> > sendmail -q è troppo stressante... non capisco proprio il perchè!!  
> 
> hai provato vero ad aspettare qualche secondo e vedere che succede?
> 
> Al limite manda i log che cerchiamo di capire cosa possa
> essere. Curiosità: che distribuzione? E postfix l'hai compilato tu o
> installato da un pacchetto precompilato?
> 
> Ciao, Micky
> -- 
> Micky Del Favero  micky@mesina.net  micky@linux.it
> Linux Registered User #78384 http://counter.li.org
> _______________________________________________
> blug mailing list
> blug@lists.linux.it
> http://lists.linux.it/listinfo/blug


Maggiori informazioni sulla lista blug