|
ru.unix.bsd- RU.UNIX.BSD ------------------------------------------------------------------ From : Sergey A. Gontar 2:5020/400 13 Feb 2004 14:54:45 To : Arthur Veles Subject : Re: Sendmail - проверить домен отправителя -------------------------------------------------------------------------------- > Сейчас можно отправить почту только из внутренней сетки, т.е. сервер не > является "открытым релеем", но в качестве > адреса отправителя можно подставить кого-попало. FEATURE(`relay_mail_from') не поможет? relay_mail_from Allows relaying if the mail sender is listed as RELAY in the access map. If an optional argument `domain' is given, relaying can be allowed just based on the domain portion of the sender address. This feature should only be used if absolutely necessary as the sender address can be easily forged. Use of this feature requires the "From:" tag to be used for the key in the access map; see the discussion of tags and FEATURE(`relay_mail_from') in the section on anti-spam configuration control. А для автоматизации процесса мона еще скриптик по крону пускать: ============================================================= WORKDIR=/etc/mail ACCESSFILE=access #сюда генерим базу TEMPLATEFILE=access.tpl #здесь стандартные определения для access DEFAULTDOMAIN=your.domain.com cat $WORKDIR/$TEMPLATEFILE > $WORKDIR/$ACCESSFILE cat /etc/passwd | cut -d ":" -f 1,3|tr ":" " "|\ (while read NAME NUMBER ; do if [ $NUMBER -gt 499 ]; then #у меня UID-ы юзеров начинаются с 500 echo "From:$NAME@$DEFAULTDOMAIN RELAY" >> $WORKDIR/$ACCESSFILE fi done makemap hash $WORKDIR/access.db < $WORKDIR/$ACCESSFILE ============================================================= --- ifmail v.2.15dev5.3 * Origin: POE NewsServer (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.unix.bsd/164664d6983a8.html, оценка из 5, голосов 10
|