设置没有真正的Linux用户的邮件帐户

我在我的Ubuntu服务器上设置了Postfix和Dovecot。 我的目标是创build27个邮件帐户,可以收发邮件到处。 我收到的电子邮件在Gmail,Yahoo和Outlook中不会显示为垃圾邮件。 我发送电子邮件与Rainloop,一切都很好。 除;

系统不应该有这么多的用户。 正如我写的,我有这个系统上的6个用户,除了我的个人sudo用户和root用户。 通过为他们创buildLinux用户并向他们提供凭据,我可以授予人们接收和发送电子邮件的权限。

我无法想象像雅虎这样的大型电子邮件服务有超过一千万的系统用户,必须有一个解决scheme可以让我将Postfix / Dovecot连接到一个数据库(可能是MySQL?),而不是创build这么多的Linux用户。

所以基本上,我如何设置我在最后一段中写的内容,而不会丢失现有的数据? 我在服务器上没有收到太多的电子邮件,但是丢失数据是不好的做法,并且阻止它总是很好的。

谢谢!

诚实的build议,使用正常的用户帐户,让你的Linux系统authentication用户。 这很容易pipe理,非常安全。 我不想说其他系统是不安全的,但我相信我的Linux系统在存储和authentication密码方面。 我使用这些命令手动创build用户。 这样他们就不会对我的系统造成伤害。

 useradd -d /home/username -g 515 -u 603 -s /sbin/nologin username echo 12345678 | passwd user --stdin -g 515 is your groupid for mail users -u 603 needs to be incremeted by one for each user you create 

这将删除用户

 userdel -f username 

然后附加到文件/ etc / postfix / virtual作为你的用户

 [email protected] username 

这是我在master.cf中使用的部分

 submission inet n - n - - smtpd -o smtpd_helo_required=no -o smtpd_tls_wrappermode=no -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,permit_sasl_authenticated,reject -o milter_macro_daemon_name=ORIGINATING -o smtpd_sasl_type=dovecot -o smtpd_sasl_path=private/auth -o smtpd_sasl_security_options=noanonymous 

添加或删除用户后,请运行以下命令

 postmap /etc/postfix/virtual service postfix restart 

(最后一个命令在RHEL克隆上可能不同,例如Ubuntu,不确定,不要使用它)。 并在你的/etc/postfix/main.cf中有以下设置

 virtual_alias_maps = hash:/etc/postfix/virtual 

不要忘记在dovecot中增加mail_max_userip_connectionsvariables,请参阅Dovecot忽略最大IMAP连接数 。