powered by simpleCommunicator - 2.0.50     © 2025 Programmizd 02
Форумы / Unix-системы [игнор отключен] [закрыт для гостей] / Настройка автоответа в postfix-е
2 сообщений из 2, страница 1 из 1
Настройка автоответа в postfix-е
    #38991854
korbnik
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Подскажите, пожалуйста, что я делаю не так?

1. Создаю пользователя, который будет посылать автоответы:

useradd -c "Autoresponer" -g mail -m -s /sbin/nologin autoresp

2. В master.cf добавляю в конец две строки:

redirect unix - n n - - pipe
flags=R user=autoresp argv=/etc/postfix/script ${sender} ${recipient}

3. В /etc/postfix/script должно быть:

#!/bin/bash

/usr/sbin/sendmail -f $2 $1 < /etc/postfix/autoreply.txt

Права на скрипт - должен быть выполняемым для autoresp

4. Создаю файл /etc/postfix/autoreply.txt и вписать в него текст сообщения

This is a autoreply text
I am absent
Send mail later

5. Добавляю в main.cf:
smtpd_recipient_restrictions = "что там есть", hash:/etc/postfix/recipient

6. Создаю файл /etc/postfix/recipient такого вида:
user1@samara.vbrr.ru FILTER redirect:
user2@samara.vbrr.ru FILTER redirect:

7. postmap recipient

8. postfix reload

Посылаю письмо на user1@samara.vbrr.ru и не получаю автоответа.
Почему, что может быть не так?

Заранее благодарен.
...
Рейтинг: 0 / 0
Настройка автоответа в postfix-е
    #38991927
Фотография volodin661
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
korbnik,

написано в офиц. документации:

Autoreplies

In order to set up an autoreply for virtual recipients while still delivering mail as normal, set up a rule in a virtual alias table:

Код: php
1.
2.
/etc/postfix/main.cf:
    virtual_alias_maps = hash:/etc/postfix/virtual



Код: php
1.
2.
/etc/postfix/virtual:
    user@domain.tld user@domain.tld, user@domain.tld@autoreply.mydomain.tld


This delivers mail to the recipient, and sends a copy of the mail to the address that produces automatic replies. The address can be serviced on a different machine, or it can be serviced locally by setting up a transport map entry that pipes all mail for autoreply.mydomain.tld into some script that sends an automatic reply back to the sender.

DO NOT list autoreply.mydomain.tld in mydestination!

Код: php
1.
2.
3.
4.
5.
/etc/postfix/main.cf:
    transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport:
    autoreply.mydomain.tld  autoreply:


Код: php
1.
2.
3.
4.
5.
6.
7.
/etc/postfix/master.cf:
    # =============================================================
    # service type  private unpriv  chroot  wakeup  maxproc command
    #               (yes)   (yes)   (yes)   (never) (100)
    # =============================================================
    autoreply unix  -       n       n       -       -       pipe
        flags= user=nobody argv=/path/to/autoreply $sender $mailbox


This invokes /path/to/autoreply with the sender address and the user@domain.tld recipient address on the command line.



вот здесь то же самое по-русски:
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / Unix-системы [игнор отключен] [закрыт для гостей] / Настройка автоответа в postfix-е
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]