如何设置厨师环境,运行Django,发送邮件

时间:2022-12-16 00:23:47

I have a chef environment on my system, which is running Ubuntu Linux 12.10. I cannot seem to get chef configured correctly to do send_mail in Django/Python. Where do I look. What do I need to configure chef to do this? My Python/Django code is fine.

我的系统上有一个厨师环境,运行Ubuntu Linux 12.10。我似乎无法正确配置厨师在Django / Python中执行send_mail。我在哪里看配置厨师这样做需要什么?我的Python / Django代码很好。

1 个解决方案

#1


1  

You need to make sure postfix is set up in chef first. If not, log into your VM were chef is running:

您需要确保首先在厨师中设置postfix。如果没有,请登录您的VM,厨师正在运行:

sudo apt-get install postfix

Then gedit, nano, VIM, or whatever you prefer into main conf file:

然后gedit,nano,VIM,或任何你喜欢的主conf文件:

sudo vi /etc/postfix/main.cf

Finally, see what your relay host is set to and alte it to the email bo you wnt the contact emails to go:

最后,查看您的中继主机设置的内容,并将其更改为您要联系的电子邮件中的电子邮件:

relayhost = mail.your-admin-email.com

See if that doesn't fix the issue for u.

看看这不能解决你的问题。

#1


1  

You need to make sure postfix is set up in chef first. If not, log into your VM were chef is running:

您需要确保首先在厨师中设置postfix。如果没有,请登录您的VM,厨师正在运行:

sudo apt-get install postfix

Then gedit, nano, VIM, or whatever you prefer into main conf file:

然后gedit,nano,VIM,或任何你喜欢的主conf文件:

sudo vi /etc/postfix/main.cf

Finally, see what your relay host is set to and alte it to the email bo you wnt the contact emails to go:

最后,查看您的中继主机设置的内容,并将其更改为您要联系的电子邮件中的电子邮件:

relayhost = mail.your-admin-email.com

See if that doesn't fix the issue for u.

看看这不能解决你的问题。