From: "Artem K. Jouravsky" <ujo@ifirst.ru>
To: Mandrake <mandrake-russian@altlinux.ru>
Subject: [mdk-re] Re: Снова замена адреса отправителя вPostfix : ПОМОГИТЕ!
Date: Thu Mar 14 11:28:03 2002
Message-ID: <20020314084311.GB7364@ifirst.ru> (raw)
In-Reply-To: <3C903A72.5050806@rmts.donpac.ru>
On Thu, Mar 14, 2002 at 08:51:46AM +0300, John wrote:
[skipped]
> /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/. ЧТО?
Насколько я понимаю, postfix выполняется в chroot'e, а значит ему до
фонаря ВСЕ файлы которые находятся выше, чем /var/spool/postfix (см.
/etc/chroot.d, там три скрипта имени postfix)
>
> И это только полбеды. Далее написано:
>
> /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 модифицировать (или меня
> подводит мой опыт программирования на С/С++, а здесь такое можно)?
>
> Извиняюсь, если кого запарил своим длинным письмом, но я правда не
> понимаю, что мне сделать. Скажите мне прямо, что я слишком много хочу и
> этого нельзя, или покажите, как это сделать.
Тут идей нет :(
--
Best wishes,
Artem K. Jouravsky,
iFirst Ltd, System Administrator.
-----------------------
FORTRAN rots the brain.
-- John McQuillin
next prev parent reply other threads:[~2002-03-14 11:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-14 8:41 [mdk-re] " John
2002-03-14 11:28 ` Artem K. Jouravsky [this message]
2002-03-14 11:52 ` [mdk-re] " 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=20020314084311.GB7364@ifirst.ru \
--to=ujo@ifirst.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