久一网络科技

久一网络科技是您快速建站的首选,我们提供快速高效的服务:快速建站,服务器运维,整站建设,网络编程,网络安全等。持久的品质保证,始终如一的服务理念,久一网络科技-----您身边的网络专家。 如有需求,请联系:tech@jooyee.net
四月 08

先安装好postfix,这里有一篇文章:
http://filehost.googlecode.com/files/postfix.doc

然后看这个:

http://filehost.googlecode.com/files/postfix%2Bcourier.doc


遇到的问题:

/etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
myhostname = xxx.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = xxx.com,localhost
relayhost =
mynetworks = 127.0.0.0/8
#home_mailbox = Maildir/
mail_spool_directory = /var/spool/mail
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom



554 5.7.1 *fmaster@xxx.com*: Recipient address rejected: Access denied
----主要原因是smtpd_recipient_restrictions选项不对,设置成上面的就OK了!!!

550 not local host not a gateway postfix----mx记录与url转发冲突了


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
求助OpenWebMail 无法自动收邮件
研究了一个下午终于弄明白.晕死了.原来是 openwebmail 不支持maildir格式收邮件.只支持 mbox格式
把Postfix+Dovecot+Openwebmail 三者个格式统一下就行了
1.postfix 配置 main.cf
mail_spool_directory = /var/spool/mail
2.Dovecot 配置 Dovecot.conf
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
3.Openwebmail.conf
mailspooldir /var/spool/mail


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Exmail+Postfix修改邮件附件大小收藏
目的使由 Exmail+Postfix 搭建的邮件系统能上传50M的附件
1. 修改/etc/php.ini max_execution_time = 30 #改为60 (增加处理脚本的时间限制)
memory_limit = 8M #改为50M (这样才能发10M的附件)
post_max_size = 2M #改为50M
upload_max_filesize = 2M #改为50M
2. 修改/etc/httpd/conf.d/php.conf *Files *.php*;
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288 #把524288改为51200000
+/Files+;
这里的 LimitRequestBody 524288 限定了上传附件的上限为512k, 将其改为50M
3. 修改/etc/postfix/main.cf, 添加如下语句: message_size_limit = 69120000
postfix的默认值是10M, 但这指的是邮件正文和编码后附件的总和, 经过base64编码,附件的大小会增加35%左右, 因此这里设定可接受邮件的大小为69M
可以使用如下命令查看postfix的有关设定:
# /usr/sbin/postconf | grep size
4. 修改/var/www/extsuite/extmail/webmail.cfSYS_MESSAGE_SIZE_LIMIT = 512000005. 重起apache和postfix.


现在觉得还是squirrel配dovecot,然后openwebmail配courier比较好,呵呵

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ERROR: Connection dropped by IMAP server.

可以先创建一个用户(这里的用户是指在装好了邮件系统后),然后用这个用户给其发个邮件,这样就行了也可以这样:

echo hello? | sendmail user@domain

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

关于squirrelmail的username error估计是字符编码的问题

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/etc/init.d/mysqld restart

出现not cleanly closed等属于正常现象

0 评论 ---->點閱數:

发表评论

关注者

热门帖子

网页浏览总次数

20,696