====== Postfix ====== * [[Примерная конфигурация mail.cf]] * [[Настройки hiserver]] * [[Настройка spamassassin]] === Отправить заново всю почту из очереди === postqueue -f === Очистка почтовой очереди === postsuper -d ID postsuper -d ALL === Пересылка всей почты на другой сервер === relayhost = mail.server.ru:25 === Копия сообщений и в другой ящик === recipient_bcc_maps = hash:/etc/postfix/recipient_bcc_maps main@domain.ru copied@domain.ru Не забыть прохэшировать postmap recipient_bcc_maps === Подмена исходящего адреса === smtp_generic_maps = hash:/etc/postfix/generic root@my.server.ru exist@mydomain.ru postmap /etc/postfix/generic service postfix reload === Автоответ на входящее сообщение === В master.cf добавить строку: redirect unix - n n - - pipe flags=R user=postfix argv=/etc/postfix/autoreply.sh ${sender} ${recipient} В /etc/postfix/script.sh должно быть: #!/bin/bash /usr/sbin/sendmail -f $1 $2 cat /etc/postfix/autoreply.msg | /bin/mail -s 'Оповещение $1 Права на скрипт - должен быть выполняемым для postfix (или любого юзера от имени которого в master.cf запускается скрипт) Создать файл /etc/postfix/autoreply.msg и вписать в него текст сообщения Добавить в main.cf: smtpd_recipient_restrictions = что там есть, hash:/etc/postfix/recipient Создать файлик /etc/postfix/recipient такого вида: user1@mydomain.com FILTER redirect: user2@mydomain.com FILTER redirect: postmap recipient postfix reload