Skip to content

Smellly/mailuIP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

邮箱帐号密码等

放在linux crontab定时执行获取外网IP,如果和之前的ip不一致,发送一封邮件到指定的邮箱中。 发送者和收件人的邮箱使用json格式储存放在相同目录下,保存为conf.json,有多个收件人用逗号隔开。 SMTPServer地址依据服务商而定。

# JSON Format
# outlook example
{
    'sender':'[email protected]',
    'passwd':'**********',
    'receivers':'[email protected],[email protected],[email protected]',
    'SMTPServer':'smtp-mail.outlook.com'
}

定时执行

执行$ crontab -e,在里面添加命令。例如

# 每半个小时执行一次
*/30 * * * * python /path/to/your/mailuIP.py

About

mail Linux IP to u

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages