OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Restricting to whom mail can be sent to

From: Emmanuel Seyman (emmanuel.seymanclub-internet.fr)
Date: Thu Feb 02 2006 - 08:06:15 CST


On Wed, Feb 01, 2006 at 10:08:52AM -0500, Victor Duchovni wrote:
>
> Well it does prevent mail to other users being sent *via SMTP*. Perhaps
> you want to disable delivery even for locally submitted mail, if so try:
>
> local_transport = error:Mailbox unavailable
> transport_maps = hash:/etc/postfix/transport
>
> transport:
> user1.foomy-domain.tld local:myhostname.my-domain.tld
> user2.barmy-domain.tld local:myhostname.my-domain.tld

I must be doing something wrong because I'm not seeing this.

Feb 2 13:21:10 dublin postfix/pickup[6053]: 41E5927D75: uid=48 from=<noreplydublin.atlas.location.tld>
Feb 2 13:21:10 dublin postfix/cleanup[6155]: 41E5927D75: message-id=<20060202122110.41E5927D75dublin.atlas.location.tld>
Feb 2 13:21:10 dublin postfix/qmgr[6054]: 41E5927D75: from=<noreplymy.official.domain.tld>, size=986, nrcpt=1 (queue active)
Feb 2 13:21:15 dublin postfix/smtp[6157]: 41E5927D75: to=<pipopipopipopipo.com>, relay=mailposl.eole.tld[10.153.68.60], delay=5, status=sent (250 Ok: queued as 435463BA64)
Feb 2 13:21:15 dublin postfix/qmgr[6054]: 41E5927D75: removed

Output of postconf -n :

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
local_transport = error:Mailbox unavailable
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
relayhost = mailposl.eole.dgi
sample_directory = /usr/share/doc/postfix-2.1.5/samples
sender_canonical_maps = hash:/etc/postfix/canonical
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/restricted_recipients, reject
smtpd_restriction_classes = local_only
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550

Emmanuel