2 msgSQL query as alias
3 msgMailfrom restriction and SASL clients
4 msgHow to inform outside users that domain soon wi...
31 msgASSP and NOOP
9 msgDouble restrictions for SMTP Authen question ?
5 msgResend 'virus' mails
3 msgmessage_size_limit exceptions
53 msgabout greylist.pl and alternatives
7 msgfailing to send a large mail
1 msgRe: Another weird cert question

Restrict sending to one address from one IP?
\ Kenton Brede (29 May 2007)
. \ Noel Jones (29 May 2007)

6 msgForcing PIX workarounds?
4 msgheader checks are not working
9 msgrecipient_delimiter
3 msgDocumenting alias expansion in mails
5 msgDomain Change Notification
4 msgHow to do a defer_if_permit with a SMTP code 451?
4 msgvirtual: mbox fine, maildir generates 'fatal: g...
5 msgMultiple relays and rate control with anvil
19 msg550
Subject:Re: Restrict sending to one address from one IP?
Group:Postfix-users
From:Noel Jones
Date:29 May 2007


 
At 10:30 AM 5/29/2007, Kenton Brede wrote:
>I've got this situation in which I need to set up an address for
>announcements. What I've done is create a Mailman list and set it to
>only allow messages to notes sent from
>daily. daily is actually an alias
>set up in /etc/aliases pointed to /dev/null and is the return address.
>I have postfix set up so that it will only receive mail for user
>aliases in virtual_alias_maps. Also "mynetworks =
>/etc/postfix/access" contains the machines that are allowed relay
>access on our network.
>
>The above setup prevents anyone outside our network, and not
>explicitly allowed to relay, from sending messages to
>notes. But the machines allowed relay privileges in
>/etc/postfix/access, can spoof the sender as daily,
>and send mail to notes.
>
>Is it possible to restrict machines which are allowed to relay on our
>network from sending to notes?
>
>In short if I could restrict sending to notes from
>the server itself, and allow no other machines period, it would be
>great.
>Thanks,
>Kent

If mail from the local server is injected by the sendmail(1) command,
you can simply reject *any* attempt to send with the special sender
address via SMTP.
# main.cf
smtpd_sender_restrictions =
check_sender_access regexp:/etc/postfix/forbid_sender

# forbid_sender
/^daily$/ REJECT internal list only

If you must selectively reject based on the client IP, please see the
general instructions:
http://www.postfix.org/RESTRICTION_CLASS_README.html

--
Noel Jones



© 2004-2008 readlist.com