Postfix 和发送邮件的问题

Postfix 和发送邮件的问题

我在为 CENTOS 机器配置 postfix 时遇到了问题。

注意:邮件服务器本身应该仅限于本地主机,并且只能在内部发送邮件。

当我使用时会出现以下内容tail -f /var/log/maillog

Aug 24 22:51:54 localhost postfix/master[7188]: warning: process /usr/libexec/postfix/cleanup pid 8135 exit status 1
Aug 24 22:51:54 localhost postfix/master[7188]: warning: /usr/libexec/postfix/cleanup: bad command startup -- throttling
Aug 24 22:52:14 localhost postfix/master[7188]: warning: unix_trigger_event: read timeout for service public/pickup
Aug 24 22:52:54 localhost postfix/cleanup[8158]: fatal: open lock file pid/unix.cleanup: cannot open file: Permission denied
Aug 24 22:52:55 localhost postfix/master[7188]: warning: process /usr/libexec/postfix/cleanup pid 8158 exit status 1
Aug 24 22:52:55 localhost postfix/master[7188]: warning: /usr/libexec/postfix/cleanup: bad command startup -- throttling
Aug 24 22:53:14 localhost postfix/master[7188]: warning: unix_trigger_event: read timeout for service public/pickup
Aug 24 22:53:55 localhost postfix/cleanup[8182]: fatal: open lock file pid/unix.cleanup: cannot open file: Permission denied
Aug 24 22:53:56 localhost postfix/master[7188]: warning: process /usr/libexec/postfix/cleanup pid 8182 exit status 1
Aug 24 22:53:56 localhost postfix/master[7188]: warning: /usr/libexec/postfix/cleanup: bad command startup -- throttling
Aug 24 22:54:14 localhost postfix/master[7188]: warning: unix_trigger_event: read timeout for service public/pickup

这是我当前的配置/etc/postfix/main.cf

   queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

mail_owner = postfix
myhostname = localhost
mydomain = localdomain
inet_interfaces = localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
default_transport = error:outside mail is not deliverable
alias_database = hash:/etc/aliases
debug_peer_level = 2
mynetworks_style = host

debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5

home_mailbox = Maildir/

sendmail_path = /usr/sbin/sendmail.postfix

newaliases_path = /usr/bin/newaliases.postfix

mailq_path = /usr/bin/mailq.postfix

setgid_group = postdrop

html_directory = no

manpage_directory = /usr/share/man

sample_directory = /usr/share/doc/postfix-2.10.1/samples

readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES 

我使用下面列出的 perl 脚本通过 MIME:Lite 模块发送邮件:

use strict;
use warnings;
use MIME::Lite;


    my $message = MIME::Lite->new(
                    From            =>      '[email protected]',
                    To              =>      '[email protected]',
                    Subject         =>      'hello',
                    Type            =>      'Multipart/Mixed',
                    );

我错过了一些东西。我没有做太多配置,但我似乎找不到它不工作的原因。任何帮助或提示都将不胜感激。

相关内容