имеется общий почт. ящик у прова ... типа mail.firma.ru
связка postfix + fetchmail + procmail +dovecot pop3
Проверка серверов почты на сервере(ах) командой fetchmail -v -f '/root/.fetchmailrc' mail.firma.ru ..
fetchmail: 6.2.5 querying mail.firma.ru (protocol POP3) at Thu Mar 23 13:34:53 2006: poll started fetchmail: POP3< +OK <86143.1143118453@ns01.host.com> fetchmail: POP3> CAPA fetchmail: POP3< -ERR authorization first fetchmail: authorization first fetchmail: Repoll immediately on info@firma.ru@mail.firma.ru fetchmail: POP3< +OK <86146.1143118456@ns01.host.com> fetchmail: POP3> USER info@firma.ru fetchmail: POP3< +OK fetchmail: POP3> PASS * fetchmail: POP3< +OK fetchmail: POP3> STAT fetchmail: POP3< +OK 39 651728 39 messages for info@firma.ru at mail.firma.ru (651728 octets). fetchmail: POP3> LIST 1 fetchmail: POP3< +OK 1 4487 fetchmail: POP3> RETR 1 fetchmail: POP3< +OK reading message info@firma.ru@mail.firma.ru:1 of 39 (4487 octets) ....................... fetchmail: SMTP> MAIL FROM:<user@linuxmail.org> BODY=8BITMIME SIZE=1821 fetchmail: SMTP< 250 Ok fetchmail: SMTP> RCPT TO:<root@localhost> fetchmail: SMTP< 250 Ok fetchmail: SMTP> DATA fetchmail: SMTP< 354 End data with <CR><LF>.<CR><LF> #****************************fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 Ok: queued as C9C004F02C5 not flushed fetchmail: POP3> QUIT fetchmail: POP3< +OK fetchmail: 6.2.5 querying mail.firma.ru (protocol POP3) at Thu Mar 23 13:40:25 2006: poll completed fetchmail: SMTP> QUIT fetchmail: SMTP< 221 Bye fetchmail: normal termination, status 0
пиьсма не понятно куда приходят .... [root@mail-server ~]# mail No mail for root [root@mail-server ~]# cat /var/spool/mail/root [root@mail-server ~]#
конфиг постфикса postconf -n [root@mail-server ~]# [root@mail-server ~]# mail -bash: [root@mail-server: command not found [root@mail-server ~]# No mail for root -bash: No: command not found [root@mail-server ~]# [root@mail-server ~]# cat /var/spool/mail/root -bash: [root@mail-server: command not found [root@mail-server ~]# [root@mail-server ~]# -bash: [root@mail-server: command not found [root@mail-server ~]# postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 html_directory = no local_recipient_maps = unix:passwd.byname $alias_maps mail_spool_directory = /var/spool/mail mailbox_command = /usr/bin/procmail -a $EXTENSION mailbox_transport = lmtp:unix:/file/name mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = firma.ru mydomain = firma.ru myhostname = mail.firma.ru myorigin = firma.ru newaliases_path = /usr/bin/newaliases.postfix readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES relay_domains = $mydestination sample_directory = /usr/share/doc/postfix-2.2.2/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_banner = $myhostname ESMTP $mail_name unknown_local_recipient_reject_code = 550 [root@mail-server ~]#
конфиг фетчмаила [root@mail-server ~]# cat /root/.fetchmailrc #set syslog defaults protocol pop3, timeout 60, nokeep fetchall
skip mail.firma.ru proto pop3 user "info@firma.ru" pass "pass" is root here keep fetchall #mda /usr/bin/procmail [root@mail-server ~]#
да procmail еще не дошел ... потомучто на рута пиьсма еще не приходят ... так что сортировку отложил .... что делать где копать ???