Настраиваю почтарь вот по этой замечательной статье http://www.sys-adm.org.ua/mail/mail-howto-p1.php
Cтолкнулся с некоторыми сложностями, а именно дошёл до запуска postfixa, стартует без ошибок, но в логи летит вот это:
Код: Выделить всё
Aug 12 16:15:08 xxx postfix/master[87733]: daemon started -- version 2.5.1, configuration /usr/local/etc/postfix
Aug 12 16:15:08 xxx postfix/pickup[87734]: E341145066: uid=0 from=<root>
Aug 12 16:15:08 xxx postfix/cleanup[87736]: E341145066: message-id=<20080812121508.E341145066@mail.my.ru>
Aug 12 16:15:08 xxx postfix/cleanup[87736]: warning: mysql query failed: Table 'postfix.alias' doesn't exist
Aug 12 16:15:08 xxx postfix/cleanup[87736]: warning: E341145066: virtual_alias_maps map lookup problem for root@my.ru
Aug 12 16:15:08 xxx postfix/pickup[87734]: E75D745066: uid=0 from=<root>
Aug 12 16:15:08 xxx postfix/cleanup[87736]: E75D745066: message-id=<20080812121508.E75D745066@mail.my.ru>
Aug 12 16:15:08 xxx postfix/cleanup[87736]: warning: E75D745066: virtual_alias_maps map lookup problem for root@my.ru
Aug 12 16:15:08 xxx postfix/pickup[87734]: E795945066: uid=0 from=<root>
Aug 12 16:15:08 xxx postfix/cleanup[87736]: E795945066: message-id=<20080812121508.E795945066@mail.my.ru>
1. authdaemonrc
Код: Выделить всё
# cat /usr/local/etc/authlib/authdaemonrc | grep -v ^# | grep -v ^$
authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=5
authdaemonvar=/var/run/authdaemond
subsystem=mail
DEBUG_LOGIN=2
DEFAULTOPTIONS="wbnodsn=1"
LOGGEROPTS=""
Код: Выделить всё
# cat /usr/local/etc/authlib/authmysqlrc | grep -v ^# | grep -v ^$
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_CHARACTER_SET utf8
MYSQL_USER_TABLE mailbox
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD '1981'
MYSQL_GID_FIELD '1981'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD '/var/spool/mail'
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD quota
MYSQL_WHERE_CLAUSE active='1'
Код: Выделить всё
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
base = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
mail_owner = postfix
default_privs = nobody
myhostname = my.ru
mydomain = my.ru
myorigin = $mydomain
inet_interfaces = all
mydestination = localhost.$mydomain, localhost
local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = $virtual_mailbox_maps, $virtual_alias_maps, $alias_maps
unknown_local_recipient_reject_code = 550
mynetworks_style = host
mynetworks = 127.0.0.0/8
alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/mail/aliases
alias_database = hash:/etc/aliases
#alias_database = hash:/etc/mail/aliases
home_mailbox = Maildir/
mail_spool_directory = /var/spool/mail
header_checks = regexp:$base/header_checks
smtpd_banner = $myhostname ESMTP
debug_peer_level = 2
#debug_peer_list = 127.0.0.1, my.ru
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = no
smtpd_client_restrictions = permit_mynetworks,
permit_sasl_authenticated,
check_client_access hash:$base/client_access,
reject_unknown_client_hostname
smtpd_helo_restrictions = check_helo_access hash:$base/hello_access,
permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_helo_hostname,
reject_non_fqdn_helo_hostname,
reject_unknown_helo_hostname
smtpd_sender_restrictions = permit_mynetworks,
check_sender_access hash:$base/sender_access,
reject_authenticated_sender_login_mismatch,
reject_unknown_sender_domain,
reject_unlisted_sender,
reject_unverified_sender
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
check_recipient_access hash:$base/recipient_access
reject_unlisted_recipient,
reject_unknown_recipient_domain,
reject_non_fqdn_recipient,
reject_unverified_recipient
content_filter=smtp-amavis:[127.0.0.1]:10024
smtpd_etrn_restrictions = reject
smtpd_reject_unlisted_sender = yes
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
show_user_unknown_table_name = no
address_verify_sender = <>
unverified_sender_reject_code = 550
smtpd_helo_required = yes
smtp_always_send_ehlo = yes
smtpd_hard_error_limit = 8
smtpd_sasl_auth_enable = yes
smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sender_login_maps = mysql:$base/mysqlLookupMaps/sender.conf
virtual_alias_maps = mysql:$base/mysqlLookupMaps/alias.conf
virtual_mailbox_domains = mysql:$base/mysqlLookupMaps/domain.conf
virtual_mailbox_maps = mysql:$base/mysqlLookupMaps/mailbox.conf
virtual_mailbox_base = /var/spool/mail
virtual_mailbox_limit_maps = mysql:$base/mysqlLookupMaps/quota.conf
virtual_maildir_extended=yes
virtual_mailbox_limit_override=yes
virtual_create_maildirsize = yes
virtual_overquota_bounce = yes
virtual_maildir_limit_message="Sorry, the user's maildir has overdrawn his disks
pace quota, please try again later"
message_size_limit = 31457280
virtual_gid_maps = static:1981
virtual_uid_maps = static:1981
virtual_minimum_uid = 1000
Код: Выделить всё
# cat /usr/local/etc/postfix/mysqlLookupMaps/alias.conf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
mysql -p -u root
задаём пороль...рута,
создаём базу postfix и создаём юзера postfix и даём права на эту базу!!!
mysql> create database postfix;
grant all on postfix.* to 'postfix'@'localhost' identified by 'postfix';
понимаю что он ругается на таблицу postfix.alias что её нету, но почему???? или я чего то не понимаю
