mpd + динамический ип + msmtp
Добавлено: 2010-05-26 8:53:06
Провайдер выдает динамический ип. И очень хочется чтобы при поднятии
интерфейса приходило письмо на почту с новым ип.
Поставит msmtp настроил.
Далее получаем новый ип. и отправляем его на нужную почту.
Если прописать в консоли то письмо приходит.
Далее поместил все это дело в скрипт поднятия туннеля в mpd. не работает.
В чем косяк?
интерфейса приходило письмо на почту с новым ип.
Поставит msmtp настроил.
Код: Выделить всё
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=ufastorm@ufamail.ru
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and your mailhub is so named.
mailhub=smtp.ufamail.ru
# Where will the mail seem to come from?
#rewriteDomain=yandex.ru
# The full hostname
hostname=gateway
AuthUser=mail@mail.ru
AuthPass=truefalse9
# Set this to never rewrite the "From:" line (unless not given) and to
# use that address in the "from line" of the envelope.
FromLineOverride=YES
# Use SSL/TLS to send secure messages to server.
#UseTLS=YES
# Use SSL/TLS certificate to authenticate against smtp host.
#UseTLSCert=YES
# Use this RSA certificate.
#TLSCert=/usr/local/etc/ssmtp/ssmtp.pem
# Get enhanced (*really* enhanced) debugging information in the logs
# If you want to have debugging of the config file parsing, move this option
# to the top of the config file and uncomment
Debug=YES
Если прописать в консоли то письмо приходит.
Код: Выделить всё
echo "Subject: new ip address" | ifconfig ng0 | grep inet | awk | '{print $2}' | /usr/local/bin/msmtp
mail@mail.ru
В чем косяк?