python编写的slack的mime电子邮件转发脚本

email2slack的Python项目详细描述


PyPI versionBuild StatusCoverage Status

用python编写的slack的mime电子邮件转发脚本。

演示

Slack

松弛度

要求

开始

安装email2slack

来自PYPI

# Install email2slack
pip install email2slack --upgrade

# Fetch configuration file from GitHub
cd /usr/local/etc/
curl -O https://raw.githubusercontent.com/mikoim/email2slack/master/contrib/email2slack

# Before using, You must edit config file
vim /usr/local/etc/email2slack

在本例中,setuptools创建脚本来调用email2slack并放置它 自动在bin目录中。所以你应该在 安装MTA节。

来自github存储库
git clone https://github.com/mikoim/email2slack.git
cd email2slack

# Install email2slack
pip install .
cp contrib/email2slack /usr/local/etc/

# Before using, You must edit config file
vim /usr/local/etc/email2slack

可选:安装nkf

pip3 install nkf

设置MTA

postfix

vim /etc/postfix/aliases

...

# notify only, not forward
user: |/usr/local/bin/email2slack.py

# notify and forward e-mail to another user
user: anotheruser, |/usr/local/bin/email2slack.py

# notify and leave e-mail on same user
user: \user, |/usr/local/bin/email2slack.py

# you can override default slack url, team and channel with command line option,
# which replace as default=value in each section.
# -s url / --slack url
# -t team-name / --team team-name
# -c channel-name / --channel channel-name
# -f /path/to/email2slack.conf / --config /path/to/email2slack.conf
user: "|/usr/local/bin/email2slack.py -c '@user'"
another: "|/usr/local/bin/email2slack.py -c '#random'"

...

newaliases

贡献者

谢谢你的出色工作!

  • @小宫田新二

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java中的模板类   java如何创建跨服务域模型映射?   java如何最好地指定与Netty一起使用的Protobuf(最好使用内置Protobuf支持)   java Android Studio计数器文本视图字段未更新   操作属性>添加更改侦听器上的java按钮   Android中JSON参数的java解析   java DynamoDB和全局二级索引和ObjectMapper   JVM的Xmx限制的java外部控制?   java如何在触摸事件中停止图像滑块的自动滚动   java如何在AEM中从/content/dam读取xml文件?   在创建JavaNIO文件系统时,“env”选项(及其用途)是什么?   java如何在jdk 7或更早版本中使用lambda表达式   使用Java清理CSS