From: John <john@rmts.donpac.ru> To: Mandrake <mandrake-russian@altlinux.ru> Subject: [mdk-re] Снова замена адреса отправителя вPostfix : ПОМОГИТЕ! Date: Thu Mar 14 08:41:01 2002 Message-ID: <3C903A72.5050806@rmts.donpac.ru> (raw) Здраствуйте! Пишу в третий раз. Первый раз меня отправили по факам, второй раз Игорь Хомяков указал конкретный документ (похоже едиственный из всей документации, которая идет вместе с постфиксом, кроме него вообще ничего похожего я не нашел, если кто-то знает, ткните) - /usr/doc/postfix ... /FILTER_README. Еще раз постановка задачи: *как переименовать адрес отправителя письма, если адрес получателя не заканчивается на localhost, в противном случае оставить как есть*. Я читаю вышеупомянутый файл /1 - Create a dedicated local user account called "filter". The user will never log in, and can be given a "*" password and non-existent shell and home directory. This user handles all potentially dangerous mail content - that is why it should be a separate account./ сделал /2 - Create a directory /var/spool/filter that is accessible only to the "filter" user. This is where the content filtering will store its temporary files./ сделал /3 - Define a content filtering entry in the Postfix master file: /etc/postfix/master.cf: filter unix - n n - - pipe flags=Rq user=filter argv=/somewhere/filter -f ${sender} -- ${recipient}/ сделал, только написал argv=/etc/postfix/filter, дал вообще всем права на его исполнение /The /some/where/filter program can be a simple shell script like this: #!/bin/sh # Localize these INSPECT_DIR=/var/spool/filter SENDMAIL=/usr/sbin/sendmail # Exit codes from <sysexits.h> EX_TEMPFAIL=75 EX_UNAVAILABLE=69 # Clean up when done or when aborting. trap "rm -f in.$$" 0 1 2 3 15 # Start processing. cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; } cat >in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; } # filter <in.$$ || { echo Message content rejected; exit $EX_UNAVAILABLE; } $SENDMAIL "$@" <in.$$ exit $?/ Тоже сделал. Кстати, а куда echo должно выводится? На 12 консоль? Этот файл все равно не не выполняется, т.к. я в него в самое начало даже вписывал echo hello > /tmp/xxx, и этот файл создан не был. Наверное, что-то не так в //etc/postfix/master.cf/. ЧТО? И это только полбеды. Далее написано: /The idea is to first capture the message to file and then run the content through run a third-party content filter program. If the mail cannot be captured to file, mail delivery is deferred by terminating with exit status 75 (EX_TEMPFAIL). If the content filter program finds a problem, the mail is bounced by terminating the shell script with exit status 69 (EX_UNAVAILABLE). If the content is OK, it is given as input to Postfix sendmail, and the exit status of the filter command is whatever exit status Postfix sendmail produces./ А я не содержание, а адрес получателя хочу проверить, а адрес отправителя изменить (грубо говоря, динамически комментровать и раскомментировать в в main.cf строку sender_canonical_map = hash:/etc/postfix/canonical без перезапуска постфикса). Я так понял, что адреса я получу как параметры /-f ${sender} -- ${recipient}/. Так как мне их изменить? Не сам же параметр sender модифицировать (или меня подводит мой опыт программирования на С/С++, а здесь такое можно)? Извиняюсь, если кого запарил своим длинным письмом, но я правда не понимаю, что мне сделать. Скажите мне прямо, что я слишком много хочу и этого нельзя, или покажите, как это сделать. С уважением, Прокопьев Евгений
next reply other threads:[~2002-03-14 8:41 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-03-14 8:41 John [this message] 2002-03-14 11:28 ` [mdk-re] " Artem K. Jouravsky 2002-03-14 11:52 ` Michael Shigorin 2002-03-14 12:09 ` Mikhail Zabaluev 2002-03-14 13:07 ` [mdk-re] Re: Снова замена адреса отправителя вPostfix: ПОМОГИТЕ! John 2002-03-14 13:42 ` Michael Shigorin 2002-03-14 15:25 ` [mdk-re] Re: Снова замена адреса отп: равителя вPostfixПОМОГИТЕ! John
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=3C903A72.5050806@rmts.donpac.ru \ --to=john@rmts.donpac.ru \ --cc=mandrake-russian@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git