简体   繁体   English

通过php在服务器上创建邮件帐户

[英]create mail account on server via php

i have programmed small mail reader script 我已经编写了小型邮件阅读器脚本

and linked it with my website script 并链接到我的网站脚本

My question is 我的问题是

i want allow my website users to make them mail on my server 我想允许我的网站用户将他们发送到我的服务器上

IMAP email on my domain 我网域上的IMAP电子邮件

Question is: 问题是:

How to create email on server via php 如何通过php在服务器上创建电子邮件

i searched in imap library and found no thing 我在imap库中搜索但没有发现任何东西

thank you and sorry for my language! 谢谢你,抱歉我的语言!

That depends entirely on your configuration. 这完全取决于您的配置。 I, for example, use Postfix with Dovecot and have MySQL store the users. 例如,我将Postfix与Dovecot结合使用,并让MySQL存储用户。 If I want to add a user, I simply run INSERT INTO MAIL.USERS ('un@domain', ENCRYPT('password')) . 如果要添加用户,只需运行INSERT INTO MAIL.USERS ('un@domain', ENCRYPT('password')) I got a couple of different sets of instructions here . 我在这里得到了几套不同的说明。

Of course, this was for CentOS, so you may need to do a bit more research. 当然,这是针对CentOS的,因此您可能需要做更多的研究。

$str = 'adduser user1';

exec($str);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM